|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- I7 H: m! X" [7 x& `I posted this because someone kinda posted a youtube thingy about it :O.
: }" I! V2 w: `8 d. C3 r2 n& F; A( i' d. b" o
Find this in DPSrv.cpp @ worldserver u4 P. I' u3 g/ j( [
2 @& d2 _& |' a: F
Code:
" d5 f: k: `' ?* y8 qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 J. E( p$ U$ J/ E) Y$ W* k- E5 X/ t{
8 f: X) B S1 Y2 x# W DWORD nId;6 ~7 ]$ D& ?: J/ m) U: u4 g b
int nPart;0 }' y/ P+ R b4 }
/ H& w5 J1 D/ o5 p x, q3 K+ H+ T
ar >> nId;4 P( W+ Y2 t1 ?
ar >> nPart; . K! d( S" D" z* |4 c
3 I& w4 d, o+ f/ i if( nPart >= MAX_HUMAN_PARTS ) + A" b) U) @( p- g( r
return;
- [; J9 P, O& Y5 ^+ I: @- ^# f6 }$ n% V% x) V
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 Q) o# {: ^' d8 n0 s5 T" K7 j, I* o; T- {7 M" q( x8 [
8 z( A4 o# U( }# I9 QCode:% D1 l( y; i1 e+ j" @. y; ?
#ifdef __QUGET_SWAP_FIX
. e* |7 k9 l+ k1 v
5 c2 H+ p2 v6 Q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
3 y9 |4 Y7 x2 F9 s1 X9 D! p pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 i. s8 @6 t$ e: U$ ~
9 `2 H# I$ x% I; f( x. l if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. Q% L t8 e4 x( |) d+ Y0 ^" Y' H pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! x1 p, j: x' W. `+ [% s9 F- R" H, x+ ?' c
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); s. b4 a1 i# c% g% n; F
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& h8 b- b8 P4 p; j. o; y! K8 h
" ]6 P4 o/ b% f, y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, T) [( D$ m _+ jand add under
! q# F( z( V+ e8 G
+ y; x+ ?/ B% b( x4 WCode:
Z* S5 V- ^, {& o3 }" eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! S5 B; C* T8 j/ R" W( h7 w! D: O {
! R: O. g/ ]# W' E* S5 @ 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 );
, z5 e* p2 ~- u, F6 r }this. o# Q5 F5 u* V
' j& a) Z% o) g/ J3 |Code:
S; N. V% z, O) a" W#ifdef __QUGET_SWAP_FIX! x1 i4 ^& E& O' |
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" g2 C* n4 q5 L; O3 N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: Q+ _0 |: v1 z
5 T: T- \2 g- x& Z' k Y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 d; X" K2 l* L t m: I1 Q, n
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, G! K3 C6 f; r9 p9 |- T
# j& H$ M5 O* z, C
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 t; D' X( h" ~* a* U) i
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; h- m" V0 A- g; b* R! [8 B7 s
. |7 j" h6 p' t#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 v; r) E( U- R+ k7 z. d- I3 M
, ^% h) @+ `. ]3 i3 \/ Y0 w% c% F/ j1 }! Q) N) L
|
|