|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 ?2 w" }- e5 {* U3 W- Z4 b
I posted this because someone kinda posted a youtube thingy about it :O.: G' ` F( Q" O$ J
4 P/ \6 P* T' h S
Find this in DPSrv.cpp @ worldserver5 a: w) @) b3 @" q9 d5 V9 O
$ ?: ?2 P" Q, {: F1 w+ ^
Code:
- @. v; v9 y3 ^! ^void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& c' e) }1 L0 }4 _
{/ R) q6 f k. e5 \0 }$ n
DWORD nId;
8 ]! ~: \5 v( ~ q$ n int nPart; c. r+ C7 I6 T' ]. c$ e
, a( D- ?) L; H: J: Z ar >> nId;4 F9 { |8 g# |
ar >> nPart;
4 V4 p8 k2 Q: V4 n
+ D3 y ]" b( Y( O* c' l# l* H% l if( nPart >= MAX_HUMAN_PARTS )
/ U3 l; a4 ]& L; a return;
' G( b; n! V( E7 ~! I5 B6 k, y- C% E
; T/ p( |: X+ _, u; |* l CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 c {8 {0 p3 ^1 ~5 _" ] y8 O
$ g; {! t, T P; n |2 _ A8 m% ]! q% A; `& ~4 `
Code:2 z1 P# ~: T+ I4 F1 m4 H
#ifdef __QUGET_SWAP_FIX
$ \2 M: F7 }8 h2 d2 Q- e1 m2 q
. D0 g7 w. a# Y8 }9 W ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
6 c% E+ W3 L# A9 o+ S& e pUser->SetHitPoint( pUser->GetMaxHitPoint());. S4 b K3 ~) `' c; W( Z# J
8 q6 Q) [+ |/ q# v& i6 ^3 i
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
" u5 U. Q4 \4 r9 O ~/ x' W pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 `3 ]& g& |& _% p0 B5 l; e
5 k( Z5 P0 Z% p. P8 f9 j if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) Y- q V& f2 i# X7 V
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% `+ V8 A3 D5 M- l' ^
' l9 |& e* j4 D
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 ?4 S" ^; i# T# _
and add under5 ~/ a% S: F; u: `
9 ~# L/ _" C3 O) W7 I1 B
Code:
/ {9 {) V3 V# |! Pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 ]6 C! }! R7 `1 w
{
, o! M' I/ t& v2 L: e" ^3 \ 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 );/ V' @/ W6 F3 r
}this
0 B5 Z; D. A! h- R! f! p5 {2 C8 p; s* ^1 M- O
Code:
/ |/ B5 g" b/ W2 K4 W#ifdef __QUGET_SWAP_FIX* b( z7 R d0 o* g2 {
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ G$ \: y* `- `+ G3 e1 H8 N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
% }+ O/ M1 N/ R+ h. D# m" V; T( K( k- E
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 g2 Q" t4 m* |3 R& M0 i+ {
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 N: e* ^8 y, T' V4 F
# D7 N! k$ D3 @% ~) z1 ? i if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* @$ G4 D6 v2 e" }: h3 |4 d" ~ n' T* w pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! h; V1 {! g+ b" k3 `
2 R/ u6 d: S+ D) J' U/ U
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : n& v, w6 _9 w9 f+ B5 y3 u
- @0 x7 u( F! l3 e, ?2 I4 S. z3 v
|
|