标题: 修复交换错误 [打印本页] 作者: 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 ! D$ x. F6 d/ k- A# R
I posted this because someone kinda posted a youtube thingy about it :O. 1 u3 D2 [% t$ m1 c) I E v' I 9 ~+ Z3 i$ d2 CFind this in DPSrv.cpp @ worldserver 3 F# s: U4 J. p* h1 P! _1 e + {; T' E# N: g, LCode:3 x& j# Y$ g" Y4 s" n1 D7 Z9 l
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): J: ]7 j' G* `' H2 k0 ]
{ `9 ~: L7 H0 a" G9 n DWORD nId;8 s! t0 z+ Q+ N$ L6 f& S8 n
int nPart; 7 a6 u. o K$ [; {* B" _ $ J, M/ Z. U+ |5 u" l( P ar >> nId;" d- h' E& J8 Q
ar >> nPart; . l/ h! u; L$ C1 P5 t0 I ) S1 X* g* v4 j5 p; X5 A if( nPart >= MAX_HUMAN_PARTS ) * e' L0 T3 ?) q9 D+ q8 S; ^4 e! y
return; 9 n' o4 U7 ^* L! E- L% `4 c( a: E2 x% C
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 U$ V# Y$ s5 M% o% i0 h9 d
1 J! I0 F' _+ c" ~7 e' N' ~
' m, x* ?' z$ t% f+ J/ Z" ^% g( NCode:5 r# k% [, t% F- h7 E
#ifdef __QUGET_SWAP_FIX ' M1 O! O5 U$ p7 b* H% Q9 P/ T$ {; E( d8 I, F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- `9 @0 h+ X; E# |( i
pUser->SetHitPoint( pUser->GetMaxHitPoint()); 6 D+ I2 d6 v+ r: r: @ 1 p% I8 m2 e9 n( e/ T& Q, Z if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 t/ v/ M" A) F; L4 i# `2 Y
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) Y; ]5 I; R9 x# y6 b: k
) X* T( q" ^: f) I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) A# ^0 @3 P% U
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); & B; f. R6 T" L) b9 X3 D `& `; k4 t5 J% L5 x
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: ~0 M+ E5 f; s0 M0 Q& e
and add under - U% g* |+ }6 z6 ~7 K; B) U+ k/ C. _! C) g; k
Code: / ]: s$ G+ v# V0 oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) 4 S- E9 y2 @$ v# f( t { # H# ~. y7 G# y/ d. C# l: Y 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 );: V/ q, }5 j; B; R) x3 F
}this# r6 Z5 K" g0 H6 D
2 f i b l. D8 @; jCode: 5 G( @" u8 V0 N! _/ a" K#ifdef __QUGET_SWAP_FIX ( X. s& r2 U3 G+ [! ^' \* D if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ f; M2 ?* l7 _* L/ G# ~
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* _1 z) Z3 M( o! n" l/ g9 O
# w& I, M0 ~5 k' K3 h1 r8 G \9 c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( I, m& n; i9 C0 c- @
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); 3 q- h8 j& n+ _; Q- B& a1 L; a! \# Q3 f
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ) n( n7 U: N& C) A; I. l pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() ); 7 y6 L" f2 @7 L) l( Z6 |5 p! z; J) g+ H D( I2 f r% q0 t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # e5 J) |8 M2 E2 h) ~5 _6 t! `" u+ x& w