|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% C6 B# d$ A# F Z" Q) |% mI posted this because someone kinda posted a youtube thingy about it :O.
& N+ n* V3 D$ J5 ]# E7 {/ I, r' h# U1 t5 B# X" S3 c3 l7 e
Find this in DPSrv.cpp @ worldserver
! X `7 e3 y6 ~# G$ K7 L/ T* J. J* R/ ~ ]/ C6 O
Code:( z) [: x l& i
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! K' d; V5 R0 O2 @" c{
2 N: G: D& `! e5 ~7 X DWORD nId;
1 L3 V% S" T0 V, \2 j% ?5 h int nPart;
9 Y+ s/ E; R, R5 I! \3 e5 w! X& e) p0 y: I+ j, F
ar >> nId;( u2 K% m# e# E( G* ]
ar >> nPart;
) S, ~' V* t) Z0 h' t ?7 A: J* D( v
if( nPart >= MAX_HUMAN_PARTS )
1 c1 W/ t; c! X( y# p return;
6 M/ a$ o0 y( z% @' B
0 ?! m- V' u( I) |* ` CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 Z6 b$ O) p) T6 D' Q: l+ d
& v2 r: s; K" N) O
: C+ y" o( ?' `) I3 {' HCode:
* v+ J, A7 q/ `4 d+ b#ifdef __QUGET_SWAP_FIX
2 ]5 r; l: N$ d* F* A
) S. v3 u6 p7 k3 s, n if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( b. W+ F/ X& V8 ]$ w* o
pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 H4 G9 X4 A# z- ]9 ~/ h; ?; A9 V, v J3 i7 G" Z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 l- g0 H: T* U7 H/ C) D7 K
pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 d; M9 b* Y7 z
5 f" ]1 l" }. v; K1 V if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 r/ [, A& |7 Q* q) B I5 P
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" |+ V( U/ K9 K% U* }# P5 r- ]( i! K2 E, g! L
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 u, o$ O, A% K; k
and add under5 s3 x* ]. ], J' K
5 ~* q" }; L3 P3 d, cCode:
2 j: K3 l6 D+ e* ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) c+ m$ }) G; U& C: M H1 d8 O' p
{; Z7 h( z6 P$ n* P" N
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 );
) ]3 ?7 w7 _; |& V4 {: F$ K }this* _. a+ n! A5 ^$ e' Z8 X( M
3 u- I( r# c+ I9 F' d, {
Code:
; K' P# Z0 ^3 [* p3 }#ifdef __QUGET_SWAP_FIX6 U7 h3 L8 `& \ y" L4 e) x( M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( r6 i+ Z6 B& `' h e/ z pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 |; q1 ^5 v& l% H9 K4 X) I2 O' _9 p0 w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )4 f0 S' o2 x* G. |
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* J# b% M/ {; _ ]" L
. T: f. Q5 Y" W if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): [: P. S: X1 ~6 ~& I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. _; s { |0 |! U8 ~, n8 w# ~& }7 V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( \7 O, z" [4 C1 f2 T% s7 i6 M2 |# Z. k, t9 y
/ w3 {! K" f K/ R) m2 m
|
|