标题: 修复交换错误 [打印本页] 作者: 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 3 f/ w- y3 x; X( y+ Z
I posted this because someone kinda posted a youtube thingy about it :O. + H; y, y2 b! W% o* }+ L7 R( S w" u/ t
Find this in DPSrv.cpp @ worldserver) P( r! y z/ z7 _# C4 v6 |
% K0 Y6 g" |) c4 fCode:; j5 [) I0 @; x2 V5 _+ d
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 K0 {, w5 ]+ M9 {' O! p
{ " ~( U/ G- c i# f* E DWORD nId;+ r" J+ _7 B# y+ Y
int nPart; ; K6 d# C2 `5 M* b7 Z" d4 | k 4 } h, Y* n3 j8 `$ b- P ar >> nId; 8 C' n6 t. k x1 F1 u ar >> nPart; ) y" j q: E% Y/ L/ m I 9 g! v- V1 c: }3 d
if( nPart >= MAX_HUMAN_PARTS ) / e8 p# O- V& ?" s; d+ {8 Q- l return; 7 F ~' E( [, v% m% K5 H) n; z ' w& r0 O- Q+ t- z) D* l; o* O CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it 6 \) W0 C( K2 x) _4 y9 ~- q" `% @1 G8 N* e) s3 U$ ]
: X& S; ^. D' E* c; o8 m) \Code: / R" j3 f! z' `& \#ifdef __QUGET_SWAP_FIX7 k) j3 V" B3 B) v, q) c
3 Q. D: Y8 S: i7 L: s1 s; k" Y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* x- r4 @& V5 e# _: |7 i
pUser->SetHitPoint( pUser->GetMaxHitPoint()); / X' v- o( d, d0 V: K ; E8 u6 k$ v; `0 h& C7 j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) ; D2 v. H2 u# b4 C5 o4 T4 J, G pUser->SetManaPoint( pUser->GetMaxManaPoint() );: {; a: Q( k* j
w" A: N3 U, f: g1 I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )6 l- Y1 D' R, r# x. N0 E
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 u6 l4 O& w% r# n0 S
( r+ g( a% \6 s8 H7 T3 I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp ) ~, T+ \3 t& R. L9 Uand add under/ \. v4 {, }" M