|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# X/ R: y9 O. | XI posted this because someone kinda posted a youtube thingy about it :O.
" P$ ?- Q" V( x% z
+ O4 C) x, h4 y$ bFind this in DPSrv.cpp @ worldserver) V" p8 I# ~. }! U! @4 B& G& S
5 N$ }& w6 V% N) Y
Code:
# _8 |) f9 M) c; w5 o4 _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 \5 m. [, c/ @ `{& A# `0 g _5 |8 }2 N* u
DWORD nId;
k% d9 _: y* R+ I$ i3 f int nPart;
8 i7 U" l: R9 \& a `1 H+ P6 v# S7 Q* I. o! c/ M/ _; Q5 T
ar >> nId;* C% A9 Z' T4 e( M) a
ar >> nPart;
% N( |* X0 ?% [, I6 C6 l
0 Z/ T, N+ N. \% R# ? if( nPart >= MAX_HUMAN_PARTS )
! B% C$ O+ P9 q6 F' } return;
2 H" F& |6 E/ \) ~' ?7 z( N: s7 w, ?1 ^* w# t
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 d( N( J( m9 E& v2 C
; }0 I. H( N; b1 s& d& g5 ]
+ b8 F: O0 M y/ N
Code:
2 i1 L) D3 s. V% \4 B" @#ifdef __QUGET_SWAP_FIX3 @! T9 E) x$ }+ ?3 m7 r) |
. ?" ]3 L6 _; O$ P
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ ~/ ]9 p4 l+ r! X+ X X5 [; C' D
pUser->SetHitPoint( pUser->GetMaxHitPoint());/ C# ?0 T+ E" n
# C) @! Q. |$ j v0 n+ b+ E" \
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 L- u2 d: r( ~2 y) G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 e* g' }% Z* S8 y, v ^
4 v6 E( r4 J1 V3 W1 Y) k
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& l: Q! a5 r. h% h- i1 {+ G3 L3 z pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 @: e0 X8 v5 q4 P7 I) @1 C( S
1 F! V+ Q2 {3 ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# W( l0 L7 g( R, r' ~3 H
and add under4 n$ R( M6 `2 {2 q% q1 O; \: ~% V- B
2 U' x6 e& z& j. ?! z
Code:4 `" V) h A) y1 J, T1 N( ]: o
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# Q8 W5 ~0 q/ D o
{: O$ a: y' l# k/ `# 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 );
) e! _) v. v) \0 D% u }this3 V& S0 f; n2 K. `& m
$ n. |5 K: U9 @" A' L w$ y" U
Code:" s5 ^' c+ \. B6 I3 G' |
#ifdef __QUGET_SWAP_FIX
2 n8 x# b% Y$ p$ C4 j if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ i$ Z2 _. @* M( x
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& V, `" ] t8 W2 Z
7 r0 v" S3 c& h0 M# G# P7 ^6 k* I if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 a2 i- E! T3 u8 d: A
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ K* v% f5 j* u" z( u6 n# n: f3 q. F( E" G# |+ R
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# ?8 Z8 f% s* S7 \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ C/ \, W( E9 c/ Q5 t
2 J- L6 d! G; T
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# q9 x0 C7 b1 S+ a d9 W
& [6 ^7 N4 `0 K4 Z, p K1 h' O" J+ g' r$ G, h& o% d7 n
|
|