|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' a$ C% k0 `+ K/ n( z/ FI posted this because someone kinda posted a youtube thingy about it :O.
9 G% T+ m x1 O
$ J6 H3 e$ K4 @. y; X1 ]' xFind this in DPSrv.cpp @ worldserver/ V6 k! z- G7 L: i. b& ^5 f% D1 @
) P5 g7 J: m( r9 B6 f, ^5 }: T
Code: A; T3 ?$ U; e+ j, V: X
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 ]7 W# J2 b, f, v/ J7 l4 ~, @( [
{
7 S8 L. B5 d( p3 n DWORD nId;
9 B5 R$ }, m2 K t; C! y* @0 n int nPart;# \: W. B% p- C4 w" I
" e' k0 o0 u- M' s8 e" y: M
ar >> nId;) U. r3 N7 x# j2 x# I, ~
ar >> nPart; 2 k _ o: Q9 j4 {
5 }. g! }# y' z% u* x- L% Q+ } if( nPart >= MAX_HUMAN_PARTS )
; I" x5 ~" X/ m5 d" ~/ |# J5 F return;
. W. p4 O, V7 z- S* O! W% f- g, ]
4 r$ J' O' s9 U. x, b* H% \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; q& x: B: K3 B! p( J& g& b1 X) b; K7 X) Q( p
' ?5 n' w2 e( ~. J& X1 U" c
Code:
+ G& }$ I) y* w& ^# k$ s#ifdef __QUGET_SWAP_FIX9 W+ {3 F! h2 d* g) d
$ D% P" O# }! W1 h: @ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 W9 V* M% M; B' r7 ?% g* ?
pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 {: U3 ~, z; o9 q6 V
' x) U" `/ U( J. h- R if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), }$ u7 d. b. o: C9 A4 Q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) d, {' O% B, O. q. N, ]) N4 I9 l- ?" q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
: f: ?" \: m* i3 s8 E$ j% w6 Q. c0 i" l, j pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ ?6 D. a* I2 K2 }& w% ^
6 i/ q( p" @) D4 I6 x: `6 m' V# O#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 n' I. Z4 G0 p. r
and add under) Y4 r x7 @$ ~, c
/ e/ w, ?) N( q6 z# ?Code:3 e# p/ [5 G+ r$ @7 ?
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
{" p' K$ V" Q! I {
( B& V6 q" G# D: o 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 );
/ w$ j1 g1 c' f+ ]3 z% z: r# T }this
, k' [& d5 D# ]) C! m& G! }! F3 O% }8 G K6 b
Code:
9 z; T1 B) \) A' D, r9 `+ s" g#ifdef __QUGET_SWAP_FIX" V9 h+ F' O" M) e: U8 x8 z* j
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# b* x" T; v S& G3 ~
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 q, A7 g: H4 W+ b% P
" d, o' n: t: }; V, Q2 j/ e/ K8 a if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 o' p ]# K# F' O, l$ C pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* p' ]: M: M3 O R z# @0 u
3 W" | q; t4 Y2 _ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
}$ p% g, C# _) i5 g- G pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, W: J8 _1 Q: B* J0 u7 v* t
% g5 v9 i5 X" n+ A5 r2 u$ a" u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 E! }, Y$ s2 M7 x7 f6 D2 o5 U8 T: A3 }3 e) ~* u" T
; l) g: R: q* b' L5 L8 Q |
|