|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ p4 i3 \2 @( h4 D2 L: Z+ fI posted this because someone kinda posted a youtube thingy about it :O.
. e: R5 F; S9 R0 D; q0 g
. L5 @' [# C' h; z$ MFind this in DPSrv.cpp @ worldserver3 q0 k) y' ~% O
9 ^* k- S5 ?4 t% u$ K
Code:& [7 v5 n" u6 J# X- F# t/ F) r
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )9 {8 l# D6 ~; F, {
{ K6 E F6 Y8 g# l) m3 G
DWORD nId;
% m( G& y5 X: n9 s( x2 E! A; g4 U int nPart;3 z# a% N, \! D) s5 ?2 V/ Z
) h& Z& N7 L& L ar >> nId;/ G O. u# w Z" B( B
ar >> nPart; $ p9 H/ K7 K* U' @# M: O; m; Q+ L
% ~3 a% Q( ]) W/ H% M) `7 \- N' x if( nPart >= MAX_HUMAN_PARTS )
# L9 t6 ~ U4 A. j6 S return;4 c. a$ S$ Q% D3 _( f: g/ _
9 b1 g0 ~( R: a. S0 N, z! S4 { CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# v. C- [. v5 j: q0 S! n
/ t E# t& ?7 F
8 i) `1 {- O7 d) |Code:
6 Q; ~1 w* \& v8 a) f7 M#ifdef __QUGET_SWAP_FIX
* ~( _. T% D# S: r
3 z/ ]: ?; q B4 | if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
. n' ~6 E2 u" }% e pUser->SetHitPoint( pUser->GetMaxHitPoint());# w; Q3 W$ i7 q4 v/ F) D" u
6 _2 x- A1 `- ~# U6 B if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
# ~* b( S5 D% [0 Y& x, B pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 S. W' b$ E( e* i9 q" o% t
% M. L9 m+ p' |2 y6 y5 u [) o% F' T. q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )& _) a4 W! l8 a/ o2 U
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& u; u3 l* N, G7 J
, [0 M+ W5 ~9 M; `& p8 l7 ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
. j& c" _. Q7 p6 uand add under
% d8 c5 G2 ?' o0 d$ ~8 g; a
+ O* |" f1 r9 K3 ?- l8 jCode:
- T8 N/ \* x( c, n& b' |1 Fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& ?: ?9 B9 a+ s4 r0 [ {0 W0 }4 P( ?. Z
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 );
- k$ a5 Z$ p( } X2 X% A8 X8 L }this( |7 ~( X2 C& M# W7 B2 b" ~" b
3 Z6 M! S; H+ t' Z9 S. W! M6 T; u
Code:1 ? C3 y0 y6 L3 x
#ifdef __QUGET_SWAP_FIX
- e) Q5 d% _. r' I% u9 L- |! I" e$ o if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 d6 z2 u+ D/ ]' O' j
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) N3 I' G8 {: P2 C! ?5 B! @: ~5 K+ J8 q( b6 o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 w) |9 C- _2 H$ a
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" A' l% M$ n2 [! j; o& S& {
1 l# ?3 ^: u3 t( k4 ?, q" B) _! p if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 i3 W5 j/ X% n4 B* }' B9 V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ A, y2 H) k9 C
& f$ _9 E* Z3 ?1 _: v#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 V9 p* X, J! N; y" w4 P
. n7 e- R i2 V' @* w
8 g' F6 D' Z) c( \. l& ] |
|