|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 u& W0 M1 k) Y- n/ G8 e6 O' p
I posted this because someone kinda posted a youtube thingy about it :O.
" B0 A4 Q1 c, |% E: H* t* }, w% n4 v) K5 ^' ^# I' z. F: p
Find this in DPSrv.cpp @ worldserver
) h, p/ a+ c. c8 }$ ]1 `7 ?# ~- z
% V3 d4 r' L! ^5 G) iCode:$ _+ ?: l, i9 V- x' A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# ~+ N4 l! V5 h; \1 r{, `% m, r0 }8 m+ L3 @) v
DWORD nId;" ~ T0 J s4 _+ {; r
int nPart;5 H% \3 [+ a+ p9 f
! O8 A( a. y, j3 e( j2 a ar >> nId;
- Z6 e3 M/ l' G" r; w& [) | ar >> nPart;
" g1 U) q' |% c/ s( t" d: r& f* e 4 `% y- d' w3 j) Y4 X9 p. Q, i0 Y
if( nPart >= MAX_HUMAN_PARTS )
8 v9 C9 E' N0 Q8 X2 j. |, `' b return;
4 d1 l' |- U* n4 k( F
. z4 S* N2 H: @$ t1 ^ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" p1 V; O- l5 P- j$ X& W6 S
) |; O( N: K& n9 u' @* c; E1 R% M5 _ h/ P3 ]/ G! I
Code:
) T) K! A; j! l1 e! X#ifdef __QUGET_SWAP_FIX
% o7 Z7 z: D8 n! l) B) n9 E3 T7 X1 ]' ~
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 \( C. X, _* \
pUser->SetHitPoint( pUser->GetMaxHitPoint());
* i: m7 t. Y2 _ r' y- `
9 {. q( L" b. H" d, T, d2 O if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! M7 ^7 Q2 h3 B5 A6 ] pUser->SetManaPoint( pUser->GetMaxManaPoint() );( |2 d- l8 B: s6 j6 F7 h' I6 y3 U# ^
0 X! w) V. s! e( `7 G9 ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 |3 U6 D g$ @! O9 m
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( O4 |) i3 L* L' I5 q
% y$ x3 v$ V% M! |* A8 j# k#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) ]- S: D: j6 [& R$ G8 C- ]
and add under c) {" L% u8 ^ Z/ m( [( ^9 a3 V6 h
+ m! o0 u: s+ j8 N. K5 i( n0 T! v
Code:8 A) J ]3 ^5 X$ X* O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) w" p) \2 u/ e/ [, s% R
{
$ t1 {9 R) @/ e( Z 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 );
/ i# |# x% g3 u% Y }this# F- n. ]6 a+ d: \6 p
: z1 {" y, C6 S, V- u
Code:2 ~8 d# S0 m: X. ]7 u7 Y
#ifdef __QUGET_SWAP_FIX
1 a- N& }& x; D( c6 R5 f if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )& G, q8 i5 p" D) O# G2 j- i
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, {9 u6 i2 g& Y
' b; Y' @$ K7 F; L) c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 w3 Z% m% l. R! G( d pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 `4 D( M6 X) _* m9 B5 s8 ~- i1 T5 m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( N- ]* ]5 a _1 K3 M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 H: y ^& o" d
4 f. M0 C! c4 A
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . ]; ~+ u8 Z; J
. y$ g3 P9 ^# Z& v6 K; s7 @
/ p" E8 v$ ]6 K' k7 @: J( }, { m |
|