飞飞世界论坛

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

作者: 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
9 h0 H- I3 e6 \% G* C& Z4 CI posted this because someone kinda posted a youtube thingy about it :O.
1 W4 V5 @9 ~' X+ D# d- r* o) s0 Q( C; f! c( u4 A
Find this in DPSrv.cpp @ worldserver
5 ^0 K# Z# {9 I- o  T6 f/ G: J- a, |% G; n
Code:
; b1 ~, I( g1 ~6 ^. ~4 ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
/ o' j9 L9 W3 e{$ z, O. A8 L' B: d& ?7 v
        DWORD nId;. P; n! f7 [' y9 H
        int nPart;7 H! E% m2 i5 o, E7 P) Y/ y
/ t" ]3 p1 n9 ]
        ar >> nId;/ R  {# z; L6 a; D0 J/ r, g# a
        ar >> nPart;                7 M/ {% N1 \  u
        5 e  X. R8 j9 I& K; |
        if( nPart >= MAX_HUMAN_PARTS )       
: M( b/ M7 R( q5 ]' l' x$ S                return;
9 r$ V' P0 s! o* s( \. \6 R8 ^5 `  ~7 e( i- z/ m8 ]! d
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 S+ H# G! G" u0 @6 `% N2 }/ b5 ^4 g) v) C! y6 L' ~+ R
0 N* r. [7 ^/ d+ g3 L3 d
Code:
: s% o: L0 S/ k9 D  O0 H* z#ifdef __QUGET_SWAP_FIX9 C7 }. O0 w2 U0 z) C) a
5 y" m7 e* G, N( l
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )" L9 e) J/ m- y6 o( V/ g
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
  g* Q* f; z3 j8 T
  [+ V$ L2 t4 I1 H                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )4 ~) y* r! b4 c- i4 d
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# i3 _4 }8 V- h  l6 Z0 n' z% F4 ^" T3 S# ]7 q1 E, M
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
5 P. z3 N4 s5 R7 Z0 Z) `& I) M1 |                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; \) T7 s2 _+ Q5 c5 O2 j6 D* Q- j, w, ?/ B, v: d3 `7 }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; {4 y) M: `( X# _7 a
and add under6 C& |* ~# X3 {' j

# V, O/ J9 F" Q' UCode:" E, M; x! n7 e4 k  F- Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ ]; [( d8 E. d                        {
4 ?& |7 N, U+ 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 );& f' A7 q- V6 f3 u4 b
                        }this
% I5 G, T6 T6 s: B6 n
8 ~* r: C" L& t8 c. JCode:. X+ y% a- g6 k
#ifdef __QUGET_SWAP_FIX
  ~$ J. _& h+ i                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )$ f- X& \1 z0 i! |, R
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# e  i* j; t9 k6 w, V1 p' W

' n5 L7 ~9 l* |% r" Y                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
- i6 L( U6 V- c, p  _1 y( R                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- X& F5 `* q4 Y, \
. a2 f) k7 P" D( B' ^: x& A                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
- O, X' J# B, y                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );  [5 V) N( Y. y3 D6 ^: p7 Y
' A7 G/ b0 X% O
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 i9 C/ i! h8 P$ i
5 H9 w2 c* z% Z6 e3 d- U3 ~* x) h* s  G





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