|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
+ B- b' M/ ] G; ?/ y. uI posted this because someone kinda posted a youtube thingy about it :O.
. a& y/ `% p2 }' L0 X( ^ _
* d1 ?6 v. D% c$ y0 OFind this in DPSrv.cpp @ worldserver/ k$ |) ^' ]( q, f5 t/ ~
- v: N5 q+ I. ^Code:' @+ r" J) H* Q+ A# \! k4 T+ w+ o5 ~1 K$ [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* V; I( S- e. ~9 P! Y m+ D1 o7 d
{, L- ?1 B! o' c; Z5 v: c. Z# c
DWORD nId;
# {0 d$ p9 j3 P# x# O9 u int nPart;$ t g# `: e- P; j! i3 e; l
/ \0 ^5 m9 G; O7 Y$ D4 @7 }9 t2 \- Y ar >> nId;
$ Y9 F3 X# s. }3 s+ _/ ? ar >> nPart; + t0 w5 O) s5 g& h- q! l, J+ z( _
0 o7 h) _# l6 A; [, @' Z, d if( nPart >= MAX_HUMAN_PARTS )
% P! P8 q2 g) n, u7 k' f. I return;) x7 V; y+ Q5 e! k+ E' m. ~2 Y
" k. |( g( j* O: _ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) {# G+ T, h. O0 `* |
' `1 C7 E5 C. I* u! d
8 L1 x2 ^ Z3 c
Code:- o8 M- f8 D' g& m4 Y: M
#ifdef __QUGET_SWAP_FIX
$ Y4 i4 W7 p; R5 q$ J" U& V
# H# s; }# _! y1 b2 n if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! p- M* @* Z* j e$ L/ x
pUser->SetHitPoint( pUser->GetMaxHitPoint());
* j' R2 t W) p
# ?+ Y& t% p' _+ v: f3 @2 F* f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )2 m) e4 i i& t* I6 V- L
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# u( I' ?" ~! I" C
4 e* x3 x, d2 M/ K1 P
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
! {. H+ h( o% n pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 {$ V% L' f$ y# h
/ F1 n" [4 e/ P2 `" @$ X#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
g% ~4 D( n$ n& e( uand add under
( _3 R6 K& k2 a! \6 h, ` r6 A( ~6 ]2 j* K. `$ a+ p
Code:
- x% e( R& ^0 L; k8 y) I) D6 dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )" U4 w' f# e% [ F% R( h
{6 H7 z% b! y5 p7 ~$ F. F+ H9 c) T. 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 );" q; J7 |" }* j
}this$ M6 g( f5 H" I5 ^4 d( U
2 Q0 s* z. \" ~& q% o/ u$ ]
Code:3 m' y( b3 t1 n7 @' u0 x
#ifdef __QUGET_SWAP_FIX) e4 C6 e7 n! D" V7 v3 A
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 c6 c6 N# X$ B1 |6 B) P1 m
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. V2 p5 [* I2 l- U
* p9 b! |% o" B2 w if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" c U6 i4 A* D L4 R5 I. H1 W) J pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 u# G- S9 P2 \' k- y
/ N3 q/ J0 ]7 h7 [( w: Q1 e. Y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; L+ K; H: }4 V" p& v) e pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );0 Q. Q8 R5 p* w8 `4 |
8 {# U0 ?( y( c- j3 u0 _0 e#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : I& j3 W$ ^, t! Y
9 ^9 U9 v$ ]& l( n$ Q" d8 j% J' l- G* {5 _5 x
|
|