标题: 修复交换错误 [打印本页] 作者: 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 0 K$ u8 F3 z: s6 w
I posted this because someone kinda posted a youtube thingy about it :O. ; }& u+ G) n$ t h) ^, p' _! r- a4 G& L* B( w6 A0 B; \
Find this in DPSrv.cpp @ worldserver 3 F o. d9 b$ u1 b ; \1 c6 g j& d! r. P. YCode: - z( r/ t8 h4 g* ~void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) * j0 }8 Z' n4 H* d{ & h Y2 @) h! f j DWORD nId; , o0 e4 P8 J& ?; z9 t' i$ } int nPart; B6 _! y* |% G- `+ c9 N$ k/ }
0 e; w8 O' D1 C3 ~, r
ar >> nId; + [) K! F+ Z- [0 h ar >> nPart; ! D, L) x0 R2 X
% }5 M8 z; h; ~ K8 T. s# f if( nPart >= MAX_HUMAN_PARTS ) 7 p. b( H' T( O* C- w# c% B return; + n/ C# L) j+ |0 ^! q5 l# h7 T) }1 i8 O5 \3 w& M. G. {% H
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 y5 o& M; {4 N4 q8 k
, X7 [1 t( o4 ~/ P1 E
! S( F2 k# [% V5 {" @/ s$ ]% [* v
Code:9 E* R/ B5 B3 h% C) D
#ifdef __QUGET_SWAP_FIX ' f/ J' Y+ u. z% M& g9 G4 t* |2 S& Y7 o" |+ f
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 {: V# b+ z) T2 f" d3 a
pUser->SetHitPoint( pUser->GetMaxHitPoint());. G5 P/ k6 r- m) d% m
8 U1 F) ^* f% u: q( C; I7 S, Y( B1 g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) 5 P3 B0 k# s4 `( c0 T, U' C3 U pUser->SetManaPoint( pUser->GetMaxManaPoint() ); - T4 |$ h4 R" X3 g" D/ n+ Y( J& \9 i. {- P: H1 @" C
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )( r1 L* ~7 z: F
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );9 X) y. _2 g) K5 d% |
- x& @+ X" `# l1 m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 j/ k+ P% b" l" p( v9 N( S
and add under+ i& n" C& i% x# J' E