|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 f1 a# F8 v2 g1 z% BI posted this because someone kinda posted a youtube thingy about it :O.
) b: o8 `) `5 X$ N
S, L+ v0 I x+ xFind this in DPSrv.cpp @ worldserver
# t% N4 V: ?1 G$ i0 D, O9 g
; G/ ~7 s$ a# f* P1 k I+ b% t; cCode:
' O, o6 F; I5 l- k* @* I. ^2 qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 N% r4 D* S! e* M" q3 g{4 W3 _' o- I- H; X& f$ u Y* F$ r
DWORD nId;( S( B/ d! [7 E
int nPart;
: v. p1 t c7 s( _1 }& k8 L1 b0 B8 n6 ?! t8 f9 Z' [ L2 }1 _
ar >> nId;
4 d8 _% Q/ l! x9 ]& W ar >> nPart;
& P9 Q3 R0 ^- q! h- Z8 I' m
. p) L2 r" ^; E7 B8 w/ b if( nPart >= MAX_HUMAN_PARTS )
0 D$ Y( x; ^: Y2 t6 M8 a; V' A return;
0 u) a/ x. s4 p. s
+ E4 X9 M% ~& ^+ \' I CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 K% Q/ a; j- o
% b& e7 ]% r$ b& {# \6 C. ~3 H( X
, V! U. J; K4 L+ h) s+ Z4 SCode:
1 H# O% [1 ~5 L#ifdef __QUGET_SWAP_FIX
# l& K; p2 u s" b% D7 V
$ b; s+ P( S" N" U/ P8 m if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
7 Y' U! Q- M0 v7 Q9 G pUser->SetHitPoint( pUser->GetMaxHitPoint());, A- w; O9 J8 S7 g0 g8 ~$ `
$ m; a0 n( G. T5 z: s if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
0 }8 l4 S' @. ~& P9 P" N+ T$ A pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 U. R' Y6 H. p8 i$ [
7 r( k5 r; a9 ~4 q$ ^$ L3 z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 Z6 `' `: w; G. s( G7 F# H pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" B& d5 o7 N' D. k$ p) u. K
, j( |$ X, [( f8 y0 \: r9 e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
2 T: {; n5 l" g6 }5 Pand add under
; B7 S5 D) K: R7 j
9 m" x H6 Z: y, E3 _Code:6 s, B& ~! M3 |6 l+ p, p* L
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" d- Y- a( l: ]7 C {
* r4 L' R: \& K' I+ a; [ 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 );
. ^7 |3 H( }$ V$ A; @3 u' Q }this
* S9 F* W m, ?( ]6 y9 m4 d+ M+ @; R; y
Code:2 o/ J3 a& i1 h V R* d5 C
#ifdef __QUGET_SWAP_FIX
; f' u' T1 X, g6 u; w8 t if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) v$ v/ H4 a2 ?
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 z3 m/ ^) J8 Q4 S9 g
) g N- k- I9 L% [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" f5 d2 E- h1 p pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) R, A/ h: C3 G2 C& B2 Q
) p! I7 t( B6 z; f if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). S! D( q' G# S0 H. x" z, r
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 x L/ j- |( D: [1 ~5 K( i' V' L2 A$ c" z) D# v% h( h' F0 q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 N+ o: G' E# Y7 v( i0 Q- [ D1 z
4 P( L7 l3 P! K9 O9 V4 z" C. m$ D
|
|