|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; O e$ D! }' }& e% Y% o% oI posted this because someone kinda posted a youtube thingy about it :O.
9 L) s& i& A( ]/ t9 V. A
8 y' p" y( J& eFind this in DPSrv.cpp @ worldserver
# ^4 _+ Z; V4 p8 P0 i
- o% O. h( v' iCode:
1 B. I( X1 |: A; W9 _: S( Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 `1 B# V1 ?8 u5 J& s7 _$ L; }! p
{9 p; Q( s6 j! K8 j2 v8 @: l
DWORD nId;
# N3 |! `# ]; ^- [, m int nPart;1 u( h* I% A+ ?, k# K5 I8 w
4 g1 b% Y! ?2 y3 m ar >> nId;
# m6 u1 k; Z3 D% E ar >> nPart;
0 b, E" i; v% H8 p" Z9 [
$ T! u* I7 c" J) V x# t) V if( nPart >= MAX_HUMAN_PARTS )
; d/ n/ u8 g" J' \/ W5 g return;# z9 L" M( O: G! [0 n1 l1 C( h
% z6 A. |. w3 Q( K CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- k1 r( ^ ~5 t7 |) Q# Z/ u% U. B+ X8 ?& _5 m2 y2 ^2 g! R
; M0 V! Y: H/ P3 G+ }( a& @
Code:' \$ K1 f( J: C& r- x& M* {
#ifdef __QUGET_SWAP_FIX
5 T4 H! I/ }. u d1 d. S5 H8 [; ^/ Z& G. n, g8 o5 g
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 r- {7 V' }' E( ]9 w! w pUser->SetHitPoint( pUser->GetMaxHitPoint());9 C( X( |6 }; c' {
$ k4 U+ y9 e% B% l
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 {# m' x! C' r, [8 p$ ?7 Y- e' f. V0 @
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- j6 d* F! p. o4 M1 A
+ z( i4 C e5 f. l5 n# n
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 v ^' M3 g7 ^: x6 B0 L1 A! p. b pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& `, O" d6 z% \- ^ V
2 p/ n" R A) K3 g#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
! v4 H; H: F7 @and add under R8 `6 {! U+ f
, d% r, L- @0 ]1 h# w/ j' B
Code:
8 u D; E% @, ?6 W& hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 m) o: [& U+ \& C5 k( M# C {
! l! t6 w) j4 Y2 { 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 );
- a. K Z. I% T. ]) G/ N* U }this
/ @7 j5 q5 L% `1 u6 c m! k
# F3 S, [; P# z8 [& oCode:
/ g( W- u* ? K/ z5 U+ c: ]! [#ifdef __QUGET_SWAP_FIX
& J" A/ s- e/ ~/ c if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): h2 r& J/ i' L( b
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# ^. P: O1 f3 d$ t
$ l; \1 r( C0 p2 ]: Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 |0 o: ]- p0 H8 @. W pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ H; p* t+ f. _4 p
: j7 L# V M! \1 p' N6 g6 Y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ); X7 u+ I8 D U8 `3 ?5 b; H) j
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ N" d: E8 o( c! O7 S$ T6 g1 e2 M9 H! ]. ~) M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 B! g4 v* O# n; ^
6 W+ K, M) s. }7 L
3 A: l, W/ `% D& q8 }) E |
|