|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! _2 j2 Q0 r* K4 @& A) z* s
I posted this because someone kinda posted a youtube thingy about it :O.2 E2 T1 e- m' @
% l) F0 T' p( G* o. o
Find this in DPSrv.cpp @ worldserver" {, t, Z( P0 m9 K
8 G% V& @- |: M6 m9 [% t
Code:
: v' f+ J, M4 D( Y V6 m8 Hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): ^" E/ x! s) o9 R7 \* g h- S
{6 Z6 ^, B+ H7 ` k8 ~' j
DWORD nId;
, A/ i- R7 a: s! d int nPart;) P I5 [# p% V% U1 V- o
5 }! z5 l. q7 Q9 L ar >> nId;
; w! `7 I: v& D ar >> nPart;
7 P/ Z/ ?: c/ p+ }) ?7 D 3 H' ?2 b- K/ z0 O
if( nPart >= MAX_HUMAN_PARTS )
* R7 f/ ~, {- O' j return;0 G. m! D) O8 h0 F. T$ l8 ]& m
) Y5 L0 V" _0 O& @! \- n CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 m) y9 B. l) ^0 t. H) q+ G" R
* F0 H& f( d7 g$ Y% P$ p
4 G) |/ ]4 w" @, g7 hCode:3 t8 e: \1 {. S. a7 w! q
#ifdef __QUGET_SWAP_FIX* l6 [; M1 ]( m6 F
3 i7 L! d9 d4 H if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) V$ N3 m( C6 `' c9 y! U pUser->SetHitPoint( pUser->GetMaxHitPoint());- N" x6 q: ?/ X8 J
. `% {: W- o4 L if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 x2 w) L" r& h6 W5 \8 X, S' r- v8 M
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- p& t5 ^& K, N |7 U* D2 ^
+ j# b3 _# |% `, D# g if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 o' P1 d* U n. ^# G
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; t, }/ A4 F$ L2 @7 T( p, D; d. w
% S( s1 z4 e$ ]+ U3 \#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 b& j+ u& i F, l& T+ C! M) `
and add under
/ B2 h* W/ m2 c# l9 N' p" O' `! {) _3 ] i$ ^/ p) ]2 y) G
Code:' H8 ]/ G! p3 W$ q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: V! @4 q/ `, o6 }* F+ P {
9 z" _. l) @8 g3 ]% R 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 );
, b- D) b* g: x }this
9 H0 w$ o3 a1 j3 z# B
; G6 X1 _) C, {5 [+ E$ CCode:- z8 t p. l0 `; v1 E6 @" t
#ifdef __QUGET_SWAP_FIX
5 s% Y3 E- A \" c) A+ S if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- F8 j6 d! _: l) F
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! \* N: ~9 A/ A+ p) V
0 S0 h* b7 z' V0 j8 Q' H if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( ]* `$ S4 R& L! C8 M8 f pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) P7 v+ A/ u2 z4 {# P5 e- j+ a! w; D' Q$ T- F% O' _
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% Y. G9 q) m* \- V pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- ]6 ~" G8 M s" [& k
, p5 Q2 k D9 e8 s#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver w) A( X2 ^5 L% W" d
) H3 [( ~3 G3 D1 E+ V8 u, i8 r2 u( @
' {9 t# r- X! M0 B3 ~1 T) Z |
|