|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 O6 g6 @# h+ i) V- d
I posted this because someone kinda posted a youtube thingy about it :O.) A+ v9 F1 ^: ?1 t
5 w! q& x) D. T# _8 TFind this in DPSrv.cpp @ worldserver4 \. A$ T# D, U" U% ~$ f
( n! c6 v/ x0 q: v7 s4 Q0 c5 mCode:
' Z* |! G9 O* a! Wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) k1 ^- [3 q+ @
{" e5 Z4 D, @3 F# ?# w
DWORD nId;8 L S5 P1 G- {3 b6 h" q" O. d3 v" }# O
int nPart;4 s, I$ X- U# L) K" A/ i
2 a( L+ D7 q: i* b ar >> nId;
' L; z+ C" Y4 P' ]7 |8 f ar >> nPart; : v/ |% N, C& ]& F5 @7 a3 X
* c7 r. d3 i8 w
if( nPart >= MAX_HUMAN_PARTS )
+ R) x4 P; Z+ v' s, P8 I: N- h# V ` return;4 ~6 G! |+ A; y7 k: G8 T* b6 k
/ D3 t& Y! u4 V& a/ O) A! K
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. U7 U1 q* U9 k6 Y; |0 ~5 x g& x# y
4 V% ~8 Y# \/ T# H: O2 \' K0 o0 `Code:
2 o9 N* {9 l9 E6 E. @* R* N0 F#ifdef __QUGET_SWAP_FIX
0 c6 A. n& d* M+ o7 y! o* r8 G; f5 L- G( H/ S6 t8 F
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 s" G) L: [. p% _ \ pUser->SetHitPoint( pUser->GetMaxHitPoint());5 j5 `# o% O' k [8 z6 i% e
0 n# X; |( o( l4 ]
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
6 }1 S; N8 R7 U7 j pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 D* y. n( a3 S8 F+ q, g' Q' a! ?! a! G: Z; e2 A, v& n: i8 ~
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# X- f% ~) r; m4 N$ t& l; H. N6 n pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, B% y! k/ O5 i- [
' j/ ?9 I- [& x. I6 w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- T* [0 ~" U2 Y9 \4 I0 xand add under* ?' w+ |* @& d- l
4 ^* v! r# d) `' O5 r, u1 x, ]
Code:) e8 a/ O' {) A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# d- P* m/ \/ h+ k" r
{
& a2 X8 w2 I8 z9 p# i 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 );8 G( ?/ ?+ a: w4 c7 W
}this
K, ^; Q% N9 R
6 R/ B4 y2 U8 \Code:3 ^. P% H8 w" T$ X3 G' N
#ifdef __QUGET_SWAP_FIX
% y( s( a( ?* L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
1 j4 ^2 m( ^% x. G pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; y) Z. W7 j& E" X/ f2 y5 g6 C) d0 [% D2 Z, x$ T6 @, O, ?) A
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, o# R1 R% k8 z' ]4 r1 S2 U# h pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; t: s4 g" P+ F! t. l
: N$ b% d2 x4 P( U if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 O: s6 X5 }& N* E$ w9 I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 k" K, a8 e! P/ m' G6 y& Y
" H9 k7 d$ @) e5 A( l5 {- {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 a9 n- z, \3 W( E" k
; v( l$ G! N1 T9 x( X# S. M: n
. Q! c' j0 J3 Y% @& l% i) T h; C |
|