|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
: U3 F* i9 M+ R. G7 D4 ?# ^, C! ^I posted this because someone kinda posted a youtube thingy about it :O.
9 I9 z; C( X" o) Y h( j1 ~9 [! D
5 I/ @; Q0 z6 b( f+ iFind this in DPSrv.cpp @ worldserver5 `+ [+ e' e r6 n0 Q& L
- g) k( c2 ?! B" m8 w: N+ T0 xCode:$ h) R5 `- `. V+ d5 `' i
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: Q0 `; w+ s, F$ n{
8 B5 Y% u, m M* e6 x, E( | DWORD nId;
" \* N4 ?4 W) g# r8 s int nPart;
/ F: u& `8 K! o- U, d+ R& N! z
8 k5 R5 U3 i! @% f, n7 m8 d ar >> nId;
& W8 w, F8 u1 b, @) { ar >> nPart; 9 \( q" q0 z, l6 H! H) F1 }
% \8 p8 D2 }; O' r: _ if( nPart >= MAX_HUMAN_PARTS ) ( p$ k* l) Z/ ]% {% X: B) n
return;$ J( E$ v* L$ K/ A% I" G. Y
. ]: c/ y, a) f: v5 J+ c; C
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" G4 G, D4 [: d' P6 x# B) c/ l+ c. c" ~' I2 j
/ b. u8 B3 T. J4 \5 m5 @Code:
9 h& ]( K3 f# |#ifdef __QUGET_SWAP_FIX
$ q6 O$ s6 I. u0 | h p. W$ ~7 ~
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
' N) B$ c; c) _7 F: I8 a" L( b5 H5 N pUser->SetHitPoint( pUser->GetMaxHitPoint());6 \+ T+ H4 I2 W! g" E8 \6 \. F
* I( F. W1 j; o) J$ r4 r
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )" E" s) `7 D* L4 C) q2 \, I+ E
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) _" y5 D) n/ r# m5 ?9 }9 F
; e! c! U. d: T1 f* i9 q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& q! K9 L% t; C& H
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: `+ s( v9 e, I0 Y2 ~
2 {% |+ n- q6 f# d8 a0 ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, P B- f/ S1 Q' Z5 ], i
and add under Q8 _5 u7 N7 x" C* ~& d& u
: k0 T* \( K+ D5 [. |6 j+ @
Code:, p8 I" \$ n, m9 a' D j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) ^8 `" V9 p) C
{- B! P f- H' ?* v, I
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 );
A) L2 p" Z2 J7 z% S7 B }this3 {' k4 H9 y5 \ | i
6 m0 l6 F. ~$ d' SCode:" Y9 l/ b j& Q
#ifdef __QUGET_SWAP_FIX
9 w0 S. T" r7 }% k0 T if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 k- u" c' D$ C% J+ Y0 o( D, j pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 z! d+ Z- @8 L) p" a, J2 S3 K; a5 d' u' v: ^& E# R
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), F: m# [# ^* M' I$ ]; z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, W5 x1 ? c1 Y8 v9 K
; C5 O3 L4 e. E, E; |6 C& g7 g; X if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' O7 s, B2 n" J8 X* G pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 S* O6 @( M4 H2 v
' j0 x; J4 _. z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* b$ @" b n% y9 C/ `
4 R4 x5 J/ |( {' P3 q3 Y3 k) n) L2 d! _7 K2 K3 k a* m
|
|