|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ) K5 N6 c; t( e" q
I posted this because someone kinda posted a youtube thingy about it :O.& T4 _* c' v+ E& q% m
4 C; z6 r* b0 G! p, @Find this in DPSrv.cpp @ worldserver/ Z5 M& \$ I% s) B6 `! o# ?
0 W8 G9 H" Q' f
Code:% t3 P- ^' {( }3 D" m( F z% T
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); r N8 Y. Z6 {8 L
{
1 t- ~. P9 l: b: g DWORD nId;% `% F6 ^& h& O: d5 w0 ~9 M
int nPart;
( \& @% @0 M% Z9 L: U" a( P- ~0 z/ S7 c+ t+ ~2 M
ar >> nId;
; L9 V- |& t. k/ R) d7 K ar >> nPart;
$ C5 R3 g) c+ k5 g/ V1 A; D
" H$ R$ [3 [6 ^9 ] if( nPart >= MAX_HUMAN_PARTS ) 9 n! l; q" E' A9 q% c- U7 I: V
return;
A+ A+ I) @: u, s: `! n- H
, d/ |9 T3 s: R CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: Y( q' L) d9 @( o
i' u9 _5 J' |* c, x5 a7 @9 M
( F9 C% C* ]0 F; d# c! E3 _Code:7 Y& n) m& V4 c Q) h$ S
#ifdef __QUGET_SWAP_FIX9 T" p l0 a- G* e
4 C$ Y2 F; N9 y5 t0 [ H
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )" b! u! V3 l( M- O
pUser->SetHitPoint( pUser->GetMaxHitPoint());" B9 M! a- {) U" s& Y: ]) Y$ O
1 s; X; p7 x. T; \) Z9 D$ W0 J1 g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
( |* a' Y) b% W. C( p) o; V9 R pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 Z9 D0 J1 q8 L0 B
8 a1 B. y" B' d( ~1 N* D if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ c: q+ E; |" U8 l pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
M7 |) d! i! {! u) {& R; E* ~- |; O/ \+ i0 S- w( B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# Y5 Z3 }! v0 z. S* _" T; a
and add under
; _1 X# e$ X/ Y4 B( g
% e* ?( V' o& X# ?& t- [6 OCode:
: s4 i1 L! } R+ f6 kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! }: x/ v; t. ^! n9 m {8 k _- T; D* m) P; }. v
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 );1 N# u. @2 {! n/ i
}this: K, D: v* H5 C: j/ B' B
v: f8 k8 F* O
Code:/ d( X r! M/ s$ g
#ifdef __QUGET_SWAP_FIX. }5 U# [% T' q* U+ l! r- b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 L3 i( G% }% b0 e! Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ A/ z, F8 l w4 ^2 j7 U# G% [5 O8 ~0 \1 Z% V n; H! o6 [) a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
4 `% o- W E# c0 R6 k pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
* |9 r5 x! @6 Z6 X3 d6 y |3 z+ y+ f$ K9 M' [, v# R' C# ~ a: m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 q! Z: g% U" x, U) j( o
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ p. Z6 l" l# ]+ K% A. r& C/ [. k7 N9 v8 V4 g0 F7 ?) K5 U
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 S* Q8 i, I0 u7 ^! c# [+ f7 j
# L6 f$ K- [6 t' H, n+ H7 o& y. m: c) Z+ z8 O$ ?3 ]) C" n6 ^
|
|