|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 O1 V# u7 {! {' u4 Q3 II posted this because someone kinda posted a youtube thingy about it :O.
8 c7 l0 j- y7 Z0 }; C6 W& C$ W5 ?3 H* v2 }8 X: r
Find this in DPSrv.cpp @ worldserver! D- e) m" T& j9 y7 W0 N" h/ C+ g
- g/ z- f$ Y: f
Code:
/ }1 f, b) \: N! [1 evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); u. D# U% v( g$ {: s, g% h
{
3 V$ j! E: \; t) X0 w) F) Q; \ DWORD nId;
" h6 E. @! `8 M2 Z' v int nPart;
7 J, I! ~7 l$ Y+ ?3 ~: i3 e" e
& }6 `' V; D, U0 _6 J ar >> nId;
% I/ r6 Z1 h/ t$ R( p ar >> nPart;
5 O. b% R' a0 F" L
( k8 t8 c, w A if( nPart >= MAX_HUMAN_PARTS )
. s7 F" d/ S. y& r" {* z return;6 Q4 T: |2 n/ H, }
g0 f( Q o; F) {% @4 _, Y* W CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 H O/ i# @9 c* T. ^+ [( [
% {5 N+ C- s& @% {# ^3 E) O# r& P. C. Q& [$ [# x9 s
Code:
) i3 j1 t5 A7 o0 m0 F# K7 `3 m#ifdef __QUGET_SWAP_FIX, R L3 m" I* W& M8 B8 d
R# {0 f5 A. ` if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! h) Z! y4 F8 E3 [; s$ c# Q pUser->SetHitPoint( pUser->GetMaxHitPoint());* _# H- [/ V$ H ?: L0 Q& c" P3 J
$ d8 X( c) \( s$ M4 J; d8 |. S% _+ W
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 v- _) D& y5 f x- D# C; J$ V( D4 Z
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* y4 O( @) g' S$ k& u" y! n; }( H2 z% P
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 E; U% H& F+ D; L6 a% C pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 x# D2 m7 o; v& e
1 j! `9 |. p. m' B* D u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp' _! k$ c( U1 D0 V; c
and add under
1 J/ R) ]2 _+ L/ G! X
9 {: |5 q/ z8 |8 e& Z+ C, ACode:
: i- `6 z0 p: C3 @8 @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! |( B% F' A a; H {
2 a2 C" `, t8 u6 I8 x( w 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 M3 s$ b% u5 O% S }this9 h/ W. m; Q5 I4 n
1 `* Y* i6 A1 b! K4 s3 oCode:/ {; W1 d D% n+ I1 ^
#ifdef __QUGET_SWAP_FIX
" q+ r. M1 o b# o if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) V" m* H9 _0 ^ m& {
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 w5 t" U3 Q7 h
$ E& P N( A& v0 \# B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" S2 ?+ X: G* h* D. r% e1 X! ^( B
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% o7 w# j! r! J
3 C! f K" j& M S3 w3 [, f if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )7 q& C6 }/ o8 n/ Y. M9 y: R
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* P2 N* D6 a; @; X3 z
. d! V( v$ M% S' W
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 q0 p; @4 K! O$ O. |6 J
' |' [& t0 U G+ W! z
9 e% W5 ] O1 R: W. _( W& V |
|