|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
& x0 S$ f; ^# G, i9 XI posted this because someone kinda posted a youtube thingy about it :O.% t2 [$ z5 j; s* Z3 p. \
$ q3 M+ h: I! VFind this in DPSrv.cpp @ worldserver& U9 y7 |; ~( h. m. p
' P2 X- Y2 X* M8 X; pCode:6 |/ g& Q( K. |" f$ s# Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# c2 A) W* |9 w{3 a% H1 k9 ^2 K8 O- \2 P
DWORD nId;
& _( m% E: ?* R5 I2 m int nPart;
) S- Y0 g" M# s% T; b' M6 V4 t7 Y: E# n1 W
ar >> nId;# v0 M3 Q8 n" k( v6 c
ar >> nPart; # R* ]* J9 x7 m0 t" ~/ E
3 v+ i$ |/ ]* J# r9 q( t4 R
if( nPart >= MAX_HUMAN_PARTS )
q" o3 O+ v- e+ r2 I return;/ ^6 x% {9 i4 N
* P: N3 Y& g2 c0 e; R8 n+ k( X# L CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 |/ g! l) n9 Z' E. M5 @
( N8 @2 D% S& ] ?* n% I% ~' [1 x/ x
Code:
% V: _- i4 f9 h4 E' k3 j& X3 |#ifdef __QUGET_SWAP_FIX
9 P$ ^+ E7 ]& \0 [1 [7 f. x) N9 T% m- g2 [! r+ }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )# w$ L/ q8 a$ M7 Z5 }7 O8 l: S. y4 A
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. s/ W$ c/ a# m- ~9 ?
4 y% n& S! M0 [( B; J! U+ _$ Z7 [0 t: G if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
/ l1 V- R. D v: T2 C0 [+ p3 \8 y pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 s1 ~( Z0 r, ~: F; O8 Y) u
% m* s, P# D4 |$ [. I' H q5 c
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
/ ^' w: i0 _) j! z" D _& ] pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' `5 T+ W; f6 v. D; f% H) J; J$ p
% c% f- K% t. r5 l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 L2 _- |4 V% ~$ j: m
and add under+ `, D! `6 u7 |% Y6 V
8 k: k) @' c1 r2 n$ I- KCode:
' _' F# ^$ \; Z) ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 W, M- g, D3 s% | {
4 ]- I) U6 w; L4 ~& `# l 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 );! C7 J/ k- f3 t! b- H; T. Q! a r
}this
- y8 g) \, }% s4 P/ {4 }$ e9 Y& n/ H2 M9 J$ e$ j+ H5 ` K
Code:0 F6 S$ r6 `+ H* |
#ifdef __QUGET_SWAP_FIX3 i1 V% q- t$ p1 r# F
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 y( r. k7 ^; A" S
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, k- y, G' v$ M$ B3 M& P$ y( J* @& G
( G0 t6 U- K3 ?' w if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 ?. D' [+ T1 d3 o pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 o. r$ ?. |" p6 C4 i
. o' e& q- i2 ~ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
3 e6 O/ P" F; k. X% ~7 [$ x% W o# ? pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; b" q- M" u8 C( ]
- t7 W J' ]# `9 P8 L7 C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver |& D' s) t, {% b
) l/ p: d, M% ?/ S! x$ u8 ]! ~: Q4 C3 W$ D' Y
|
|