|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ a: T/ @7 d2 `9 aI posted this because someone kinda posted a youtube thingy about it :O.. U) v; K" l) k. T* w/ S4 `
/ D( u" F9 Z) K: h) ]9 g
Find this in DPSrv.cpp @ worldserver
$ e; L' v3 q4 @& Z6 P4 S( u3 p
( d Z$ }; N- x6 ?/ oCode:
9 N8 n# d% X# A1 j4 l. O# lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 B3 Q; j" D) [
{2 A, K3 O* L# B6 g1 v2 c
DWORD nId;9 X ?; t" r/ S$ i4 `# b3 `+ A
int nPart;
3 K2 `; X/ m0 z# w( ], @* k$ w
4 [+ I( e! y n$ A; d1 y4 J ar >> nId;
! L$ d6 K3 i e ar >> nPart; 4 _) m7 ^% |% O
" b z6 ~* A1 c `% J8 M3 d5 H if( nPart >= MAX_HUMAN_PARTS )
5 s9 Q8 y$ M, f5 X& ] return;
1 D" P+ B, a5 ~1 B
& d. }+ ]; ~& j: n2 r4 w, \( Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ b' H0 `/ g/ Q a1 R5 s7 R1 p( k3 \+ j) A! J ]6 C
' v8 _8 H5 y$ }9 e& E
Code:
* L! n: R/ h2 h% J; t* w4 Q5 p" w+ l& N+ ~#ifdef __QUGET_SWAP_FIX' D! k0 J" G" X0 G, o* L
! F$ T# D5 ]8 g/ |, A1 d if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& i1 g# j: d5 o9 p9 |* }1 Q pUser->SetHitPoint( pUser->GetMaxHitPoint());, h8 c: X$ a4 n8 k5 F s, C: i0 g6 B
5 E5 A" g6 B2 L- E3 e if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 L% x" v/ X" |! }0 l3 H" O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
; f2 ^* N! {) \! N1 Q8 u) t9 ^5 j) L7 t0 y W0 Z4 \$ J
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )/ G U4 p" l) J; U( x
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. f, a) N/ G& U" ?( ~7 d
- l- Z' G1 X! z* f' d. i/ _6 z% g. [( I#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! _0 s4 Y# y0 I: D. _and add under
v* z9 }0 w0 F3 [4 `4 l0 W" e$ {* @1 \. W4 L
Code:
. H% i2 E2 v6 t7 kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) {2 B+ I* c& l
{
0 K2 m- W+ A' M Q& }" _) 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 );
# _. W* P1 s, |6 |7 e1 h- c }this
* A. T! c& \1 e; y' X- b f! k8 f
' ^: K' b3 P7 [& x$ N- h% w9 r% z$ QCode:" r6 p/ k1 U4 C) K* Q% j4 ^1 {
#ifdef __QUGET_SWAP_FIX
1 ~) N: U# Y0 p9 f" w if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 o. U% f6 f" s( r, m2 c
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' t# {' x* d9 t1 e6 \7 }7 ^4 ^* ?, J6 w) t* `- h+ K
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 `# ~$ O8 J2 _6 P9 ]. A
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( B) ?1 ^; s K* H: n* j9 M/ v5 G8 J0 H( O% k
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 o2 a* D0 I2 ~4 N
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# C+ u$ b2 p0 r9 }6 U% `
* Y4 b, S% ` r. a3 C8 k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 N9 b8 r. Z' g
) W: G$ F7 z9 F) H5 V6 y$ B, t
5 S+ s& o$ l }) W |
|