|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
0 z) F9 c' f# @4 cI posted this because someone kinda posted a youtube thingy about it :O.! {# G3 Q/ ]/ M/ V& e( T5 ^
" k# s6 g( ^) }0 d
Find this in DPSrv.cpp @ worldserver, Q7 ?" O& A' ]3 ?' f
' M) a+ [. b, f/ J
Code:6 [' z( n' E# m' v! r! k
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; q% E1 a/ z1 A- X2 s: ?! U X* d{
. t& }* ]3 L9 v8 _- Y7 h DWORD nId;- H; M6 t/ z5 ]* c2 K0 f
int nPart;
, a; N ` k% ?* p/ a2 |: t; R; i8 @- ~) P& h" v! y) i# Q
ar >> nId;
6 U0 u5 t" {* o. x ar >> nPart;
5 S2 i% A0 O. a
/ T: h1 W; }$ O5 L% Z/ \ A! u, C, M if( nPart >= MAX_HUMAN_PARTS ) 8 j8 ~, s0 E5 r1 b2 P9 ], Q
return;& {, M8 ~* X$ E, q! h* ?
7 b" y5 D! s/ U3 @( |, i% v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ m; k% b! _5 ^, m1 q- ~2 \- }3 O6 t0 f
* `7 `) _1 [ U& |! ? qCode:
4 a4 t1 I6 m0 V' A#ifdef __QUGET_SWAP_FIX
7 K0 }& B' O8 J- ?* R% |0 K2 U; i
7 O0 \# Y+ r f4 h* V) E( g6 T if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ D5 t) P* J0 S. F- ^2 j% ?9 b
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 e) S6 o& p" H7 \/ o" Z" D' h
6 _* U2 Z! ~8 Q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
i5 B6 @& J/ {- _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );. @+ B/ E* L: x9 S; I# G
! S, V- {. B0 z1 { if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 n/ o/ Y) ?: ^$ g pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 w- H. q1 s" I. E+ R
1 e5 C4 z2 e1 e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" s& @# X, {/ d4 Yand add under$ u8 U6 x8 O, v( V
+ p0 F. N0 ?# }( ?9 z+ g L. i
Code:! g: s! m7 F8 O) [2 a A \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! Q% P0 g8 x- \ U2 f' i) w' Z
{6 @5 R" l3 t# f. X" C1 Q+ E# }
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 );
' U) ?. i( {/ k F }this
2 X: y3 j3 g6 b* s0 M, a2 g& x- [' z- a( ]+ W' d. F* @
Code:
0 t( v" U/ j: B! v+ Y7 D#ifdef __QUGET_SWAP_FIX
1 ~; w+ b4 c/ c7 {9 G, ^/ E: j if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 Y4 N+ T; T; q( Q4 X A
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ @1 r5 F) v5 r* c
, f9 Q. V6 b- S4 E if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ Y) Q0 _ G8 X1 o" ?7 r5 s8 x pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. X2 w# x+ S) I' `9 Z2 f
& E0 i; m) Y$ U. h' ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
$ K+ C1 R9 T% g: S pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# q- I( i( u5 G2 p
. H$ I# z* R6 j
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 [4 z7 [ Q% P" z+ S+ P N/ X: }8 E4 e% }' p
) h5 R) y. J _6 T- S
|
|