|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' p. p) X G0 {9 b1 ~( q' PI posted this because someone kinda posted a youtube thingy about it :O.
; W' u2 c) M% |! x1 U5 e" N2 z
2 I4 P* h# ~6 S qFind this in DPSrv.cpp @ worldserver
- k, C8 @3 J( I- M* s# B% ~2 V4 v
Code:
+ o- D( s" Z$ mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* d1 d( r# y( A{
- |; h% J# u8 V3 `) x0 N6 O+ F DWORD nId;
2 x: b- {( N$ R8 `* W1 K int nPart;
) _% Y: R& F* R- k
+ \3 m- H, ^7 e+ g: l ar >> nId;* A, r8 I/ z! b5 [- D0 W
ar >> nPart;
' V+ O& V% l: n3 M' J% M6 ]8 p % T" f$ y6 I. J+ I, w( f6 n
if( nPart >= MAX_HUMAN_PARTS )
~* R: b& }9 }' C; E$ t* o3 Q return;
9 O4 x9 T" H9 d" k- Y
$ Z1 G$ J& ~6 T CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it* l" H8 l x! n
# [* X! m& o1 g: w: d3 }) `. m
! S3 b& @ A, ~& D* P
Code:# ~' K2 L9 Q2 }1 E. x3 h
#ifdef __QUGET_SWAP_FIX
0 |4 J$ G# `% @: j2 N o, w& x( U; r. Y6 r2 A7 ?. G9 ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 y l% b7 q6 z/ E* e/ a; S
pUser->SetHitPoint( pUser->GetMaxHitPoint());. S- \5 k5 h* m, H- `: D
' E2 o, s& M" J$ H% P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 G# Z6 x" d- t/ D, s pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ x" C6 ` Q4 m5 O; T& n4 X
2 o8 k3 A, G0 b4 M5 o9 x
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 D' s* s9 H- v3 w pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; i7 z6 \, w+ n, ~# D3 l+ \% {0 Y8 [8 B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. R" g6 z, @% \2 `& G: ], t
and add under
- S( K" `) Y. c* L1 k2 J6 ~2 ^' ]2 L O f Z% V$ K' k
Code:) |( M8 ~- U8 X
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' i$ z: K* u, z, c6 p
{
& ^6 j' Q8 j$ K; h1 _! {$ E3 p 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 );+ P8 s9 w4 M& Z8 ^. E3 {$ y
}this
4 r, P! j' s: F$ ?8 Q+ ^! Z d* t
+ k( w4 c0 F1 P! T' c+ X8 QCode:0 x+ Z( i+ B7 n# c9 F; q3 T
#ifdef __QUGET_SWAP_FIX
! t q$ s" N6 O. W4 i# ~ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
! z, h# N1 ^* [0 O2 a pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( X0 p( b" ]" T6 A. P' x8 X9 L" Q5 ~
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 K' H- w$ `1 J. j M pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; O$ \, ~/ Y/ p# F# p
# l& v! L9 {7 J8 ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), E" h; m! s* @ a$ }! O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; B6 n( c4 s v8 B& W- ?/ b5 g. D' i0 G. d
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) I3 [1 Q! ~6 }2 W- [8 _
/ f8 G" f# {' k8 w: e" |. M" }7 M% L) {. l
|
|