|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 x' N+ [) j: VI posted this because someone kinda posted a youtube thingy about it :O.
0 e: @0 d7 b$ [! o5 @2 x4 z* ^+ g& H6 O& |# Z
Find this in DPSrv.cpp @ worldserver$ z2 L# k; p7 n, s$ d
* E& Y9 r9 D% ^+ r3 O" I% N8 G
Code:
' _- |3 \7 L1 qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 i; f/ \9 i. ~6 }) H( e4 d# H
{/ Z$ S$ a4 @8 O
DWORD nId;
; M. x( d/ ~' l int nPart;+ N- S1 N9 ?8 Y
3 q+ Y! v3 ~- y) s# ^1 I$ s0 t" R
ar >> nId;6 J6 {. ?7 I4 M/ ?1 k/ S! j/ z) a
ar >> nPart;
9 f( F* d0 ^! [) ~; k " X0 V+ v2 y, H
if( nPart >= MAX_HUMAN_PARTS ) 8 u1 \& X5 I, B$ r: C8 O) z; j. F
return;
( O! }$ w) E6 ~1 Q! ?2 I2 ~4 k+ Z: w/ C, b$ L# [
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 h9 ^' d. I+ D: K E
7 u1 a. G \4 Y0 x8 U% T0 n" w8 T. R$ h/ x' \3 [, j
Code:
4 ^1 N. ? |. p8 H k0 _#ifdef __QUGET_SWAP_FIX
' Q$ g5 U" O& U/ ?( Q/ i' M, K' J) f0 B+ D" h
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, Z% w6 I" c# r" ~ pUser->SetHitPoint( pUser->GetMaxHitPoint());: J+ }; {7 v4 ?# ?, Y ?; f
/ x+ j- }" ]# l9 F/ a' T5 e4 X if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 _5 I5 T, d9 p$ J' v0 i2 M
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 l& W+ e2 x8 _: h, I( M* E+ n/ K W. e
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ {. z# Z* V+ s5 D- e pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; {% j6 [6 G# J0 e$ H, O0 A
3 x, I/ `8 x# I! W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! p6 s% g6 T& o. P
and add under1 Z6 @& ?7 _, c
9 N% g X* t, b& k4 W# ~/ J1 TCode:! c4 j: q0 w5 H: G+ g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 I! m( }9 p7 I q! A$ y# O
{5 _: X1 r. R t* V0 H/ P
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 );7 {; V. s' m, i7 h9 H
}this
0 G/ C# k( t* I$ f! ? F6 r
}; \) [1 Y/ _, W3 ?9 wCode:0 A& M: K. a6 n! P7 \ L6 G
#ifdef __QUGET_SWAP_FIX! r7 j( f' H5 \/ v, ]) K" [
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 @! \# K# r% l
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 m- G4 y# s& @+ K* c( [
2 S c+ j. A' a8 c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )1 s, G" ^2 m1 R& y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 F( E6 U% u4 }6 j* C: z8 Y: E8 n- g: b+ t9 }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 i6 `! Y/ R3 w9 d& e" y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ [: O; V, g. g+ d6 R5 H' r+ U+ H" K$ E0 F E" r& Y) ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 R8 `" J0 k0 j" m w9 O4 T. D l
) o4 S, k/ M+ q7 w' r, Z0 n# Y$ n7 o) f; l4 F7 P9 A5 j+ W
|
|