|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
S& Z( L' |3 G3 bI posted this because someone kinda posted a youtube thingy about it :O.6 z+ A% W0 w4 y1 U b3 g
9 B1 U. U3 B3 G( N& }( R( mFind this in DPSrv.cpp @ worldserver
" C4 z8 y/ w0 W" i2 J" m" L: c1 W0 f; g
Code:, r5 d4 I7 K8 O9 ^0 b# ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% d$ Q# v' l0 r$ k ^{
0 u" C% A9 E3 w3 n DWORD nId;# `& t. t7 U5 l* A4 p! s( ~
int nPart; q6 T& b) E6 b% E
/ C- B; w' T* }3 e0 I% n ar >> nId;
, E. d4 w! t- N9 y3 U# j- v ar >> nPart;
' z. r7 t0 w4 N 2 U& j8 n5 {9 r
if( nPart >= MAX_HUMAN_PARTS ) % \$ q' V+ g3 O$ B5 Y
return;8 O1 i. L1 ~9 E
$ _! e' V7 r# [7 q: }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
b/ {7 k+ X6 @7 J$ O1 X* R' q, p; ?% Y
$ W, X$ C* p& Y" q( G. b2 UCode:
) z) N8 \- K& l# `' T) R* G#ifdef __QUGET_SWAP_FIX
8 p, a8 L1 i; m; d$ r- {8 w* y" i- a: k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ ~5 c, ^+ w6 D A- v9 z
pUser->SetHitPoint( pUser->GetMaxHitPoint());9 U6 E4 O" r: Y8 _2 e
# | w s/ X: Q5 w2 Q if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ T5 c5 v+ i+ u: I) b* G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );; i7 m) u; v. |' X* Y
B7 S3 Z$ G+ n! I$ u
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& R: ] l: I( B( f3 P' R4 s pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ B$ g# m! H, p3 x3 C
8 u0 h6 R0 X0 V4 O! C# u#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' o( b. o' \9 Y J% hand add under6 k K8 C# e7 a/ }% L. Z
5 [- q( x( N7 |2 F) E! m) D5 Y/ {Code:2 v3 q" b1 `0 s% T
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 k9 L. H; }; S
{8 b# u5 P' x5 m) k) L1 ~$ x9 F- n5 ~
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( a2 H5 I7 D$ i
}this x& s+ s7 e, e/ f$ p
6 k7 Y- I3 z( O! x
Code:
: @! |0 P: Y5 s: K7 m#ifdef __QUGET_SWAP_FIX! |+ h/ ~+ I6 n5 T* f9 f
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
; ] z' t6 s. @0 ~5 c5 S pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 _3 L6 ?0 N$ m3 Y1 M% O. T, u' m& @3 @0 g. N: c
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& p# o1 X3 T- { pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% k% q; ^3 ^) B
6 }" ^* D) m4 r0 O if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
. Y- U0 ?( C# l8 [ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 B" e2 m6 @5 G; l
. C1 x3 G. g& K& u. y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" a9 K' Z% w# r% h+ k2 ~( ^" x9 j* n- U0 ?0 v! x
- |# E9 X7 Z7 a" _
|
|