|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- ` U- T I6 c0 q1 [I posted this because someone kinda posted a youtube thingy about it :O.
$ E# \* R9 |% v
/ J# i5 b9 v- q6 NFind this in DPSrv.cpp @ worldserver- Y/ I; u; K; l
* Q% ~1 E9 \4 C% [; U2 NCode:
/ w. c f0 ^; Q) t8 O R2 Xvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )" B' E8 H1 B8 t4 _; }& s8 c9 T
{5 }: g% q9 ^; k+ ]6 R8 n0 ^
DWORD nId;; v5 t9 D K$ s9 F; c
int nPart;
0 ]3 j: h+ k# S9 m4 @; ]) X& A f( }3 g$ f. {' X2 @! N* ]+ t- l
ar >> nId;+ y5 B: w( Z% [+ ?% g" U
ar >> nPart; 9 P" f, F8 D# T1 V3 F# b: f) D
1 J& e9 {5 o8 a3 ]' k
if( nPart >= MAX_HUMAN_PARTS ) 7 C$ _+ l" L8 d/ y* q
return;
( V6 G* z3 ]5 f# k( F2 _- w6 Z& U! B
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* r+ G1 C# _4 y& u) O
! \4 v- X& [- A! S6 R9 Q4 Q, l
; x5 D ], u8 ], o& C zCode:+ n( R; r( e2 C! P! [& M
#ifdef __QUGET_SWAP_FIX! S9 C5 ?; i& B% ^: [+ B
/ L1 R! H, g4 s) [ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- q8 z2 F: V/ _ pUser->SetHitPoint( pUser->GetMaxHitPoint());, P. H% A" x K% c! E1 L) B) B
& U& N( z2 k8 Q/ K if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) _, ]7 R, I. S2 B0 ?( O0 g
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- }) _% i+ a$ ^. H: R5 U1 }$ B1 K$ c' N: |7 E+ Z
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% [& e M" i- F" p5 F, I, F4 h
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); C3 f$ R/ z8 ~7 o$ T& w& f! X' ?8 @' B
* J8 ~- _$ d3 {: Y% r$ s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! ]6 Q+ K) o: d2 U* _$ yand add under# X1 e. @! c9 Q6 v1 ?2 k$ ^
6 [ K5 ^2 |" q( D
Code:8 o1 |( o" C' }# ~! P0 L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ D/ {# Q2 ^6 | {
2 ^/ [8 l8 ?3 q 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 );
0 p2 b6 N0 \0 m% H6 k; x! c! B2 M% N }this/ ?- N1 U! a; `, d: |7 |
$ _# ]% r% A( |4 {& ]Code:& _/ i0 |8 Z" `- G# [
#ifdef __QUGET_SWAP_FIX& `0 I. s7 H, ~; s! J
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 B( C% S# J7 P" |# e
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: k; F7 y% W- o4 ^( d- J V: ^# J l l H* v. I" P
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( `: w% k f; @% G. f pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" B' h6 l1 u; F W$ A8 F z
1 u; X% S: V, R0 T0 ^4 e3 u, R$ | if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, _+ j1 N! Y9 c3 O1 } ^# {# G, ` pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) j c; c9 V9 `0 m3 Z# s
: G) Q$ h& i/ e5 o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; A2 \* G$ n1 D) ^) x: \
2 R1 {' B7 }' u/ R2 w! w4 A
$ m: t) M$ F s* V6 v |
|