|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 9 c4 V/ L' V1 r5 s! Y7 g3 E
I posted this because someone kinda posted a youtube thingy about it :O.
' F: e3 ?/ U9 a! n4 u) z
) e# r) v4 C8 d, e$ vFind this in DPSrv.cpp @ worldserver" A4 @" B' P+ G# B) R
* q" B! o# K5 B/ I# x/ ~Code:. I! K8 T7 S. y1 K7 y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, a1 ?3 G7 [( Y' K* C/ B. P2 u2 ]{! A8 D/ [ H5 `% c
DWORD nId;
& m- H7 W5 p) n4 M4 B# q int nPart;* p/ l# W, d5 k% N
8 j! i8 I( _: b8 i0 X1 A ar >> nId;
, i- k* L3 ~. O1 a. g5 {6 Q. O ar >> nPart;
' G+ E1 U$ x+ x% ?
3 s9 E+ x8 H$ |- v* K if( nPart >= MAX_HUMAN_PARTS )
% _7 J. E% l9 R. H return; v0 A, a! P* N4 K' F& G0 R% z' o
# R" ?" J* \2 j2 } CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 k* `/ q6 g- D3 z- J# v' A4 E& E% S1 m
. p" @1 [+ f9 V' l: r9 v
Code:
9 \0 M3 h7 Y/ K: J) i: D$ q& C6 J* _#ifdef __QUGET_SWAP_FIX
* S( _( j1 v! ^5 ]! y
' B! f5 }8 @% r# |2 T if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
1 C( x8 a$ P- d# b: r pUser->SetHitPoint( pUser->GetMaxHitPoint());8 {9 K; X, E$ [! t
5 d! e2 V8 }( x b2 S4 L$ @ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )& M, S* a9 ?) a q/ F! l
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' e D8 S' G; B6 _, }' L4 i
) \7 J9 [( w- k3 [* O, y: x if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )# f$ { T1 [, H/ d6 [/ m- E
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 R7 `; ^$ t6 d q. }* M7 i& }6 ^4 f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* c. \. E* P* \1 g) b9 _ u
and add under2 V: b7 `& }" e3 o' l
5 o8 C+ V. |5 w: d
Code:# S, q5 Y+ u7 `/ L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ ~% X- U- N& e. f/ Q* ]
{' ~1 R$ S8 r7 N8 J2 u
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 );/ E3 P0 j, a8 M P. m! y* [+ P
}this" w3 e3 M$ w4 ?5 j1 e3 H, @
4 Y) f" o f+ x' o0 w/ oCode:
% J) U- C/ L) o, [2 b% M& |- M7 `#ifdef __QUGET_SWAP_FIX& i$ v! c8 a, C$ r0 [% x g/ S
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ); B' N# n+ `0 T, a; ]3 u3 t3 o
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 s5 ~ Z) c8 a& Z% I1 l3 Y! ^8 o6 Z# b- z
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 [; Z5 A5 z4 R) T6 T pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 H: F) c8 X3 |. @ `7 y
% r# R: F, x2 s8 z) m0 @' k3 d if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )' h- V( m$ L. q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; A9 Y/ z( \+ |! R/ H+ ^+ \. F
; Y# T( R0 ?4 n3 a/ V4 y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - y4 U. w% ^% H. p
( U" n6 e$ I/ X9 N. G, E7 j- S/ K
: d6 @- z# ?8 M" [ |
|