标题: 修复交换错误 [打印本页] 作者: admin 时间: 2016-1-10 03:43 标题: 修复交换错误 Hi I fixed the swap bug a long time ago it got tested on my server and it worked # ?( m" F- }& b3 s7 _ I' K1 RI posted this because someone kinda posted a youtube thingy about it :O. 0 l9 l* X+ [; Q8 T; m6 } ; v3 x' q6 N- X: x" v/ L7 d8 M; ^3 QFind this in DPSrv.cpp @ worldserver; S. U1 Z8 P+ d0 ^0 g9 l7 C
0 n/ y/ s( E4 T0 }4 e( MCode:6 U4 y/ E0 q/ p& x" m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) y9 p4 h2 a8 P. u{ ) f! i, D% S5 e DWORD nId; . u3 d/ Q* @6 p4 ?& ]$ ?- S int nPart; 0 V6 \+ Y* g# |$ t% k3 P p3 A! e1 u% J F7 o
ar >> nId; % Q0 G& f0 F) F8 O4 F ar >> nPart; ; T3 Y. z2 l- }- v9 j4 u' P, f : s7 V _' t( K! D y if( nPart >= MAX_HUMAN_PARTS ) 6 {& N {3 K' T7 ~ return; 6 U1 D/ z" R" o. a @1 Z% m7 j$ ?+ I" Q- q; L7 d
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it & W, V O! v9 `; S' ^3 r: E. b, l& B+ f, E
0 J1 a& J0 j( y [
Code:2 S0 {5 |" v/ Q3 H, M/ i" d8 J
#ifdef __QUGET_SWAP_FIX S0 I, }0 F. A& r6 q. ]/ O- H: l' M8 M9 F) h" e
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) , D: P0 I4 d/ _2 w7 T/ K+ y: U pUser->SetHitPoint( pUser->GetMaxHitPoint());6 Q2 r1 b4 N0 @" N
; g9 Q$ p; p5 k6 D) o; _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% ~) T- @- V# g- k
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); - {( Z2 T& ~7 s1 | / R' P3 T' y! S! w if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): D: @! s7 W( ]$ }
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); 0 D2 Z9 e, S; b5 M- q& F$ B6 x2 x5 j6 ]0 t8 I" ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp # a" H% S/ d- _8 c1 J' uand add under3 I$ c3 l- A6 O& \0 u