|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
2 q. ^) d, T8 yI posted this because someone kinda posted a youtube thingy about it :O.
5 u3 R& ]1 R6 a5 z, G. W6 @8 v+ O3 I
Find this in DPSrv.cpp @ worldserver5 }3 E( }" k* S+ R7 H
$ `2 C4 w: e0 v" v
Code:) } k( q6 a- b+ i1 V$ [0 e
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 v- _% k, ? K9 P* r{
# `% \5 X# z3 {$ c DWORD nId;
0 t# n# t+ c" w' j int nPart;3 c+ \% D3 x- G P/ e6 o; v
1 n4 m0 ]9 T( D3 ] ar >> nId;) P' u4 G" B. U, T- z; a
ar >> nPart;
9 k% g3 [; I4 N2 G( m* k+ O7 d 0 d0 [: d/ D; E6 D1 g D' A6 A
if( nPart >= MAX_HUMAN_PARTS ) 6 k. S- W, I# o& r
return; ]; ~0 [& V$ R, [
+ [$ ]+ V: u: |" T" D CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 u- m- E4 I: y7 j o, D: y2 O1 c8 b" K
3 Y, {: l5 [& X, o2 E
Code:9 }$ x. m; ^( O3 K
#ifdef __QUGET_SWAP_FIX& E& U, E" S7 v$ J+ l4 Q8 ?; ~
7 [8 h/ |6 p& s& w if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; s x" p9 h1 W% r" |( S. ? pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ q; L- f$ S. d p5 X
% a; n5 [% o; M if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 h8 m0 K! N3 T) }
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' [7 u) T9 t; j* F/ {: T6 p3 Z9 K* z' m6 d; w* @7 a3 r! C
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
/ g4 x6 ?+ }) j/ d3 [ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 q [" s3 _5 L$ _& x, x6 ]% ?, K# z, M0 G8 I3 g
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ j; n! \7 v/ R! G1 [# Q+ b, j5 H/ pand add under( j4 k& T2 _ \& ~
. b- O/ d# A7 d5 k- w4 X
Code:& H& o/ T, N# x$ V7 Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 K3 N) i; e1 j. \/ F! \1 w
{
' ]5 G6 }8 f" p+ g' m9 }' a 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 );. }! J# ?) C# U# |. j% z, J
}this
4 j5 z' X8 ^" x5 x' o8 C3 p
* x/ _! C' S+ j t/ ~Code:
& X/ Q1 P) t( h% y4 i6 m8 u8 y `( K#ifdef __QUGET_SWAP_FIX0 t C! @' ~' k1 x4 a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ R/ `4 Q' }3 Y+ T# M) B pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! d5 z+ ^8 r& |
* m: ?4 H$ u8 I) K: c$ M8 } if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
' a5 n, g$ x. y: q3 W. x pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
. R% M$ L/ @# z7 ~
. e) y6 S$ t) F) ~! l if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
* N" W+ G8 c- [, T8 U# P) u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 V4 n' G6 `6 V8 S& X1 G
- [' _' K- Q( s
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 A1 C' q/ t1 \7 J. s$ a, C
5 o7 X3 I- z l' L) B& U. P# u4 r2 i: j7 @0 R' y! J! W* [/ F$ \
|
|