飞飞世界论坛

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

作者: 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 ) t% u$ F0 x4 \
I posted this because someone kinda posted a youtube thingy about it :O.& S) V1 A6 P1 ?, ?7 x/ X

) {3 N; {1 ?0 p( ?Find this in DPSrv.cpp @ worldserver$ ?! `! O6 S7 P% u1 q& G

2 U# a0 R( j( K' M4 U" O9 e7 VCode:- G( J8 E# j3 p% G2 v1 i1 K7 a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 h4 S+ U1 e% Z# ?% s{
; c' L& T0 g2 P$ Q8 E. p        DWORD nId;4 A- r9 u0 e9 A& Y, W, G! t( O
        int nPart;
+ ]0 e) G! I$ e
7 X+ q% S7 v+ q- F4 g  Z        ar >> nId;3 _3 d# z% P, t" e
        ar >> nPart;                ! P0 M8 I& v+ ~, o
       
! ?  U. o4 f+ W0 @        if( nPart >= MAX_HUMAN_PARTS )        1 R, f  |! q6 y' z5 ^: g* d+ N2 ]
                return;
+ Y& n% H" `; @0 n3 q5 E$ ^+ [2 Y6 k: K) k7 H7 m9 l5 x/ M0 \
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  m9 k6 f8 m3 @! f) N
- j7 z9 l5 x) K" p4 q
- u6 b8 P% l9 U; |0 ^3 D: N# V
Code:
& |# G& R& s+ l' k0 U# `- i#ifdef __QUGET_SWAP_FIX
% C1 A. |; p4 W. T9 P# M: F/ E% o7 m. n
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' T- M! j, b* p                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
. }) k: ^* j! W4 K% E8 }$ B, C" M' K# Y
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- n* \- V+ d9 x6 ^' Y5 s# {
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- Q8 z" o! E% A* S) t# x9 M  g" J4 [' C0 F
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ). x( W- v$ i6 E6 t8 ?+ k
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( z% m: l+ R- t. R9 |' E; }

" c1 q% A; g( I; H) C2 ]#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( l3 X0 U( `6 f' J* band add under
5 d: m* d. }! o, w: b
$ t1 ^. t) K$ \3 x/ hCode:% ~9 M5 p. z6 a$ Q  E
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) \9 P5 ?7 |& q, d* ^/ O$ ]
                        {( L5 m8 Y' h9 |  [" 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 );
0 U5 v  M3 r5 W9 [& D                        }this
0 J- H+ N2 _8 r! r4 ?( `: ~
3 B6 j0 M! S  B3 |$ CCode:9 a8 ]' L4 z6 }; w& _3 ~
#ifdef __QUGET_SWAP_FIX3 ^2 Z* P& n$ x4 M- b7 N8 c
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )' i, u4 P! s. X6 L2 `8 X
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& ?; v: C- d* v, `

  l0 ~/ n" A( Z% w3 T) o8 a" _                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; ]6 a, J* L% y+ u' Z/ r2 _                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ ~: v* h& x- Q7 y4 c& q, w3 C% U$ t  ~6 @7 j+ g
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ): B& d0 p5 b6 b9 @# x
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! T+ D* J; Z* `' U5 w" F5 \
* _7 F, y7 G2 W! H#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) M# h8 `- c# e/ A
& p! Z5 d$ b/ O8 C. I
) j$ o2 l( B; `6 q; i





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