|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 M8 }" F9 T. V+ N
I posted this because someone kinda posted a youtube thingy about it :O.
- P/ _9 p5 t8 W3 @
8 R/ U9 n1 I8 X& n( Q/ q! rFind this in DPSrv.cpp @ worldserver
3 D+ C8 K' |, @* A/ M
- b2 a! H9 N2 CCode:* K0 M( D3 t& D' G a; U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 g& ?. p! E6 [( O
{
G0 \. q: h$ j DWORD nId;- V; p" `+ X& y$ _1 l
int nPart;* d. r0 ?' O e4 Z2 D1 ]$ u
: f3 ~ @& F( ?/ m- t" m$ C. J7 F
ar >> nId;
9 e4 ~' l8 D6 ^ B% z4 h ar >> nPart;
; d) ]3 O% [1 m: } w, Z, q& n / w* E" `7 n2 e9 V, z) ^) L
if( nPart >= MAX_HUMAN_PARTS ) 0 x6 c* [) E2 l1 Z0 ?' ^1 h$ @
return;
% E( }/ W4 Y/ p- n2 }3 R0 M, z: x0 n+ i2 U9 p# Q+ A
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# O) l5 S) Q0 M$ |7 A
* Y5 v6 V/ v! n5 W
5 v6 ]: k" _% S7 V8 \2 k7 \' lCode:
3 F" Q3 V+ ~8 f#ifdef __QUGET_SWAP_FIX
: E, x5 G U' h" Q# q; a0 S3 U
8 ]9 k& L2 [% c if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )4 x1 d' M5 { g( C9 F) c. m1 W
pUser->SetHitPoint( pUser->GetMaxHitPoint());
_! N6 j: A9 A
) R' `( }1 I3 M Z! w! a s! v if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 Y/ X- k8 Q" {: @
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# i8 ]$ y1 g' r7 }$ K" [
/ `, t' L2 T2 r: x1 [# Y; x x1 N
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )# \: V( z4 p$ a8 Z) m: l
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 U1 r( r6 T' t7 N! \+ j+ _3 G
1 Q* F8 \5 q3 \: G' v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, [ d2 P! X9 _
and add under3 ^9 I a3 k% v9 }: e
6 s6 [! C/ k; a/ b
Code:
l" n) `# c9 D+ jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( G* |+ j3 \- ^, x) p! Z {8 g7 _- C, t: ?
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 );3 l4 t7 X* w% y+ a0 b' n" L
}this
1 Y$ l; Y& P4 ^& X! d$ X
2 E, \- P% W9 [; x/ Z) C2 aCode:$ O, H" `& U+ P6 R
#ifdef __QUGET_SWAP_FIX
! B- P! Z$ Y' j* v2 Z5 q4 w if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ). Q, i% N$ Y7 D J0 v0 w4 Q9 T
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ o4 F; f" h6 `6 K! A& i; Y
+ m0 [+ ?0 M) j- d% g) h( U if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- G9 A7 p' P0 N) I2 c# M
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" m' @9 K4 B5 y x- o! L: A0 P; `; z8 T x
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )! G; k+ s) k1 G# _
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 }6 L7 O5 \: h( h
5 C: Q( v8 ~; k; x2 q" l- E5 a- B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ H3 n3 X S9 |- D& U
* H- }- `4 H! D% O* i( p
1 f- [3 F' v# F: K3 P1 X |
|