|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " C. l% e: h+ u
I posted this because someone kinda posted a youtube thingy about it :O.
9 S7 [; L l) p7 s/ ~3 D4 u
9 ]1 j! G% E% f7 j# Q7 a% nFind this in DPSrv.cpp @ worldserver- Y* a$ x* @9 q j% s Y6 ]
+ v9 s9 c# |1 c. G- E4 \
Code:
5 L: y" c6 ?1 a- J" J% b5 D/ Vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; A3 z& F1 a% _9 c* c{
5 W. i. U! r( }1 c( b- C DWORD nId;
0 m5 _! J" @. k* b int nPart;: a' t# w, e# g% o( {
" q: x- y% d/ f) e/ m6 i6 N ar >> nId;
6 C" C3 |$ R% y# k0 f: ] ar >> nPart; ) b. L. \1 c/ v M# ^* W3 Y
3 N3 b; ]! g4 j& s9 Y
if( nPart >= MAX_HUMAN_PARTS )
- m$ V; y& |' e7 ~: G$ l) m return;8 K' L. k J6 E5 \) E4 [$ Q
& g, h6 t2 C& ~% p# @9 B7 L
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
T4 q9 I1 ?( Y& |
& g2 s$ T: U% x2 j8 {& q4 c, b4 S' a$ ]( @; h ?: F
Code:- ?( ~: p& C1 G) ]& o. w
#ifdef __QUGET_SWAP_FIX
3 l% x9 \" b1 s1 U+ E
3 i- C f7 {/ `. V if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ }! p$ w1 p4 l+ k6 h- k3 o
pUser->SetHitPoint( pUser->GetMaxHitPoint());9 M( f! Z5 r5 D% f4 B) [# z
$ @4 x2 G1 ^- U, g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 { l p6 f- C+ E! |, g+ t, e pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 E: ~6 V- C9 G! j
2 j) \. H3 T$ z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 V+ l4 ?# h0 L2 Y+ C
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& A" b2 c. |7 g+ G' N7 s! K0 n
3 N3 w4 v7 l' P% |6 _7 K' z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 a# M/ W y+ e4 D1 v* v' P, c6 jand add under
' L5 |# n+ w- ~; @0 O& Y1 ]
0 z' m! k8 g# T5 Y0 q* R7 c- tCode:$ w2 A6 g4 o. P: ?
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 E B2 `9 n1 Q0 k% s {, f C# I9 a5 y
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 );# }( l: x2 ~, F2 E
}this6 D; B3 }! X+ F
, g/ h/ y: S, ^$ d( n2 CCode:; e1 L; L# L" w) ?6 @6 U# _$ A) W: W
#ifdef __QUGET_SWAP_FIX& _4 k, D R$ Y* }
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )1 E8 ? V, w: b& T0 o0 Z/ K
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ M; v, x4 u# a2 @+ L; _
. t# U F/ ]( ?5 Y if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 H2 y7 h2 y+ j$ M5 ~- d
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! S1 H6 f( Z0 k+ Q* k4 J1 A
" e4 K& U- {1 d5 H1 A% a if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! x r" m+ ^! u+ o+ W7 a' v9 t+ w, y A pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* f9 @3 `, m H. a7 `% C, g' C/ }& ?. T6 A2 N% w/ l/ z( Q; ` \7 U' M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 d6 |7 p7 h1 S5 }( Y# k5 m. d& O4 U+ N1 @
8 Z+ v+ z8 m: V+ [' o
|
|