|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 X2 i1 B l% J9 S1 A6 N8 V
I posted this because someone kinda posted a youtube thingy about it :O.# |" L8 h! @" v! c. k
4 B8 ]7 a) C% i7 l
Find this in DPSrv.cpp @ worldserver- Z: [( T# ~5 u5 m
( n$ S9 N+ N4 ^/ ^* c5 @/ q$ M2 PCode:
; E! c7 t: x7 F( B/ ?: J0 mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ a5 G6 o$ i7 c) z4 Z3 Y& U
{
" k% X* h# ?. k" T DWORD nId;
; N1 U' d0 {; l; k( M8 | D8 K int nPart;
/ a, I5 K' X m' i2 w# E0 P( ?0 }; A3 U
ar >> nId;
% O1 v$ T( M: {1 _( B f ar >> nPart;
& L6 n" U8 A- P) J5 T$ t . ?( [! A4 e6 v% j1 ~, w4 K
if( nPart >= MAX_HUMAN_PARTS ) 8 s6 \: I2 u. H7 W
return;4 L/ z3 A9 a- T( R0 n& [. `
( c. N, N/ f: ~8 Z# ^ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, N+ y" _" L4 `9 \1 y
$ P0 |" x& j* A- W# H% m+ J% d! B$ E* O3 m. }% I. D
Code:5 ]1 b; M: i8 c6 d" \
#ifdef __QUGET_SWAP_FIX9 H& F: }( P/ ?: s5 y3 Y: G
$ _/ b: _* g5 Z( g) ]* O if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
6 z, Y$ {1 S) K8 h. h; H% E pUser->SetHitPoint( pUser->GetMaxHitPoint());! c/ m( A4 I" ]$ S
$ `( W- e( v8 i y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
v+ ^" ]* C1 Q. t2 ^6 |, w pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 n0 r9 B- y# ?+ j! K3 @ R9 o* G4 D: I1 }& _: B8 `9 }
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) K; a! V3 C0 o+ ]
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% T& Q; H- p9 E% Z3 S }/ D! ?! A, G. T& r, o+ ~7 \
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) }+ \4 X6 k8 V9 x s, `
and add under
0 e1 Y/ `0 e% P- a6 o0 }
7 x6 A( @; Z$ k1 P; {: `% jCode:% |; ?+ s& r% v* \" @4 i1 P9 N/ V
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
# R% c5 j7 |1 Q2 F8 H& G' y {
1 H' T1 [% L0 Q( {' Y' q# Y3 m! S 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 );1 b5 z" G; x/ n" C+ w
}this
; z+ i2 u% H- e
* w& h) c! G! G+ ?9 u6 e/ s, w$ h `Code:* J0 Z6 c3 m; r* A" S
#ifdef __QUGET_SWAP_FIX: c3 b- A! o& @" M( ], y( I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 _1 C. @# L5 y. G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 x. G" V: ?. \1 Q( U+ N
. l1 }9 V2 A) M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )% u3 Y# w% u# h$ t. a' \! K
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% U! B$ X3 t6 L0 D* [6 B" n' c5 u0 k; {( q
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
' _: M" T' t/ s2 U9 ~+ A pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; A+ J' i6 a W" _! _- i/ w" X& I' _0 M
6 [' w9 g Q* d2 i7 z7 x# i
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , H& V9 _0 d5 k7 d$ L
7 C; e' C. O# V w$ S( }; m- c9 p% ?0 ]: F/ h
|
|