|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked % @8 y% e% K8 }; Z! ^8 `* Y
I posted this because someone kinda posted a youtube thingy about it :O.- i* ]' o- X$ ~$ H# x) m; x# M! K
, D0 H6 f8 ^3 ?) U# Z& W
Find this in DPSrv.cpp @ worldserver
! f! y3 i) Z, V7 A9 u* R' K8 s7 P' ?% e6 R5 a K) F4 H/ I
Code:+ ]: H. o% H0 O6 t& Q/ `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' k& z! @3 o0 |! @{
4 X/ W2 D, l7 b& P; J. ^ J DWORD nId;
4 t9 U/ q) T+ C* r8 Y int nPart;
+ N* S8 M/ O( C [4 p- K% l+ a& h6 H+ w7 C$ G
ar >> nId;
! C8 S7 l6 T! Q) b) n- S ar >> nPart; * S/ b( h/ v' V _* L
) Q5 w3 E; R" t! f- @4 T" x if( nPart >= MAX_HUMAN_PARTS )
! s$ E: F, U0 w0 B1 U7 E return;
5 e) r3 C% @0 ~3 H2 D; }( ~8 X) L, J
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. Q$ C# D' Y) G! }% K6 [) ]6 C, d, K" ?. g+ {' b& k S& j, M' c- W% ~
/ R$ Q1 g' q3 {3 w4 `
Code:# O4 R/ V2 C8 _7 l, C& Q
#ifdef __QUGET_SWAP_FIX
/ p/ [# z# p, p' O$ y" Z! } c2 W" j+ B
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )0 g. T* {/ `3 A% S
pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 k$ X( a# I0 u" l. E: y( V4 F
- K; s# [- `3 X if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) \$ F9 L& k3 e% U pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 @1 t& W: [5 F* N. }4 g) L0 d
7 P: L! t/ K$ z7 v, X7 | if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
4 }- S# k3 c5 e pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
T7 S$ U! o1 M4 X3 R+ o3 j7 z, u _1 T+ V$ i! T
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! S, Y3 }4 I4 M: g2 c8 `+ Z( N. w
and add under( v! i0 K9 m u) S4 z2 S+ R9 {3 o
( ~8 O5 k( r5 u, Q
Code:
7 U' @7 B: K4 k Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), K9 B2 Q. K6 F; ^
{
: ^* b! J5 B* ^1 K6 X# E 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 );
% t3 z) A% Q* d; K }this
) v' s% z0 F o' _7 r% `+ c4 m0 u! F: M8 Q% p) N; j' I; F
Code:
8 T7 A2 J" i! @2 {* k: o# Z$ D8 \#ifdef __QUGET_SWAP_FIX0 |6 h$ L$ ~2 G4 E/ m6 I7 O! i
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% U7 a; ?1 q( p" C2 ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 k& D- o4 ]8 q7 R, K
# p. N1 e, v. ~6 S+ ?. P' v if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
: M4 Q% P" D% Q& ?6 y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 K3 Y& n% v; V7 p: p4 m! m. ]1 j/ }1 e' K) w) x& J, Z/ K
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ E5 b7 A) @! z' P
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 ]) W# W2 M9 G2 P8 O! R
5 e8 R6 d" C ^: w4 s) l
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 C& o! w2 \' V5 X! Z. U1 R+ o5 ]
( ?0 d" c3 Q1 Y' D
, [1 p0 g, Z( r5 a' j* G |
|