|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked , I, l% j9 f2 r
I posted this because someone kinda posted a youtube thingy about it :O./ d) ], Y! Q! v5 a; @' O0 m
( N( m9 g6 [* ]+ }' [Find this in DPSrv.cpp @ worldserver
( F/ c0 N" ~ i7 [- x- D
& d" K& k5 I$ g" i( F$ KCode:
! d2 v$ A( C2 u8 [, K! U) q+ _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): C R# n: ~3 ~0 }, e
{; ]# s2 I0 n; F' j
DWORD nId;6 T, ]: h( |5 ?+ h8 m" z; T
int nPart;* F/ H; T2 Q4 H5 {
6 p4 F% e8 k7 c
ar >> nId;
/ `! Z2 m- S, G' y6 _5 Q ar >> nPart;
& c9 u; j1 k* w9 H' \
* q7 r5 Q5 }: y- ` if( nPart >= MAX_HUMAN_PARTS )
" R; h. I7 }- q" i return;" Z4 ~% l) S/ r8 K q
- |! A6 @' G J8 v8 c D) f# u CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. D- g1 @! z% ^6 n" [: L) Q; ` p2 V. Y. C4 G1 L
$ g, {3 X% \; Q; FCode:$ Z# c# C/ w6 ^
#ifdef __QUGET_SWAP_FIX. G! W' m# l& B4 f7 k3 g$ J& T. v
J' ]6 c9 d9 K; x6 L if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ M9 j- x# a" ?0 @& e
pUser->SetHitPoint( pUser->GetMaxHitPoint());4 o8 p/ C$ e" ]
6 c9 E3 v- k, G
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
5 Z! G$ Q$ S+ A% ~+ e! ~$ ^, u& P pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ a+ h, G" `9 Y5 M& n, Z: A! a8 ^' ? V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* M, F7 W; Z b* ?; b2 |/ d' ?& l B pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 p6 }% C K3 y/ K& h4 @; e
+ t5 T* m& g. W Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& V( t9 y& ]5 ~: w4 ]0 c
and add under' [6 L) t/ f6 J+ h1 \
0 D. Q Q, e# V8 ^( j7 j$ nCode:
: ` D5 D9 q3 A- M3 {( fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 T* d& u# F% H ^& x2 y o4 D \ {4 y: y# O V- |0 [) u- U* W) \
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 );- Y# k' I" l V6 z! M
}this
! i9 X) v6 h: \' O! g
: C) H; n0 H. D' k3 [* o) tCode:- X$ l |9 {+ A0 e; f' k% V- [; l
#ifdef __QUGET_SWAP_FIX
; h: f( g* f& L7 l if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( C. n l# x2 ] pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) k* r0 E: l# o6 l3 }, S/ M
1 P0 E9 O/ \1 n, y. F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )& D$ f' Z6 C' x) V1 R
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, J0 n6 D! P8 I `
4 M3 H2 S2 q0 A
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
6 w, |9 z X' j$ f pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ u6 W [4 ] Y! {1 ?4 i, i+ D: g
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ f( \; v- p$ M. x- A% ]: z6 R4 k! a' P
! v$ f8 i5 m9 V, E |
|