|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 {# x* W( s9 p& L/ a; S! k, CI posted this because someone kinda posted a youtube thingy about it :O.; c7 g" l+ w( Z" l6 `/ ~2 X# }
" V& }" x) a, b/ U- eFind this in DPSrv.cpp @ worldserver1 }8 b: _9 \) I% l! x1 N
5 g) e. E) v; Z/ ^6 K; R6 `$ PCode:6 p3 y7 Z$ G \& ~0 g8 I* F) Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) V1 P- H7 n0 `8 ^* p5 A{( H1 V& ]/ n5 f$ K* ]
DWORD nId;$ ^( B2 n4 x4 l3 k/ I& Z0 U( ?3 [2 A
int nPart;3 F- X" n- _! c6 o( [
" _6 B1 S5 E. _4 h
ar >> nId;
. Y5 R9 j% w5 }& @9 `# W! C ar >> nPart;
2 L2 h7 H" z6 U* A) b
, _7 U0 s7 {3 e/ a- e/ J x, M if( nPart >= MAX_HUMAN_PARTS ) 6 E4 E) R; {) T: r1 r
return;
4 V, q. H S0 @& E9 l% G9 g8 u6 }( ^) H# X" T0 G5 D3 [
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" B$ w) Y% o9 a, z$ `" {1 P' s+ C" V
) q7 n8 ^. b) R
# ^, |: _, _0 BCode:" k( X8 _; a( O4 b% [
#ifdef __QUGET_SWAP_FIX
2 T' X" _$ [6 d/ t3 K. L
6 e+ U5 P) L( M: C if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 Z! k1 e* p9 V! b pUser->SetHitPoint( pUser->GetMaxHitPoint());! `# }0 H( H3 G6 B( Q, c- `
, `9 u% w* I' f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# \& Q, N" @; q/ p. w; A# C! J0 J pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 R# g1 x% H3 I4 G# P2 M- |
N6 v2 Z" F; m. ^) |" X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ f- Y) K* z' }, b! d
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );. }% Q. D; e/ V4 y+ K
8 r* y7 y5 K0 _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 f. @% o1 d6 l# E0 D/ t$ t
and add under4 W+ o4 w4 X ]5 Y' j
+ h& H K4 ? f4 L& W1 n$ j
Code:- ]7 z6 S# t. z% R( E' B9 g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). }" {* _, a- w8 i/ a7 P
{. y: [4 K7 D' F, c
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 );
5 P7 N$ s$ p/ g$ T/ L }this2 K; z Q2 O# ~5 w/ L- r, Q
4 Q$ l I2 W/ m! g" u
Code:1 r% \, c6 i& z- H, N1 p4 ^
#ifdef __QUGET_SWAP_FIX
# h! C& _! y. M8 y. f) v7 @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 ]( l2 m! x8 u) \ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# S+ X0 }. M7 Q, y1 n
+ ]1 n1 F) O% s/ q# @( B0 g if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 U0 @# ?; v' R( Z) e pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* V4 u2 M- P8 F3 u0 n! w! a/ `# q% r1 ]6 c" `
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
Q( `* ]+ z; i) ~0 D1 {8 y pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 L/ z$ _# e! B; w" P( v
7 E6 V& Y2 I, C7 o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ [# m" ~! H9 S( y) y# X( M/ R& N3 F6 ], ]& N
5 p( ]& x! [ m# @6 h. |! x
|
|