|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
R) V( }6 w+ l* R) kI posted this because someone kinda posted a youtube thingy about it :O.8 W$ u+ Q5 j7 Y" q. x5 D1 k
& @$ ^5 Q2 L! Z Z: x4 F
Find this in DPSrv.cpp @ worldserver
+ [3 K1 M$ F* M& M7 }: l. [+ a
$ g/ W- D) O9 Y# gCode:1 ?) Q% J3 b( g3 Z. Z; p
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 g& k4 d6 a, g. E H+ H M6 s% a
{
" \0 F) n3 n7 r0 f# E% \! h DWORD nId;% P5 u. H- ~! d* e
int nPart;
6 W/ S' | s' j$ m- K$ p7 l
: y' k3 ?: y1 _5 z3 t X ar >> nId;6 F) w1 v9 C* N* c! |0 t' `2 l6 m
ar >> nPart;
4 R, j# E |' |9 o, G" o5 h ) @7 B8 Z3 r/ c3 }; R4 I
if( nPart >= MAX_HUMAN_PARTS ) , i2 y0 {# j% G8 D
return;
# g6 O) G) `- \7 |, _! Y# E
/ t6 V$ i; |9 l3 R CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) ~+ _/ D, `3 T& s1 f
3 F0 J: i) ^$ t# r3 Z+ K6 A5 ? \5 _
Code:
% b$ J0 q: n! d/ c( }$ {) J#ifdef __QUGET_SWAP_FIX' z& n3 {& \$ m; H8 O
* i) Z) H: T0 k, ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): \ k9 V4 `7 B) }$ q# ^( a
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 u5 M, ?: A, F. a5 N
% _, ^5 [8 d" T4 U5 _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )6 m' P5 _: _, E3 f
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ ]2 K7 z0 P/ \6 W0 j" a) M4 z4 x6 Q) Q, Z7 J3 k( x$ Y/ ]0 P; |
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
' }1 G, W+ q' w5 X4 I1 N pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 W+ y5 @# D; e/ u5 q8 v. l
1 H) v8 h9 I$ c) D5 P# C#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' z1 f- z$ p$ f- x. \8 hand add under( L6 L7 T4 z3 m3 q B
4 l: B3 D" N- h1 k7 S
Code:
( m* R I: C O9 \) M! Uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), B, z- H2 v' y7 [% d. V# Q
{' h% |$ L# c ]- M; ?: F
CMover::UpdateParts( pPlayer->GetSex(), pPlayer->m_dwSkinSet, pPlayer->m_dwFace, pPlayer->m_dwHairMesh, pPlayer->m_dwHeadMesh, pPlayer->m_aEquipInfo, g_WndMng.m_pWndBeautyShop->m_pModel, &pPlayer->m_Inventory );
3 K3 ]6 H# ?/ R& v3 R5 O2 h }this/ l; ?+ B# x# W$ q% w( g( y
" r/ {5 W8 ^. n- O
Code:5 a, _4 f9 R1 M; ]/ z
#ifdef __QUGET_SWAP_FIX4 T. Z3 J* K, A1 G {( f
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% M9 m- V' p2 s# L3 A* ` pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ I+ \0 U& u3 O: z# g; J. [8 K7 @! g% b) q1 {
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" a' _, E) {" T, L3 E# q9 W
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! S9 E0 U3 X' Y+ H6 f
. H) |9 G7 p7 x
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 S# B/ l0 S) u2 U& S pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );3 i0 g E* q) ]) C
' U7 N/ i; f/ t( ?$ ~9 @) Z' R
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 o/ o4 O* e' T7 t9 U5 q
+ w) u; E/ n3 E
( Z! O6 e: f' x/ T |
|