|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
9 n9 v, J0 D6 P5 v& Q2 ~2 }I posted this because someone kinda posted a youtube thingy about it :O.
' j+ S d. L# V3 g1 _3 a8 Z0 l# @. Y
Find this in DPSrv.cpp @ worldserver r& g M! \- k3 Y ?- L! Y
7 k4 B% e3 L' |+ }. ~' r( lCode:# ^* e' r; v$ A0 K! J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) E( F8 y! s( n. w" m5 p' }' |& M3 L/ c
{. ~4 W$ H& S0 s) ]6 m! x2 Z
DWORD nId;, h' M) {- J8 W5 x. H
int nPart;
% Q* ]& G& R) j0 t& [! E! s# _; M+ T
ar >> nId;. a* W" P/ g, ]' |; b; M; k& G
ar >> nPart; 9 J( L0 L/ f; \& D% }
9 c' y, K1 d* O$ l: V if( nPart >= MAX_HUMAN_PARTS ) : a( Z+ _& r3 ?( x6 I& I% V; W
return;6 V& `4 T; f+ D. Q( f! v& v
" P6 d: {8 d) s
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it7 O" f8 c% R) U% `; N
6 J1 [& [4 w% H$ @- n/ l6 u- d
Code:
; o2 q/ L3 t) T+ y) k5 r0 x#ifdef __QUGET_SWAP_FIX
9 w3 ^4 e R" x5 }" K' U6 B
2 r) X* D. p0 S( r/ { if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 a3 S$ i: z1 g
pUser->SetHitPoint( pUser->GetMaxHitPoint());( k2 [( S, L" y; r E
& r: o9 O8 ^* e( ]) U+ ` if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 j; K; o* H; m# G4 U
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' O$ q( L k. {& O
4 J$ X9 j% n8 @+ h if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# h% Y" y- g7 V0 I pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ ^3 o+ ?2 d, j3 G- J
4 S0 q0 ^3 P8 \& s7 ?7 O3 _# y9 B#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 r" Q% Z: `) o/ s+ ~ U0 {and add under5 S& L( o9 K9 _- v( l, g
7 W2 v0 P) J X" U' I2 j( q- v6 u# }Code:) c8 \! t9 W7 Y- ~8 {& R0 s/ b. j
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 w4 W3 k2 A; x: s6 k {) d5 n! G, L1 b0 D$ H. z$ J
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 );
1 ?' |5 [, n2 {/ Y' W }this
' @2 h* M3 l6 F& [* A4 G/ U- t
( \ n3 N( z( Y1 uCode:
- O$ C: ~1 e1 U5 m0 F. `+ A9 N#ifdef __QUGET_SWAP_FIX
& m5 F% @# z. B# D% }; \% S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ x2 U0 L+ E& R l pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' f4 f& U' Z+ X4 b. x6 @* K5 h5 z. |' j& t* h9 J$ M
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )# B* t% M* n/ y8 C
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ o: f% t% O0 c# I7 l# C
, }, y! m5 T* F5 W) W if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# C& Y0 K# u. t5 s) d pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 s6 u5 {8 J1 F0 {' {- I
! s$ W, _6 `$ x
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . _( _0 q( e) U) l
0 N. v; h; L5 C: M
5 \' E5 e `) W" C: N( o3 O |
|