|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
& t( ?( h6 ^$ X/ a4 F) a( yI posted this because someone kinda posted a youtube thingy about it :O.: r0 w$ h8 L/ ~7 @( O
5 M( H; s! T; U/ g6 M3 X6 U
Find this in DPSrv.cpp @ worldserver! s: E6 m1 z& x
$ C8 Q0 T1 u5 |# m" s6 a, tCode:* f, X& C$ }( [: B$ I5 m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 x0 |' n- n7 S, H7 u
{: G$ }! e/ c D. k d) X, M
DWORD nId;) r- r$ B! t9 a# J7 Q
int nPart;
4 X+ p9 U9 V! ^% Z( Z7 a; E1 f' X$ J( X+ t
ar >> nId;
5 s. T5 H4 B$ g8 m9 ^ ar >> nPart;
}0 v+ i- Y& i: p; }3 |; N + ]( n- c M& |
if( nPart >= MAX_HUMAN_PARTS ) / `# S& a" M/ E) B, C1 @
return;9 Q5 O3 c6 f+ T1 |. f
! [0 p; [2 A3 v4 _' x; e. p
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ p1 [3 c; o* _# {- J3 |
5 C1 C" W$ H- i2 D* @# i. _+ N" A# t4 e& Q
Code:
4 q/ k& u$ R5 |' }8 ~% j#ifdef __QUGET_SWAP_FIX" V. N3 j' }3 O2 W3 Q4 C
: K+ c5 N) l8 R& o. ]2 }: O" m" a4 ^ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* g, u& t" |+ O$ s) V4 @ pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 |- a1 ]" N% C" n" k- [) o; c' O; x! A! k t0 _
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* E7 g3 G- F+ w4 |& Y3 v pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 d. O+ W! j# Z9 w4 V% W2 ^6 K
; u9 ]1 E# i0 ~ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )3 G# Q9 s2 a# D3 y* X" f
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! k# z/ J3 b$ w, q) z# e8 \. u) j1 t& y" Q& c* P" J
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" ? R0 P9 J! q- ~' [& Vand add under
# u$ X. @& q6 d0 n: w7 C- v& i! @7 N! J' ?: K& N+ w
Code:
6 {* u: m" D* s* Fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 q1 e9 g# g* a' t2 f {# B# \4 A5 z3 u1 \. U* ~' c
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 );
, S8 L; [& F0 I }this7 L1 g6 P4 C# Z7 ~/ [! z
# s- G& H! P$ _& _
Code:5 E; H+ |0 S2 @! U2 ~
#ifdef __QUGET_SWAP_FIX
1 p2 K( o4 a* o8 V) ^) ~% ~ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )2 e, `. }) `5 Q4 }/ T3 h, O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 v! z1 T5 A" M w- C+ n
, R0 A; M) E, i+ T6 N% Q1 L if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
0 y8 @- m/ i d5 j8 n pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: R9 k: z! O& A5 R
" i# ]8 f" I8 M% {# a
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 x4 l6 P9 J9 }5 ^3 p( p- R! s
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& G$ E' d# a% h I8 ~
: k- \) e4 B0 R+ [#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' ]1 _+ \' A- K6 ]+ d2 x! k# l+ |& l# V6 |6 p* }. ^2 D( X
+ `0 P2 y# o. e6 H4 y$ { |
|