|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ' ?( `% U1 I) P0 o1 B- B+ Q) @% B
I posted this because someone kinda posted a youtube thingy about it :O.6 s7 R& |9 p* T1 a1 E' K; z* |
; G/ L* ?/ z9 \9 \4 M5 q# t
Find this in DPSrv.cpp @ worldserver
3 Y2 N6 p! X) F: _+ r# m2 r, M1 P6 V# f2 c7 I! j
Code:5 V; s; l4 I( R) R3 a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 `) @! P5 ?+ ^3 e; g: |{
1 e. k! `8 W+ U6 x; B. B7 A M DWORD nId;
- K# v3 u8 u% h7 o! V int nPart;6 J9 ?) M2 ], S6 b
7 n& H& t, @- G6 G ar >> nId;
; Z/ x( x# p* p( @, w. h0 e( M3 U ar >> nPart; & `" Q4 G; S' ^* ?3 _, U
9 a T* A/ g$ X1 U1 t4 }
if( nPart >= MAX_HUMAN_PARTS ) - h4 c# ~( N A* }
return;& ]$ t0 p% I6 `! {7 [0 ~" z( `8 b
3 s$ S. y) z+ h
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' m" q- O1 L A+ E3 l5 I
8 [+ L# q. q; P$ |: F9 ^: h) B% u) P: t0 n7 M
Code:
+ G& w) p' M$ L& s' v! F#ifdef __QUGET_SWAP_FIX
$ g7 M1 \/ f5 Y# `0 v' f' R9 n; P" r4 E
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 ]& e! R% u' F! W+ L; @
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; |* C9 e$ Z( a
4 q# R- x# o% G7 J i% D. n0 ^2 U if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ |- o# L/ W# z4 C" M pUser->SetManaPoint( pUser->GetMaxManaPoint() );: {* d8 `9 N2 t+ ^* H w
. f6 q+ x9 ?6 }% q* m1 p9 u if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 M7 S2 N; l% S( r' a
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# e# o$ m7 f. {, D) Y7 _* _
) X, m2 E# D; P- I: e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* O7 T x- Q+ L+ x
and add under
& e8 [. K+ ~, k
- J/ J f1 G5 P- t. |% P& w0 w5 qCode:
, X+ Y# d, F+ P* i' Q; Sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% [9 U( O, k+ t {& o5 R9 i$ R8 D" W
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 );
1 ?/ r7 @. U" b$ U- q! k }this
' K$ H! H3 {. L8 Z3 h& c; L2 \+ {* p5 a/ t# Y
Code:' @( e& `) O$ g2 C3 |
#ifdef __QUGET_SWAP_FIX
+ [" [; }8 Y$ t, i$ N if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )% l& x. |2 [6 v7 D O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! D# p6 E2 m: r0 m7 m* `/ m. Z
8 Y; J9 w' M/ ?. e" y- B* Y$ ~: H- W if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 v: y+ U7 q1 y, A2 F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ y1 _" O$ _. u8 @, I2 a( A# ?+ ^; F; _ ]3 U& w" @' }( s6 f
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 ~+ [' ]5 D5 ~
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) x4 A# l* T2 P, |) Q+ I( y& J
" n" b; N) }2 j2 j5 O4 Z' u, K" p#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, j% q: z j8 P; o3 l( S' x3 ?+ p+ i+ _: E( e
8 I4 {/ d+ g( E6 Q* s
|
|