|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! P' u. o8 f' i2 hI posted this because someone kinda posted a youtube thingy about it :O.
$ p3 t3 o# `4 y1 b9 I9 p! K1 q
) `; v# _2 f% l9 i5 w1 C J" oFind this in DPSrv.cpp @ worldserver" R9 ?2 K: _1 k5 o
* w9 g( U$ m) | \+ t) m- P! |
Code:
2 C" l6 V+ A5 Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 f; ?: o( m+ T) R) w4 X{
! `: ]- g- r' q* @1 c# [ DWORD nId;0 d# L8 [2 R4 k3 u$ R0 Y
int nPart;, Q9 V! V" p# p! r ~5 }, l
: n. n, w4 f- @! P/ q
ar >> nId;; \" f* P$ x& |3 v% b+ b
ar >> nPart;
+ P, n/ j" ~# ~/ a7 a6 c5 ] - k& f2 p9 O7 T0 `0 `. S0 Y* `
if( nPart >= MAX_HUMAN_PARTS )
- S7 l2 G" `; f return;9 P$ h& g; s( q- d" L
& I* l( v: G+ u* Y0 o2 v
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 m, @" N/ B: B! c S1 D
, ]& I# ?3 [" B: i+ F
* H% ?& q' n) l1 O0 HCode:
$ G6 {" }% v# m' N# |! i#ifdef __QUGET_SWAP_FIX
1 X' p+ D' f: h# h' q) q: z
2 M# R* N: n* _% @+ v% A if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 z+ S+ T1 {# t9 f" d- h/ G
pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 v) U' G) S: _7 T. o4 K$ z4 p
* _" ?4 L6 U+ s! _* w I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )' a, H0 \# F: T( }
pUser->SetManaPoint( pUser->GetMaxManaPoint() );- J0 y' c# X! o D3 n" Y2 G Q
+ N4 `' R0 j |- S$ A% M1 ?! s$ v" ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): ~! C# Q+ a4 C( B$ U6 l
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 z, p! G' V/ z. J' o
6 A. `) c3 u0 ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 {: \$ `# ]0 b4 q4 W1 v
and add under W# B$ ?# E! I, U/ A3 A) A ]
, b/ ]* H* z! W8 {. O0 mCode:! b, x6 p! X/ S& @; I3 Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ n6 N8 `$ y2 @6 i0 }: u; n
{
# w e4 i# \+ Z- A+ W5 [ 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 );! r3 j ^- }: G# X
}this
5 l$ E) U! c" }5 n! P( }
, u( C5 P# |% FCode:
( m1 R: d, }) i2 M#ifdef __QUGET_SWAP_FIX
8 F F4 \' a0 P; C5 T% G ?' k if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
- k( S* Z2 j' z: u0 D# |9 m3 R pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' a& F& v! L/ _9 [, s; W" c* D9 }2 b9 t4 u2 q
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 W# M# b6 }) w; y2 l
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 r2 x j$ J/ l2 h" N
, y% |7 R. I! D, e- K! m7 e
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 g% B4 O+ @; H! v3 |1 o' U Q5 p
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% k$ B; A9 }! U. v/ r @. l) T, [: Y
C ~9 W( a2 D! O [, h5 p2 V0 V#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) C$ G* F7 i+ z( G( n) n% t8 m) h! w3 p3 R9 Z
+ Z$ a7 H& _; x, b: {* R0 t5 U |
|