|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# a1 [& n( Y p. f' M& `I posted this because someone kinda posted a youtube thingy about it :O.4 h- s, n, S/ p8 @1 o, \
6 c6 Y: w' C$ C# J4 d' ]# K
Find this in DPSrv.cpp @ worldserver
; N: c4 {8 }$ ^( r f# B
1 Z% v4 w) n; x' @1 |Code:! G+ X& x% [% o9 H$ M
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" y! W( d( K0 K8 V8 I! K{2 F2 _! G( X- x! X/ k# w
DWORD nId;3 @; h `5 \7 x& r# N5 M. }
int nPart;! V: V3 g3 y2 b: E+ a/ C
$ `% X- m; _! U2 E ar >> nId;, }1 B/ d; l( G( d
ar >> nPart;
' i9 x$ |8 R( }# d% A7 d0 a
8 m# } O) X" ~2 b- z+ X if( nPart >= MAX_HUMAN_PARTS )
4 j. z7 d0 j0 y0 a/ c0 ~ return;3 H; W$ X, R$ |$ m2 T
% A9 M9 S+ f0 v5 I3 u9 A9 \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 @, o: U7 m( }% K3 `$ q2 K/ Z5 H3 b* V/ y* I6 E& t; |- Q- v1 [+ N# m
8 @. F9 f' I1 q$ J9 R. E5 n: n
Code:
0 P8 D6 ?5 n/ l3 b#ifdef __QUGET_SWAP_FIX
/ L( @( r+ W( E0 D& s4 C4 m0 Y/ w+ t+ N8 t, N7 f& d: m: O
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
4 y' Q! u0 w+ b6 v- W4 P pUser->SetHitPoint( pUser->GetMaxHitPoint());/ R) z8 g& v: E8 N
. ~& J3 f5 E( N N* n if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. E, @: T6 ` h pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 H7 [& \9 I' Q* Z' ^1 q$ D) f) x+ v% k5 u
, Y7 ^6 t+ ?( D- P if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )/ |; H+ e3 _1 V9 H0 g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 _% r- F' I& G2 |
6 N8 x( _0 x0 E& l& e4 G% d; d#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 f- {" T' \9 e \+ ?: p$ ]% l' Pand add under
. p; \+ P3 ?4 r5 x# v4 r* E* u$ B( u+ p
Code:
/ }2 m* d1 R) j1 Z% u8 b3 v6 A# W+ hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' N# _0 u. s' G7 k
{* S7 c& S( D* p9 W- p
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 );. u8 p6 E+ p% d8 U; Q* g9 ~
}this3 ]! G& k. t5 ` c, ~
" Z& u5 c' S* m$ U
Code:
+ [, x5 u" J) g$ `#ifdef __QUGET_SWAP_FIX
: R* [4 m9 k; x% i; a) y if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) U! n) E. A0 z% p
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ q( v' F) k+ D1 x* K
8 l6 k3 Z \" [ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; E& K% p0 [. m+ g( s8 j6 b; ` pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, }) | e" @! g! Y1 L( ~7 ?( g
2 p) d, b2 z& g: P) N
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ): f& i f7 s, [4 \3 N# D. E5 A4 a6 V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 f/ M$ N- G/ I% I' ^' U, N* z$ C* B' {# p e9 K0 `9 s
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 z) o) t3 r: q2 I$ b
1 l: K' {( ~2 E% b3 c. `. b# y/ j! t
. C; u/ `2 u. b/ f' M
|
|