|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 N$ a! r1 R0 H: @0 C/ N7 II posted this because someone kinda posted a youtube thingy about it :O.( {3 Z E, c6 F* t( J! f
! k( }; K8 h6 d+ {& V" |, [ ?Find this in DPSrv.cpp @ worldserver
- w L/ Z/ b" b7 x3 b$ x* z) O+ C% J, t1 i4 f4 C+ s7 K( n
Code:
/ k! B% e: |5 N- l. G+ Hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 L( w0 ~7 v" ~8 _$ `+ B7 y{) A* t1 Z8 i3 a( }! n$ }. B
DWORD nId;
1 h! S3 `6 d& O2 r int nPart;3 r& _9 I% J$ S9 ]. _2 X
' o, h$ h( {& x2 w- a t- [, C+ q+ V ar >> nId;
+ C- R& C9 x/ r6 G3 ~! E ar >> nPart;
7 h( K! E& e) G7 ]+ |$ U
& Q0 z, W3 O' e if( nPart >= MAX_HUMAN_PARTS )
2 b: i1 _7 G* U3 Z; ~ s return;
+ D) H( [% r# \9 X
" g0 H4 x6 U) b6 b; P CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( W* U+ s. w6 \
5 R8 M' C0 {6 ^" ~1 E$ N& ~0 L+ Z' h w& I) M6 u3 W
Code:
7 @' w% b6 f: k. K7 |: O- o#ifdef __QUGET_SWAP_FIX" o* C6 x8 C; h0 C
8 ?) d: w2 i+ n, O# r$ j' o if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )( {4 Y. h1 x5 s" D5 u
pUser->SetHitPoint( pUser->GetMaxHitPoint());
, {+ n" s0 O! T$ h" h) m5 V
) B- G9 j4 A7 H* h4 ^* T if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: r u! L, L8 U E" k2 i6 n, G( N9 Q' O0 F pUser->SetManaPoint( pUser->GetMaxManaPoint() );
4 E9 k8 Q% q) e5 S: |) u' z+ @" }+ a$ d5 V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! [8 u& b Y% |1 r) X/ i
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) a4 y C# ]* M( [, @/ }) E3 W8 a" v( j' Z2 e5 i
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ ^# s2 J" z" P) U- ^) r% @/ Xand add under& n3 S( @3 ^) N: ~4 |( g: A; J
8 a0 t( D# I' T5 C* S( Q
Code:7 S8 C9 \/ I; B+ S3 G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% L% ?& g, y* u( x$ O) _! @ {
/ S7 ?- _' [: d# ~: c6 u- W& A& 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 );8 x4 X9 D! \5 g6 Y3 c3 u; |
}this
7 ^# t+ P. `3 B5 L
( c2 ?: ^0 ^- q: QCode:
& |& j4 U8 R5 R0 N2 X# Z#ifdef __QUGET_SWAP_FIX( m; Z A0 N {% V, l* x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 |8 _* Q! x- ]& a9 ~ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 z4 o! W1 t1 [7 U$ D- a
! K6 X. S' ]4 y% Y" T
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ C# A+ B' }: ^4 Z6 _: A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! l: H( i3 E; D. U% W+ i5 V5 j) U. o, m+ D5 q. p1 P
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) e2 W; b9 B8 @3 W8 U9 m
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# n; r" z; {1 w0 t8 N% |0 ^; @
* m0 w5 C) ?+ V/ h; K6 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! M K D' } R' v! }6 p! ~% X
0 z4 f) z# L1 s$ T& K& P: c/ `9 M, G x l
|
|