|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 C' Q* Z; [* {8 c9 @- R; @" _
I posted this because someone kinda posted a youtube thingy about it :O.
# u# f. p% L( N! P& ~1 {8 l
+ A! K5 c U/ |* kFind this in DPSrv.cpp @ worldserver
9 D- |" C1 S# z) E
! W! B' @0 d8 ?3 K1 M! h% A# L% ~Code:* x: f. X& P3 s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! D1 H! E3 C$ |1 I, T8 D$ A/ n
{
( T% z8 b1 m& g M" c DWORD nId; P" I$ e V/ o1 s" X- g7 _
int nPart;7 J7 b7 a, ], V2 D$ m5 ]
4 c6 t& S+ z9 e1 B ar >> nId;
7 X9 i/ D$ U/ d. }7 v% o ar >> nPart;
) ?- j! i t3 Q& w1 q0 ^ * O( s* {! N5 J( d, R/ Y
if( nPart >= MAX_HUMAN_PARTS ) 5 e2 T. d1 |9 R' w; t- f O
return;6 G1 f! a( E6 q0 U
7 g8 c. m9 E# p5 e# Q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. b2 X7 S y* I6 s# L0 }
0 h, ?+ c( a" z* r
/ o7 z/ b, T" p+ J% y3 p4 z
Code:3 r+ f1 A2 q& a
#ifdef __QUGET_SWAP_FIX4 v! _6 o1 Y6 l- r* y
& I/ `' f# s% D2 u( p if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
3 w+ m! {: S4 A+ l0 E pUser->SetHitPoint( pUser->GetMaxHitPoint());9 S3 I, W, w* h1 d
3 j2 t* Q+ p, A' c, {% H if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% T2 ~# s7 j( Q. J; u6 n/ v4 Z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* {: E+ y7 N2 B8 M8 o
O% x E! I6 L) _9 y% s( v if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) x5 O( C4 ~/ V
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) b: h- R9 @# c7 y
2 b* U) d; [9 s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 x U/ C( G6 i7 u7 Z2 i/ Q8 `and add under
3 Q+ L; L% V- K0 L$ {. y: |! `/ V3 I- M/ i' m5 W2 J$ I0 ^! a
Code:
& }) E1 J# I3 Y( c; e- {* Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
) a& W! A \4 Y" k0 Y4 C { C5 B/ M9 s! r! C Y
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 );/ p2 D" N* S' \6 ^$ i- M8 k+ c8 u6 `$ J
}this
0 K& x9 m6 B: m
% A; r# j [2 C, H3 D' e/ [! X$ {Code:3 D; S' _2 ?! K
#ifdef __QUGET_SWAP_FIX+ {; g* A% V% S- b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# J( ~# l/ q) [5 b1 `, W2 M
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, J3 V* ]8 U. g( S! I; v
" R* E2 h- D; F" |) z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ t% M" Y9 G, ?1 a4 k# }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 I; T3 b" C2 H: n5 `0 }4 l. s( V! b1 o% S% b* y" H$ j& b R- y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 ^% a W7 X9 n7 r5 K' G0 ?
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 B; i6 E& G2 ]7 p. V- G) n# W! k! K) |2 ~( b# p
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ; p: z ^5 a% v; ]4 P
; T) U: ~* K: r- c& I; t4 f1 ?+ i/ F) w/ u# X; R
|
|