飞飞世界论坛

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

作者: 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 - I( ~6 ?  Z- }. U' U7 K
I posted this because someone kinda posted a youtube thingy about it :O.
7 B. y+ c3 ^& {1 o# k1 Q: B: F9 @: K) q* M% ^+ c- x8 q3 O+ y
Find this in DPSrv.cpp @ worldserver
2 u) K/ F  W0 c& m8 X2 F0 i9 V* U7 x6 R* J6 V. v& W( b
Code:
- E% m6 y" B8 Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 }+ x0 ]! L! _
{1 \) k- ^, y. `# v3 l' y
        DWORD nId;9 F5 B, `9 U9 K! Z( }4 N
        int nPart;. @) Y3 I8 Z+ ?; ~) Z/ J2 V

. V7 W+ [0 T( X3 j        ar >> nId;% l) K1 s( f/ @  U$ G) g% t
        ar >> nPart;                6 z; K# q" `* D' Y
        1 m- a+ N. k8 `& s9 R2 J
        if( nPart >= MAX_HUMAN_PARTS )        1 A' J0 Z2 D  Q# y
                return;
4 I* q5 c, I; d3 a3 |3 ?
, a5 y& K* o, g* U        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( n$ c# G" C/ h& w
$ M  b% b0 d3 ~: B/ J
* ?% i' l6 Q) |9 ^/ A
Code:( d, E) U: Q6 q8 ]8 q; B
#ifdef __QUGET_SWAP_FIX
% p# Q* C3 O* M6 G) \0 L2 C$ y7 u) \* H6 |7 W5 h  b- I# q
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
4 K2 w1 R# X& Y. P7 T3 {1 f                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
) s; W5 V; ^5 b3 v6 Y+ e! m8 N
! z2 P/ ]6 d/ y2 s                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
  A" ?0 j/ K( y9 Q- A# P                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 Z6 w5 B' j  n: `. U& n( }

( r: f6 E9 z9 [$ h8 B1 {                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )* {- [- G5 Z0 t0 k* j7 m
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ I8 R6 |) W: k0 @/ \4 o; G

' E. z1 v  u8 B3 }#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ E) K0 O  }# r4 R6 C, xand add under
+ N$ H; D' s+ r2 v( K# M
# c0 X6 k2 \% c  I5 r) \Code:
8 }9 B9 ^3 J0 I, {2 yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ ^% J# Z( A8 B) n: N, E; V# {$ j
                        {
+ G! W* S4 C+ |2 z                                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 );
: F& U2 ]1 k3 A, ~) q0 O4 W                        }this3 y! q( l/ O$ t! i  O
: {& D6 ]8 u* @; C2 ]7 ^
Code:  S; y2 J7 d; y6 ~
#ifdef __QUGET_SWAP_FIX
" |# a) \& [  ?4 i% \8 \! U! V1 \  [# t                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )* I+ a8 Q+ F/ w. k5 y( A2 I3 ^
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& ?' d* }) m+ g) D6 ]# S/ ]. B: _* t) g
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ). {" B) M! B+ `+ o
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& H) r8 ^9 |5 j% r' _% r9 ?7 C. d6 Q2 c) a& h. B. ]2 W/ ^; T, U
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( v& V9 ?2 @3 Y' D9 c
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) ]9 Q: _6 W3 m9 O

, t3 M; ^" k: C4 e- ^+ J* @1 x6 D+ q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! ]% W" f1 _' Z9 _* ^# p: O9 I

1 e5 F8 t) Q" i4 ?( _* e& n* B% h! F6 i; O* E! B' M





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