|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
; q/ K* ^+ }' _/ Y% F. V# \3 {I posted this because someone kinda posted a youtube thingy about it :O.0 S6 ]3 t$ {" x. F& D. t% T
2 s, G5 a( y8 C3 IFind this in DPSrv.cpp @ worldserver
& }+ U$ W0 v3 i4 _$ `6 j ?% d7 M: S9 o6 u1 }* q& H U3 D
Code:5 Y+ g6 [0 Z0 M3 u
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% Q8 I# v$ C+ h" v$ O( c{8 M' G2 n9 _9 T5 T3 }
DWORD nId;9 } E. k: h* w |
int nPart;
8 s( Z; e& p3 p" y" A
0 o( |, L3 X2 g; T! ?; z3 Z! N ar >> nId;/ F7 b1 {4 N5 @3 S
ar >> nPart; 7 Y1 f: v2 B: t
9 P2 s( L/ ^1 A' U! l
if( nPart >= MAX_HUMAN_PARTS )
# A* R! |- \+ h3 o2 I9 n return;
& n: x2 ]& J1 e' [: z8 \7 z
0 g" x8 \$ [! _; `2 s' t" u1 ~; ] CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" H5 |& r1 E, o3 o6 d, ^
* a% y) A5 S3 f" m/ X' V# s C# i5 f
Code:
% i8 l K2 u8 ^9 P1 w' s4 F6 J#ifdef __QUGET_SWAP_FIX; U: W; B) I v
+ Z2 L6 T/ Z$ [( R, F if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )2 Y! M5 {; i3 n' e& C7 B
pUser->SetHitPoint( pUser->GetMaxHitPoint());% X% ]( w b% g( {; D
" _: ~7 O" D& F if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): h1 J/ }$ P4 M8 _: n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# w0 C1 Z) a: o6 c! Q) f
- z- I5 \4 _5 s ?( D9 Q2 W if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 K% A% @' V5 `0 E9 Q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 r7 s5 }, ~9 _ V4 R6 z# N! ?4 ?/ {3 C" K; f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, E. o7 S8 G( a% ] Cand add under
# f2 K: x! E% x6 U& j- O9 \ p5 N7 o# [3 g0 O/ C+ x' P2 o
Code:* U" t( N# F8 ?4 c, r( K; `( y; A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. I1 @) P8 f; n% ?# L {" O6 n- G! _3 u$ q7 ^6 y# G
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 );
5 q5 `0 x. F5 i L, K! O% v }this7 i, e1 ^6 `$ l, O
5 t! d0 @$ d' [2 c( Y8 \3 ZCode:. b/ u/ m2 q0 G1 r z
#ifdef __QUGET_SWAP_FIX
1 ?2 p, O2 n6 {$ C4 b- S( y3 @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
/ M2 Z& O# l, P0 \2 m# z pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( c+ m9 W. D3 V5 A8 a7 v0 R2 ^/ \( K% j* J8 Y6 G G/ p8 a
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" f( y0 j2 g! f- ~- F& U4 |9 e# C, a8 w
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ I/ j; M& P L" L
; q+ Y3 p8 e! c- u, w! M5 j9 J( _ [ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )" Y& T5 y" ~1 C: ~% o# c5 L; V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! x6 m- @: q& F
: J# R# [- u0 B6 E$ H& H#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* Q5 t9 e% V4 T1 X& U4 N/ q$ Q J: C2 U/ T
# l+ e5 X* r. r/ n& Q; t* s |
|