飞飞世界论坛

标题: 修复交换错误 [打印本页]

作者: admin    时间: 2016-1-10 03:43
标题: 修复交换错误
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
+ z$ \  t6 q. s; r$ v  X1 _I posted this because someone kinda posted a youtube thingy about it :O.
8 I4 i* {+ E. v7 y- ~3 K+ K1 k" P! ~5 I4 k
Find this in DPSrv.cpp @ worldserver8 X8 ^% B4 C& x0 K2 p* @
, ]1 {% Z" \% e6 D8 x
Code:
) i4 a1 A- I0 |7 @  c$ y* P& @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); z! ^( h% \2 p6 `9 J/ v
{& v& a9 s9 g. C" G# b% r
        DWORD nId;
0 B4 ^, k9 U1 B2 `8 W8 U        int nPart;6 P! O, C0 P! c. G% z
2 w, r/ z, F# w
        ar >> nId;
4 p% p6 b; W4 K% H8 ?        ar >> nPart;                , p3 p% N+ N% ^
       
) X" w  A4 C7 c, J' Y        if( nPart >= MAX_HUMAN_PARTS )        9 @) b$ w  \6 l
                return;- e$ E; B  F, M+ e7 |  R
# V% p# D: W4 t3 S* Z
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# @4 n1 d; K0 w

. F; C9 T- k* x9 g9 u8 s
; l8 V# {/ z2 j9 }0 bCode:4 S  ?! C5 B  z
#ifdef __QUGET_SWAP_FIX/ t( e- e- G1 x( q" V
- e% d7 r- y9 l# Y; {0 A" {. p
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )4 @2 ~; H6 V# L0 ?) {3 g
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());, z: [8 R+ Y. T8 O8 `1 V  n3 }
! j% L  z/ B7 P1 ?1 A! P: K) m. u
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
0 V) I8 s$ r$ A# o! Y, K                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" R( H0 w5 _6 p5 e9 ]8 e& c9 a4 f0 r5 i$ ^  Y2 ~
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
& G6 z- ?9 J# a( T& O- V: Y                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! f  L- l0 ]3 v- M, ^! h7 G6 x
6 G! F* i4 W, E4 [4 z8 U" G5 Z0 L1 }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" N: y( h7 J. A4 S* E5 N* Y, Land add under5 H; |9 g7 z" g: H  v0 u
- j; z* b# u* O( I
Code:: T/ g9 Q) i) V! [8 O( ]& v
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 s) I/ p  b# J) x& Y& ]                        {
6 k- ~; [/ A5 T/ m8 \- x                                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 i" H/ n! I' I% V+ \                        }this6 ], h" [/ g2 {' w

1 b  ^  B) T) @$ [' C. l2 ~Code:
) y2 g  @* R9 [#ifdef __QUGET_SWAP_FIX7 T) S8 u7 L% C8 H. G
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )6 }4 c8 ^) x) b9 C
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 [( m' @7 @) _9 b; X0 a- P# A7 e0 Y) c7 q" {+ s
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
5 `( i' j6 P2 E0 u                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' r0 _) O- s# D3 j: J

0 P- A; W2 x1 C4 |  ]+ m1 c                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
7 P) m( ~4 ]& f0 R1 v: \. N                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ V; J2 U% s5 D
1 p2 O& ^) _3 {) T6 L3 K#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , Z& j+ t$ ~7 }) b

2 W& M$ F1 ~3 F9 I
& |- D9 o( H/ X8 t




欢迎光临 飞飞世界论坛 (http://www.ffwold.com/) Powered by Discuz! X3.2