|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ' G; ?2 D7 R: v) E/ T. k
I posted this because someone kinda posted a youtube thingy about it :O. `9 x; `' T6 F7 L4 k( y; R
# ? _/ {: ~% @0 [9 iFind this in DPSrv.cpp @ worldserver- p( ^ L( p6 k# H' S' `) e
, U# V o. X. F& t. M
Code:
9 S, a( I/ ~4 a) |1 j6 ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
P6 j4 N7 r( c{3 m2 r" p+ v8 w9 m
DWORD nId;
! [% D4 R( Q6 o& A8 @$ b8 Y. D int nPart;
2 i( F) C2 v9 R. o7 w1 N! e! O U
ar >> nId;& t& o$ c& j4 Z# A. _2 {2 y2 Q
ar >> nPart;
7 Z" ]' v5 Q a4 z: ? ( r" S. G+ f* {6 ]( Y
if( nPart >= MAX_HUMAN_PARTS )
- o+ h6 Z* z" s& G! u( j+ ? return;
5 x/ Y8 q- o. ^: J: K5 h
0 M% p0 i! f. P CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 V/ Q; S; c5 z: i, x7 c1 h" @- ?2 z
- A3 Z* ~8 K, b/ g6 O$ F
0 W( \5 Z3 c, I' dCode:( s- i! }, P2 y* z# V
#ifdef __QUGET_SWAP_FIX
3 i5 o$ u- p* c2 c- h6 ^0 n& x) F2 [( W' ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ m) p+ U1 ~; R- |# i: a4 } pUser->SetHitPoint( pUser->GetMaxHitPoint());0 _4 c6 a) C V0 q) W
1 w3 w ?) V5 Z6 M* p! b
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )" t0 a* \1 p0 {8 k3 F/ n0 P' Q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 W) d, B; `1 W4 o$ E. Y' N% p7 C8 S- i
/ t" y# _* h6 I% h# S2 s
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ). n$ A% H- j+ \# V5 o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ \- ~( g) h `8 e3 g. x% v
$ |5 H- [0 E2 ]1 s7 i* z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 r# {/ _2 Q3 b2 n) h
and add under
; |2 A W: m! J
- z# C, H2 N7 ?Code:
6 o8 x3 T4 t: t3 Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
# T9 b0 ^; q) E/ V) ~- Q1 H U* \- k- ~ {
; Z( ~: l3 m( P/ C7 R 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 g& ~) i% u2 d# z1 Q }this
6 ], |' T7 F2 P5 b0 p7 n' I1 d) m6 W8 N
Code:" L% L- `: R- g. X6 p: l! ?
#ifdef __QUGET_SWAP_FIX% D% ~3 ~ Q: I" ?9 h5 h
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) f9 N$ D" w, J% p$ {( b. D) q+ v pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 I; d& n2 J0 e6 M
0 y- a" g. N1 w2 u) i9 P# ~- \ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) |% ~6 a t4 P# z: O2 j* k
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 I6 y6 ]: `+ T5 f* c s O
' ~; P- |9 w! M/ l: e- I7 J
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 M; y6 A% P# p" D pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- U6 }+ s2 n8 ~5 {# j
( u: F, M' o# p f+ y! v#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : d+ g( ^4 F# S
- g+ V5 I" U8 K' `4 `: l6 I
' F2 b% M z3 T |
|