|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
! m( Z# y3 H% |; @2 i" ]6 Y. VI posted this because someone kinda posted a youtube thingy about it :O.+ _: [/ {& Y0 U+ Q2 }) Y5 x' ^
4 w$ D" I0 y5 Q" nFind this in DPSrv.cpp @ worldserver6 Q: o; V3 r" N
9 E& w. F4 M# w" t, V! f9 F" \
Code:
0 Q9 o, l3 Z4 h( Zvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ) p( q9 \6 y9 [8 P! {3 [+ @
{# ~8 R' n1 i1 Y5 Y, h* Y2 R4 a7 T. d
DWORD nId;
( b. o9 ^. X( Y X8 @ \ O int nPart;
L& B1 s7 h! b$ E' ]( k p5 V8 \" ], {4 E: _( @
ar >> nId;/ G7 Z4 n- ?, z3 u' V9 r
ar >> nPart;
\: v0 z* G0 `9 k5 H$ ~, E4 E
; y/ M5 t4 K4 w8 Z( W# G if( nPart >= MAX_HUMAN_PARTS )
: J6 i' Z0 A; \: \ U return;5 f/ l) D% b5 t$ p$ ~4 v3 E
6 b+ K/ Z* E2 T$ b2 f CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 j. a" Y; l$ y" V" G
* x( b: s0 \* l% d( J2 l
, R" f8 h- S2 l+ K+ H: X
Code:$ } m. }! x- k6 [- g6 L$ O
#ifdef __QUGET_SWAP_FIX) i/ ]+ c! L- B) k/ G/ s* e
5 P2 m$ \( u: T3 n+ o; k4 Y2 ?. V
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 r' y' U! z3 @2 ]. H/ { pUser->SetHitPoint( pUser->GetMaxHitPoint());( b' g- f- ]4 ]( a5 R; n
4 r& E; K$ c: f5 @; ?
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; C- K4 B: @" I/ v* M pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 R1 z n, D- u: }
* \8 K$ \. M# \
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
8 p% B* M; x8 |: h- Y5 ~. { pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( {" W/ @' }/ s/ [
9 n. [2 r- j6 @( x' Y S
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 J& y: p' m4 j* w1 _ v5 z$ ]* L* zand add under. N k% D' z0 Z1 F
( j X' H/ ]* z s5 m/ E1 v4 q
Code:( s8 l) L) z& @7 b$ T0 }2 y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 O: S. v8 |/ L" Z+ u) ?
{5 R: J- B2 |1 [! e4 E0 L: f; m! A
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 );
2 C) o1 e$ w$ R- V4 D% P }this' w# A1 L& W ?# H
4 V X4 K& a; S' n* F4 rCode:0 L) `/ D# y; ^" l/ d6 c& M3 E$ n
#ifdef __QUGET_SWAP_FIX
8 a) t. f9 F7 J( R) ^2 H0 o o1 L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
8 y* k, _, T/ J K9 A. a# H pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 k# D( M/ z8 B- C. C# F
* e" L' i# t3 G' I6 \1 N. U3 ^ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): h/ A! U# \7 @$ U. G* O! @
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. }7 J9 K' F9 K
; F/ E/ ^6 E3 G: I: ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
) N& w8 C9 E h1 ?, e pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 O/ _ @ R2 C/ v: B& X6 Q- D W4 g% A, S& h d2 r: i4 D
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 s: e! T( O" a( |5 t. b6 Y
7 z+ k* F6 R C
: h I+ V7 J! j# b# I' v2 a* B5 t
|
|