|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 q) I) K* X8 e3 [# w& W7 k
I posted this because someone kinda posted a youtube thingy about it :O.* s9 g" V7 s: ^" t
% s8 I5 y' t1 L2 t% G" M4 o0 q# D4 qFind this in DPSrv.cpp @ worldserver
) [/ i* g# ~# {3 w
7 |3 v. b7 g# ]Code:4 e7 e0 e/ V7 ~
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 c# ], u2 c$ b/ H7 G1 Z
{
! _: `# I, _) l$ R7 G' u& J/ i DWORD nId;
8 p6 R, S2 a% C; f int nPart;0 j* ?$ M0 @( s7 _" A: A+ G7 z+ {
4 z' Z$ t7 X; l6 t: b0 T ar >> nId;
1 q% G, n; A4 e3 P ar >> nPart; 4 h! C: ~- W* k' c! u$ f
0 _# w0 U9 K+ K: ~
if( nPart >= MAX_HUMAN_PARTS )
+ k& c, @! m; N: L# z. t! N; }, w" M n2 C return;
5 C0 o8 f6 T0 k% G- @, o- C4 d+ O) P: a7 h! c
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 s; [. H. B1 s& y4 E; i9 N \* {5 l. u% ]5 T7 _
: S; {. [1 W# t% u5 L8 WCode:
# J2 H/ h, C' ^#ifdef __QUGET_SWAP_FIX( E# L* k1 M. u1 l3 H9 T& F" B# C
& Y' y A+ A y) D
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
0 G1 W8 M$ A& [! \$ } pUser->SetHitPoint( pUser->GetMaxHitPoint());" }9 G+ r0 B ~
2 A$ F9 v; W# D8 X if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) L5 R/ J' a( T D2 v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ E- u5 ~- j6 k0 t. V, ?" A9 g. M2 i r/ B2 _4 {% J
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( j% f8 K3 }4 h) T& P& ` pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 p+ [& p& R5 l+ @3 E/ K6 x
3 I8 ~% x7 m" g2 P4 g9 s( A#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 L* g) M! I* q( p, Wand add under# N# @3 `& T& w0 {) C
. o4 O1 w+ P8 M2 y
Code:
- s0 J& ]/ Q0 K) M& [9 @; d2 Mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& I) I2 }2 K) k }2 n6 y1 f, x+ [( Z/ C {
. w$ h4 A, J, T* x F; Y# z5 J# w 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 n; e9 H$ n5 E; ^* D" d4 V9 H }this
* [: e& J0 k7 B# d9 o2 k. A1 b! S% X9 P* Q; [
Code:
/ l0 p4 }+ [: |2 Q. m7 R4 S( D#ifdef __QUGET_SWAP_FIX
7 ]- M9 v9 H. h9 k$ h' M l6 U9 L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) L/ A- [9 W9 J- Y+ D
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 y& B* ]% a6 M! N0 L: T. d( h; G$ E- B: ~0 @
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) C* |0 ]& @3 ]" r9 q/ T* m. Y
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 k1 L, T5 l' W: Y. `0 @% {. c
?. `$ |! h- B1 P# Y" G7 X% @0 [2 \# ~2 l if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ K7 A! S# _9 p4 J5 A. C# Y6 s8 z
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 I: V3 F" L. L
7 i' m. V5 B" d8 w#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 l% ^; y; D: ?. T" r- ]
2 Z* e7 E! r! Y" K# A" t1 `8 K# V3 f$ L& Z3 x/ y' V6 B( m
|
|