|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . {) K5 E. D0 c |
I posted this because someone kinda posted a youtube thingy about it :O.& H# ^, h( C z1 y4 W
2 u. N/ W$ z# X! O2 s
Find this in DPSrv.cpp @ worldserver9 Q5 e" |6 `! h4 T
+ O# l- G! H' X: oCode:6 i( I2 D: n1 m1 a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
+ a6 e' \1 O3 N& _) q5 t{3 ^) @+ c& R7 v' L7 v2 Q
DWORD nId;6 P4 I: V( Z6 D+ U c' _% w) l
int nPart;
; W1 o5 h! D9 a2 Y3 B- [: I% o' B7 G7 r
ar >> nId;
+ }! |4 `" i2 T6 R. U$ Q ar >> nPart; ! F% f: x6 o9 @/ w
8 ~ t& R& H; z; T if( nPart >= MAX_HUMAN_PARTS ) 7 F. l! d! @ d) R7 h
return;$ j" y* {' \1 U. r# C
& g& e4 ^8 d7 t9 L. `" s v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! C. e& S; d0 X
9 c( j4 q% T; o ]- C( N S. q. A9 k/ k# U0 {; j) b& ]2 r2 m5 F; I. r( y& h+ h
Code:
3 |/ S m7 S" P#ifdef __QUGET_SWAP_FIX
: N u* z/ j9 [3 W( \# a7 }- Q0 D! K+ W& v, B2 P* J
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- j. v. _: q3 ^5 U
pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 I' f( [0 }& H3 J# m
) J& s$ s9 J/ b B6 @7 E% J& E# o if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): Z5 i/ B) @4 m/ e$ e5 e* A
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 o4 x1 p( {8 s8 B; R5 r2 }6 X D- k/ \
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
7 r; I3 G) A1 `) Z pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );4 ?% w8 j$ c) Y/ `) w: h$ L
1 h1 h$ `7 P5 A" E5 d: L
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ M/ u" A/ ~$ a% h0 |% A/ `and add under" Q8 o) K. D+ E# q6 H
# c, X* y0 N: v& a. ECode:
7 U+ I/ g% K, x: F5 {+ |; Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); r+ T7 _" j% f+ V6 ]/ K
{
9 F* O3 M' u, y: z% M; P" I+ m 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 B- o+ B( V7 O& |
}this
$ v* Q5 s. H1 }; b3 k/ ?1 K( [4 i9 N$ h7 ]
Code:
! F* ^& c2 g0 m+ @2 U0 j#ifdef __QUGET_SWAP_FIX
( d6 W( G; B% [2 N" s if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 D9 l: i- z$ I, P! C: Q) z7 a$ { pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( y/ ?5 v4 `2 I$ w! \" k- O: ?* w( G: j. }* q# l4 o6 e5 ~
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- r3 q: f* S: H0 `
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" P5 b$ [0 S- S5 w+ {
& N4 o1 L) U3 b if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% f- E$ F b% F4 K0 e3 s$ M pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ y& ~, i3 ~5 y+ M2 S; f: V {
- V W5 |. F" v! @9 |#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' j, Y, s* a3 ]0 U8 g6 H$ [8 G" ~* U* V0 l0 P# Y7 x
5 r, g2 o4 _, @8 G$ L4 p |
|