标题: 修复交换错误 [打印本页] 作者: 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 / X1 R# x' W0 rI posted this because someone kinda posted a youtube thingy about it :O. 1 _8 W# C/ z/ o/ w; g$ J" g 2 @1 u6 ~9 b+ r5 w& T2 NFind this in DPSrv.cpp @ worldserver" r% @/ g0 N* p4 y
# e3 f2 o4 j, D' m4 q$ T- m( U0 aCode:! `% Y% e! v/ L$ k7 H
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ g. [( a3 s8 b7 O' Z% W C
{ ' \0 K5 h6 d+ a5 G( J* x& W DWORD nId; 4 I; B$ W+ a* |! c/ X& V int nPart; / h1 Z, ?3 K. n0 H( ^: G; D . c( C3 T( S# }) P% ]/ f: {8 S ar >> nId; O: h. T: d$ ] ar >> nPart; 3 r$ E( c" }6 d
2 y5 P' |: ?( }+ k if( nPart >= MAX_HUMAN_PARTS ) / V4 f5 U) ~$ ~( o
return;9 T5 E7 p' i# T& g. {
& x7 |$ v6 n7 c b q
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it : _+ C$ c+ O$ _5 ]9 `: N# V2 k5 M6 [! N
" Q% `# C% K2 _3 S& \Code: : h, r* W! m4 Q- t#ifdef __QUGET_SWAP_FIX 7 |% m6 k7 \- N7 d - |2 X) P1 ^% A) d! f0 W if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* o5 O0 }7 P% e+ m
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ c+ \5 C3 q# c a" X0 C' d
0 g# s2 X B$ W6 g% i! b8 [) a: {
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )1 |) c9 u: z# M! I' A5 N. v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' H; {' s3 n6 a) q1 r
+ T: u0 n3 B$ E; @9 P
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )/ F e$ L. U _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& t" }/ N0 T* Y% r" O1 G
. k1 j+ A! Q% F$ D! N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 p* L D* I7 n- i" \
and add under + g6 d* }" {9 a; F- s; k8 G; w) } - Q5 [5 n& m$ c7 O& s5 NCode: - t; d2 G I' D% \+ B$ n$ [% I. jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) / n; S* W0 y) ?3 ?0 |8 V$ X! Y2 q { : r# h1 d: ]7 \! a \, S- b 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 );4 k4 Y h- `- ~ S: |
}this# B( c( R6 h S( p; I3 k
0 a$ x$ p- h% Z- l5 u7 O6 j
Code: 5 F* F( w3 {/ u% Q( s#ifdef __QUGET_SWAP_FIX* ?1 [9 e0 {5 o. C/ u. M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) c. w& t* J1 y+ r
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 X6 p5 R5 @6 _* f2 B9 y; i0 d# ]
T' {2 M5 U" F4 K+ w# ^1 p7 i
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), E7 P n e) i1 c) {0 p
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# |* e7 q% |7 L
. H6 ~! z: i/ G" L+ J if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ J$ x1 I% x- c* A
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); ( U7 c+ O% ^! C% `) I ( v& ~& S. S% V& p" H3 ^* r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 6 M, `% b: y6 Z( z+ i# ~* y6 g7 E! u( B h& _
+ d+ K( Q! v p7 z6 X