|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" N* [0 ^6 ?9 e2 m. D5 }: YI posted this because someone kinda posted a youtube thingy about it :O.: M2 ]/ r5 b/ ^- m h# X
+ w0 n, V8 F5 N; T5 ^Find this in DPSrv.cpp @ worldserver
1 v7 u9 c- ~, i, f2 l) l6 }; I* ~! U
Code:( B% y* v; s! R' w
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* Z9 N" v" g6 F& k4 B0 ~{1 `# e9 e$ |/ v
DWORD nId;
* l5 Y- P, o7 ?7 I int nPart;
; U' Q/ B/ R8 \% k, Q( I+ G" y% S* f" z( X" [; ]
ar >> nId;
! {- j: b! a* M9 Q6 ~' v ar >> nPart; 0 {- V2 D4 Z. z. v
& J' s2 C+ P$ ?) u- r; Z. ~
if( nPart >= MAX_HUMAN_PARTS ) $ j9 V6 E7 ?2 w& a* D
return;4 I, D3 l9 E+ b" I9 \
" A a/ \; D2 A: I" h" Y9 D8 U
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ L& f! g r7 v3 k g, }& M' ^" K' { U# f
8 j: m# C8 m$ c7 \0 q: r
Code:
+ U0 A' M# s' G, A/ g#ifdef __QUGET_SWAP_FIX. A! u5 M" C8 s" p* X3 ~
; l! t( H0 D" C! S( b if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ c0 e/ g# Q( W; g0 _& D7 J pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 X* \( f2 F. [8 @) Q+ @; K
5 B8 X5 X- p8 c8 I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) M; r1 o: s7 D pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 T. p4 S. ~- D3 e4 H3 A% X4 `3 ]- W; R1 L8 z O: j
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" [6 ]1 x, c' T/ v. |& W0 l
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ @: e( ?& e5 ?) B" o2 l0 l
, O4 v" `3 e1 A- x
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 B8 ?( c: G, G; ^1 D; ]3 @: w5 nand add under' [& `- `' F q1 h! D/ B& x3 K7 y
6 m3 H9 T9 W; C Z1 R
Code:% ~ Y& }+ D4 _: \5 z( W5 `
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 |! k& X. F2 f2 w ?8 @ {! A' F8 N" E$ P4 ?% [9 C
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 );- c$ J4 G$ u7 u+ I
}this
( f8 x3 K! i) h. B' h
) A, v9 @. {7 t( C. F) \9 n( `Code:/ R1 }0 ~& E7 K1 X; s5 V8 G8 H
#ifdef __QUGET_SWAP_FIX. k% K. y: j( J) e& c) }
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 R8 |) c% w3 j& q: V; m pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 ` D7 ^" E5 ?. U. ^& m. R0 }' y( w" B
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 k: J7 x4 p. z, k! N
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: Y( l$ R- {( Z$ R
: D7 m5 L i5 _+ _! y" j
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
. B$ c# F! r' {* J2 c pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 M: r$ B7 v" L' K& s' W1 m ?" f, u7 y7 |/ P+ Z$ U
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 o$ O' x3 v2 z; P9 }% }$ m h: J. {
4 K5 d ~" P- r6 g1 }- [" o% e% Q/ `) H* Q
|
|