|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ D- e3 l7 F R* wI posted this because someone kinda posted a youtube thingy about it :O.4 b% W6 h" M% q, M/ L; R
# u4 W$ P1 l$ g8 [. g ]
Find this in DPSrv.cpp @ worldserver
0 Y& r& w( i1 B% I9 W) J) n4 `1 a e3 F9 L
Code:
' W% v; r" h; avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 ]( _4 e/ U' R* \) O( q
{1 N0 l# t$ |' E2 ~) B! _
DWORD nId;/ B i% s* b% H/ g
int nPart;
; R2 l& b1 w8 @2 u6 W0 N3 i7 s' [: T! a& @5 ]8 i
ar >> nId;
B; n$ L! R" j [ M3 C2 t/ T ar >> nPart;
$ L; ]$ \, u! c' ]
* | z0 E. F# ~# T6 \* | if( nPart >= MAX_HUMAN_PARTS ) : L8 s( w; d. W) r) a8 n4 w7 r# D+ ^
return;' n! v5 U2 w0 T; ~/ C B
5 N, O- F! S- v b! X L
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" J: |5 p! X4 Y1 r: z3 ]! P! _: ]# o
$ J$ H, c: X" m. t& K
; H- s0 {+ B: {" p! I4 ?! h2 ~Code:! i" |: s* ^1 b k4 c
#ifdef __QUGET_SWAP_FIX9 k% d3 J7 C* j( W
8 h9 o8 k q1 l5 c3 B
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )9 M* l' k6 e3 {2 t* o
pUser->SetHitPoint( pUser->GetMaxHitPoint());# ~5 P# L2 X/ Q) n H) a' k7 j- {
* S0 q0 p l* s4 e& l7 p* E: j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% s3 l' f( U9 O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 h3 n1 B2 R) r% }/ t
: F' B# c! L. Z% q" F/ |6 ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ C- r. e$ m5 q+ m- L0 h
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ f! K' D& V" h% q" d' R
6 m3 m& I2 F x+ A8 I; Z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- D) |) U2 C- b, y5 h
and add under
% F4 E& j3 S: V$ f) b
3 {& k5 W! r, R: XCode:" y# ^- h/ G' y" N5 {. }
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) S0 R* y. O" l1 `! h
{
: o6 o4 G+ J; _( H { 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 );
0 z# l- {4 T" M6 L }this
( \# e, |% |/ [# n8 u) X2 L
% p6 u- i$ Z9 f q7 w/ z. vCode:" r# B! a9 Z- |' i2 D: C# S8 S
#ifdef __QUGET_SWAP_FIX/ A3 C* H* B k& G* Z. ^" E
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
: x$ @( h4 h' X& }6 \0 o" l5 S pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 R# B! _1 T6 z- F& F
1 z, A" F( j3 A& g% B) y* Q) D if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 E( O1 j! e$ d: O+ l- v/ e5 a) k" h& y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 C, v4 D' B2 W2 Z2 S( _- V
4 ?8 e: T$ a( {) B
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ D7 d) q4 o2 B5 u, x/ l
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, ^" b0 W% y. m5 `
y L3 ^+ W* a; G
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " ]' r; u) b0 U& n4 n( I: |
: R. d) ]% f {# }% c; H5 O( r2 t) {7 r8 \1 p8 Q$ N
|
|