飞飞世界论坛

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

作者: 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 * J5 X8 i6 ?# [, d+ o! `
I posted this because someone kinda posted a youtube thingy about it :O.
* T# t4 q0 v, G/ u8 ~; Y* N7 i
3 V( ]& d5 J$ L. _Find this in DPSrv.cpp @ worldserver
% b% a0 F+ d( i2 _2 ?! V" v) O
( O4 r4 E3 {) H) J; ]3 VCode:. \! p% B8 R, A' S! b0 X
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' @( M3 |9 y! I; V{
5 [9 \1 A6 B3 u( {        DWORD nId;
3 X# p/ e- c; l8 ]2 z$ w$ q/ s        int nPart;
7 a% B8 M! F' A( X) ^
) i' j3 S' r5 [. x$ _        ar >> nId;5 V6 X: y/ R# g" f$ O* t
        ar >> nPart;               
) C% g1 w" Y3 s( [& Q  I       
' m6 d  f% w7 ?3 O) s* N: j        if( nPart >= MAX_HUMAN_PARTS )       
( o$ J! n; B  b2 d                return;, G: t, B! j  U: f! @* F# g
$ h. y; l* V" F" Y. [" f
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) M. {- @) B0 I$ N
2 G4 w) N* D7 N' e0 Q! |7 B
% m8 z! J( i; i" b7 p$ o
Code:
7 A& E5 {  p; c# ?0 W# [! Q: Y6 y#ifdef __QUGET_SWAP_FIX( X3 B9 c, Q. s4 ?" R4 R  G

6 N( I. E- f: g& \) B, L                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ k: C  M4 Q/ P+ }: Y$ g2 Z
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());% [9 m( U) D% n) r1 z2 \
# R& U8 w( J$ z- o) _
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, s6 p9 N: }9 i                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );: c, Y7 c" _" I( h; `4 T; t

! l, M1 x- I- e$ A! b6 k8 t                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
9 s1 @: A/ b  ]0 K9 o  y) b; G                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! J( s. I! D( k5 w2 e9 j# ]0 H/ b' x: }( ]  r* o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ B. h+ l2 H* v: Wand add under
; c, l0 P& e8 q$ L
: v% _1 o8 r' Z9 nCode:
; _9 j1 S0 J" Y: j! p( yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- L& o) y0 |- z) j6 Y% @/ `
                        {' M. M& ]& @( e; l5 y  v
                                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 );" Q0 O3 S+ Z, \- q
                        }this
& _: v# u  |7 s8 [9 F% D! l* K- f( X* @
Code:
. V% V3 e3 u" V' N4 P; L7 b1 M#ifdef __QUGET_SWAP_FIX0 r. Z  e( b7 z: S1 c
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 z0 r& {4 i  I+ ]$ G* L4 N* z                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( v* @; P+ H6 v. d9 j6 [
# K5 L6 C  e2 x& \                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )4 {# v7 C  V1 {( \1 X; M
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) y- J+ T7 x7 K

$ G9 H8 W# f) i$ a0 C, b                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). ]2 {, J* ]( B4 ^* o! v/ J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! y  W1 K* W5 D& i5 s8 @$ N4 P0 O. Y- B5 n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
! R* {+ v4 [$ X4 V' U& Q2 {8 @0 L2 R/ Y9 o  r" m0 v0 _8 b
$ R7 E0 ?0 Y# @% M





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