|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
: W* d+ i( n uI posted this because someone kinda posted a youtube thingy about it :O.
' q( e6 w t/ ]4 I6 G! e4 q$ [1 t7 V; k* Q8 g% \
Find this in DPSrv.cpp @ worldserver
: o; O+ t9 [( } \6 I" d/ ?- ^5 P/ w% [
Code:
1 L) Z; O; m; ~, s" p7 @! x) _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' v" a% R2 ?! j4 y" Z [{
' e5 G: a# i- V7 t0 k b, s7 b DWORD nId;# {( v& | C2 z- S4 B0 v
int nPart;; g6 K" [2 m) V. r: s5 b6 o
; V' X& E3 W5 }! n% j+ h0 }: L ar >> nId;8 _4 o3 x0 E0 S8 j4 ^# U! @
ar >> nPart; # n0 U, r. ]5 _
: s6 q+ A2 U5 X0 |
if( nPart >= MAX_HUMAN_PARTS ) , l0 y! g$ K7 o! L' M
return;* m1 g4 } V$ m- L+ V/ N
! t* \3 s' J3 \4 w# C! y! J
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' V1 T, T2 G. h- w4 _2 [
' p0 X. ?; I4 o; L
2 s0 a0 Z% Y5 A* [
Code:
0 v* l% m0 ?8 P#ifdef __QUGET_SWAP_FIX
: n3 T& ?5 L0 w9 p5 {! N9 Y8 f2 ]1 k2 [" i7 u5 l. q" q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); C6 w* e- }, u! B( s0 U+ F' V
pUser->SetHitPoint( pUser->GetMaxHitPoint());' L/ x5 v( u, Z
" X% }: Y" z" c$ y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) O* g y3 A h- ]- ~8 K
pUser->SetManaPoint( pUser->GetMaxManaPoint() );: K( h! { A) X {; ~' M9 ?
/ s' W( a0 A" r
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 k9 x H3 u% Q! J2 q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( z, b' w8 W7 M6 x6 T- x
/ V, Q, e- ?+ N) h# ]+ F) W$ f#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 L7 ?# ~$ t) ^! Y+ V [) ^: }# ^and add under1 U! v: E6 N7 f0 y1 {
' _3 A/ x( b" y- J6 E1 PCode:
. o: h! q0 l- A4 ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 n- }; h1 i `; C s6 e {2 D) e4 x$ N; ? T( v: G0 X
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 );/ U/ q, J* m) Y v# y
}this
' ~/ g; [2 f! { c5 h. T$ A6 ?1 _. |; x
; `* v8 Y. _' J; ^Code:' t# ^0 x: p; M* Q2 e8 t& g l3 N& z
#ifdef __QUGET_SWAP_FIX
7 z) }2 K* E" V/ X3 W2 V, v if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" q0 [: y9 O: z' f$ y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& ~4 l2 ]( c% [! K2 S
: }8 t* N, f* a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
% b! I6 J2 g. x1 S7 j# d1 Q. ^ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: ?, a! M5 t+ C1 ^& U& v/ L& ^ c+ m2 a8 P
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 A" I: K) ?1 V8 B. n( m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& X! ]/ }; |& c$ q
0 K' T+ I" G: E/ s#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % |9 B2 B+ M! o" M3 Y
( b2 m! n5 g) ]" H9 S
3 Z) n& l w: e( c" l |
|