|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* z9 b/ F, o2 J0 PI posted this because someone kinda posted a youtube thingy about it :O.
4 O3 c' e. o; U
5 W: r6 i. X$ E4 R6 g! ^Find this in DPSrv.cpp @ worldserver( q0 C8 e2 L0 r. Z) H9 B
6 \/ ]6 l; P6 sCode:" K% {1 i9 M) \% A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; y7 R3 r A; _( Z' r! H& K' l{/ {$ j( N' t" `" W* x% g
DWORD nId;
( n( F! i# v$ s1 ^) f T% X$ H! h int nPart;
* P: \5 u7 f" P
( A: s6 w5 X1 C4 x2 ] ar >> nId;) p# _ }; V6 V2 ?) T$ I
ar >> nPart;
! |6 l! |& Z: P4 b+ ] 8 h; h( c7 u' V. h( ~! ?
if( nPart >= MAX_HUMAN_PARTS )
! B9 U* W2 W# g! I1 Q return;
' X! R) Y/ H, {4 f3 }& O5 q
E. I$ M: `5 p& W2 ]0 ]1 o CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( U! y) X" g; Z9 ~
. ~2 M! P; ?7 |9 [+ R, y7 s, n: g
/ I) p: w$ {0 T! L, @/ pCode:
+ D: I1 L0 B% p- {#ifdef __QUGET_SWAP_FIX3 `( y5 {+ @, X0 o
# e% D4 n; n% z6 {# _) Z d/ _
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ B7 c A1 X @6 U
pUser->SetHitPoint( pUser->GetMaxHitPoint());
G7 W% W' _' [' a( l
6 H2 A3 h) P$ y' m7 t4 Y" ]' ` if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' }8 O4 i% s+ j3 i* Q1 u pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& n3 g2 K! o! h- t# J7 v
" W+ W# g4 I0 e4 i" W1 J if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( i( N' u2 [( B4 z/ w$ R pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& t4 I% P" M1 E
) t7 ~6 e, W7 R3 n$ m! h3 ~; U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; S D7 p* z+ B/ Dand add under# t/ w; x. ~# F5 N9 W2 Q# X
2 z; B4 [! o3 D: y9 M) e
Code:
0 c' |) w8 B% F1 `+ t2 L0 \9 k' Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: _& T1 t& `+ Y2 E" f' I, [ {
# V5 A' L& q& w 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 );
- n& J; A" ~6 }5 N; e v4 O }this
( _/ c' x7 [ ^! S& q
" B% t$ d' t/ {- z4 j: ZCode:9 q4 T- [, v$ P9 V' b" S* c
#ifdef __QUGET_SWAP_FIX
! R4 ]; U8 g& p4 r4 h if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- e! n7 k' V8 F3 D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; W( L9 Q1 I; o" O, c# `
0 ?/ _6 ^' t& I _& g5 { if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
2 z3 Y; A; W4 [# _ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 w5 G5 [/ h8 }; @+ Q) v
/ A7 f3 K2 M3 q0 T: y$ t
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 ~) E" J9 a3 {$ n2 d' P
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 _& y4 ^ q: Q9 L9 W( C1 }) ~
2 d( x5 _3 e6 v- g/ i' R! K#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % h7 p) h6 Y" T$ X- z
% s6 I1 v {3 d( L
! K% x7 L9 S5 W, t" Y, _$ A
|
|