|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " a$ @) R0 j T. Y/ v
I posted this because someone kinda posted a youtube thingy about it :O.& u- A' g; b- v% c) K _$ Z1 e. T4 p
6 f9 q& B/ O. D7 H5 wFind this in DPSrv.cpp @ worldserver9 K4 P7 E$ T6 q/ v; d+ f* d/ Z
$ Q6 X7 A7 ]& G& Z* v0 g
Code:1 Q" ~6 U0 F& D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% p5 x: ]& \" L# D3 J{
1 C9 R# V" z( H9 w3 l) L DWORD nId;
5 i! N$ _, s5 s7 B Q int nPart;9 L1 d/ @2 }6 b) b% c W& n
' w1 Q N. s! H+ d) `
ar >> nId;
$ b. g: X: F0 H( \( M ar >> nPart; : _8 ]1 C$ M* U B0 v4 l
2 y+ q0 Y9 j2 n1 {! \ if( nPart >= MAX_HUMAN_PARTS )
; M% S/ A; |/ S4 j return;
& d. C; H7 }3 F" R7 G0 F
$ v) o% G" Q# n# ^0 O CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 z5 G0 a' D U0 U R" O+ j4 w$ j
2 X2 f9 q1 Y( {" b4 m1 f* G0 ~
, G: j Y, I( ^# _: w+ V3 I3 F. uCode:
% u, q1 _( w9 t#ifdef __QUGET_SWAP_FIX
; W. e) c9 K, N! G3 G( s7 k( y c3 A; y" ?$ `# c* u( X
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 n4 j3 v0 P- _1 T" R
pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ d p# z+ V7 o ]9 U: b( ^
- C6 ~8 {1 ^% A- }9 l- f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )$ A5 l2 x3 ]+ p( r6 @6 z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ b' G, e2 b M9 I' `/ S
1 w8 x$ J2 H4 ^
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), K; b% t2 p& g4 e3 B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 S1 |. n+ D" C' y% F; M/ o4 |% r$ G0 W% d
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; |6 D% F1 _4 G! R) D
and add under
4 T3 x$ U( ?) g- P8 o( a% C2 E) k0 [& u# v0 D
Code:+ x( q+ b7 y- G6 o) ^; q* e% `7 R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 K$ b" o7 N8 q9 J* l+ ~
{+ w e5 x5 o" ^4 v
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 );
. M0 k/ k3 J+ z) E }this
7 J) k( _4 t9 q r; {- j2 i' K: A& Q" `4 i/ n) }) O
Code:" ^+ A! P& x6 c
#ifdef __QUGET_SWAP_FIX) p4 L0 P: B; k1 M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ Q' _5 d: T# n; J) L pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 C; f: H' }: r( y
2 r( G8 n7 t6 S& Z5 f0 c* f- N if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 Y1 m5 M9 [7 o! z* G6 z0 o pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# i3 k+ m6 ?0 a3 \8 ^5 X
) a& Y0 U' P+ k" p if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 s) K, P. g' x pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 ?" o6 S5 ^8 z0 p5 R- Q, y- }: o! P0 W9 ]& E
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" X1 ?. A4 Z, |$ N0 p: U& t7 p0 I$ f, ~" ^9 a2 P* ^& C" R
$ W6 U/ ^, F9 B2 @
|
|