|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked + f) Y) G4 S! O6 n' V U/ N' D
I posted this because someone kinda posted a youtube thingy about it :O.3 ~2 \- O2 ?( N k+ {2 _' M
/ W7 ^' b% d" w. W- g
Find this in DPSrv.cpp @ worldserver! t4 Z$ A3 x: P- p! ?/ Y! Y
) K A4 [4 z. M4 [Code:
/ ?. F5 p- {& ovoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 w+ w$ u2 R5 m2 m. m% v3 x8 ?, ?. s
{
- k9 w9 s) C3 v$ Q& J- Q0 j DWORD nId;
# ~$ x* P2 P. N. _! D8 P/ G& k int nPart;" Y0 G8 |; K2 j" @0 r0 j$ A
+ b$ f9 u" F- y/ j! m; M- ^' L+ j2 D
ar >> nId;
/ I' Q/ o6 F# Q- V8 G* }6 W ar >> nPart;
$ P+ b: X; ?6 L7 Q: {) u" M2 X
. N# o: v$ n/ {; j4 c1 `2 e. _( _ if( nPart >= MAX_HUMAN_PARTS ) . T( O' A" @2 s/ c, G
return;
: O F k6 `9 |2 `: B! T# Y9 _# S& H$ |5 f$ m
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 C% Y2 {2 ^: I, w6 y- u$ X
: R/ v m% a9 _
! I3 I. z: s' |3 H. a4 bCode:
' d) \0 W1 u9 L5 J! d' j#ifdef __QUGET_SWAP_FIX9 q3 P+ }: d% o
( A8 Y. I1 {* f6 [ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ t$ V) y U/ J% a- }! f# W8 I
pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 s* U+ _3 R/ B- u' v6 u
7 A) C4 W* ]# T7 x if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 o7 M! m. u f" @
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 q3 m2 o$ i( _+ ^+ k' U3 v# G8 m$ b! t5 O7 M& I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% ?1 X) M- Q0 D. P! {
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 K# X3 n- i+ b% R( X
5 V# Z$ U% [ ]/ F, p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* A8 K1 F$ t N! b9 Vand add under5 m; d' Y1 [! w) _) r) o; ?
% ?1 [* X0 R, ACode:
4 O* o( g: k1 yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- H E( s3 a4 m) o
{( z2 g( v- J' L( k$ y
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 H) z6 o; T2 n3 v8 c% o
}this4 j( _5 p( T7 S0 C3 R& j* F* L1 B
8 q; B( N- X) d/ k
Code:
1 r% C) j, v/ w# D#ifdef __QUGET_SWAP_FIX
9 R& }! o2 Q7 E9 ~- H) U if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: c" G8 `2 h9 X. R2 Z y& G$ T pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 V% A3 ^. i" l G5 f0 m
7 D' T$ D* w: A4 L5 O
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ ~+ j9 s0 B. J) M pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ j* C7 H. Z, I, |- Q% ?
7 D5 S0 ^# x' N: H: D* I if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )9 q0 Q% H. Y, E$ j+ w" _4 J; Y$ u
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 q4 b3 S/ [& N0 y/ K
1 M' y: {) C5 d, N% M: H" g$ R7 d8 v#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 Z4 S- W2 F9 E, C' `+ j# Q$ v8 m
3 B$ ?! G4 s* Y: X9 ~
( V4 p7 Z7 H# |8 f# S" ~4 n
|
|