|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# r; V/ x5 c& {4 T7 nI posted this because someone kinda posted a youtube thingy about it :O.0 L4 ^$ R( x# @0 P- q7 H
5 `1 q6 [ e* f( m( ^: P4 Q OFind this in DPSrv.cpp @ worldserver' O8 k) N" b8 }; R4 x
) e. x+ ~& g" b# {0 \: O2 {, UCode:0 g- \6 ^. V0 K% W2 }
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); ?" A% g( \/ m7 w" x5 W
{
1 o2 N6 i/ T G( f* N9 l9 s+ K DWORD nId;1 n# B( l% W% z, ^! G" i2 e& a; w
int nPart;8 c+ C1 L% s' e% \
) W; }' d& I# W' t W& [ ar >> nId;* _, A. _! `2 U3 X& J H3 @6 H% ~
ar >> nPart;
& N& X6 |9 l, @ Q p# [5 S; l5 _6 M
4 n: ~, `/ f& e4 i, B/ M if( nPart >= MAX_HUMAN_PARTS ) # ~% T, p! Q. j$ e$ ?0 Q
return;: r/ Y4 ?; y& v* o: u
8 y6 Y+ m9 H0 {* g8 D& ]( k
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 [+ c E! @1 G# y$ s3 j) L
v* J6 [0 P4 d& r* t
/ v w* b% t' p! j' K& T
Code:+ I, \5 Y/ ~( ]2 m7 S4 ]4 E2 {
#ifdef __QUGET_SWAP_FIX
9 Q. X, G' o' |) [( E8 R% ?6 t% ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )6 Q% z! i, t8 v. s e5 V$ [
pUser->SetHitPoint( pUser->GetMaxHitPoint());
* V9 v5 s& E: o5 `6 Q$ `1 `2 h0 J
1 |- q# H$ {& ?- s3 A if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 \, v7 x2 r4 u2 o pUser->SetManaPoint( pUser->GetMaxManaPoint() );! M) e2 ^; ]& q
8 c: V, h* w# H& l6 ^- c if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) z/ k$ }' R& ]: R6 q3 ^5 i8 F1 _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ G: g2 z# j" V$ F
+ K3 ?9 m5 U: H0 ?. ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 M/ `" B$ e. s# Q/ Z
and add under
- y0 Y* _) P0 V4 Q# V. h G9 A3 Z2 q8 e- k. Z+ d4 ^$ b1 E
Code:
, u7 ^: k/ h, A; @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
Q5 q9 @4 }+ s `2 g+ | {1 z$ k; G% `7 a- d" z$ F
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 );) L+ C; L. y7 x9 A3 l6 r. T- ^# b
}this
7 L- u v# k" S3 t' S* r, I5 k2 B0 j5 K. y6 k5 U. Q9 j! S
Code:& N6 A8 ?% u5 y* \$ y3 M) c9 |
#ifdef __QUGET_SWAP_FIX
6 R/ |/ p8 x8 d! i5 _ V/ E7 c if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 j$ ]# ~% k9 g# l9 o9 G pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: V4 G: l2 g. a( D" Q6 k$ F5 _% q, C. ^ K# f* E4 J
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 o) s# i& }+ t2 G0 {1 e. |( i
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" D; R; J0 u3 |6 p @
- H# c( R7 E) V1 C- t* p6 S if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, ^- T2 d9 I8 Z7 ^/ l pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! N. d. X) S6 F4 G, X$ i) G/ z( A
6 P, V! Q4 X7 }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, M( Q) ?3 b. p; a
$ P) D; x% ~7 O) G* C
( r0 ~( k0 W: m8 E) C& |" L |
|