飞飞世界论坛

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

作者: 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
3 T) o  q! A9 A' h1 p9 V6 g: O. y4 n% kI posted this because someone kinda posted a youtube thingy about it :O.& n# Y  b6 ^5 [; i* u3 S+ Y- f1 ~" K
5 }4 }6 X1 F3 M" L
Find this in DPSrv.cpp @ worldserver6 j" T2 w# X% A* U: C+ W$ v
% z* e. N" p/ c3 M0 `
Code:7 Q" d7 M7 Q0 N, _' s! v. f' W$ P
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 S$ J1 w- v3 V+ t; X, v- O, ^) Q
{1 o8 x3 y% }4 b1 t
        DWORD nId;
& s2 M" H+ a; c2 n        int nPart;
6 i, F( e! V: |) j& n/ e) H
' D* d6 `$ t( ?        ar >> nId;. C( h$ V& G% c: C
        ar >> nPart;                . [5 `2 [" T7 H
        # u( }. V1 C0 s( V) g/ r. O
        if( nPart >= MAX_HUMAN_PARTS )       
0 B3 n* A+ V( o' x8 N                return;1 E" I( t* O7 h
# b; E" x/ Q* |. z" L+ F
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. n* V1 d# a; r$ n  h& Y/ }: {: k7 V

2 p- g' y9 \. b# H1 Z: ~0 z. S7 Z( f2 K+ h  n7 c& n
Code:3 I& n% r7 {0 t& R! W4 s
#ifdef __QUGET_SWAP_FIX
0 T8 @, U2 l* H( R8 Y: O+ h# X  j! g" j) k6 L# v* F* `
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 N6 r4 F6 p  R* R/ f- O
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 d" S% V8 M( e, O7 I* b! H; |
, T* c( L9 K" e2 X9 v                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- d3 v/ o: ^1 T  k3 D2 j9 M8 i) j
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 f' c8 z4 x! T  P. ~$ X0 ~
, Q) D0 F' a" _& D3 b# u0 `
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )3 z* }- m9 n$ S8 Q% W/ s! v* Z& T
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );' @% b1 [* c9 _8 r
0 K6 A+ x( B& f! G1 i: S% m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 M# e- A9 n) v. h8 D' F# V: b7 vand add under  C1 }2 N' q+ h4 @$ D; J  ]! [! q

2 @+ A! B! K) V; i! \- z2 \Code:
% B6 O; y$ |' ^8 \6 }  F6 rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). f: J0 H3 z# x6 l
                        {+ W2 t  J9 Y( Q+ _. \. y
                                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 );2 F/ K8 @* C" R$ ^# e
                        }this5 H% h# W8 Q" W; G& ?2 a4 i: V- u

9 k) a) y  u1 q' U) x! aCode:
$ H4 [& r% R# x* M% r#ifdef __QUGET_SWAP_FIX
3 Y5 s8 k: O9 h, ^                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
) H: \' g& N) D  z/ Y                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
& ~! K! K0 {% B. ]8 ^
. q6 W) e3 G9 T4 Z: v                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )+ L& I: L! `8 n# {* Z, h
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 \) {; o3 i9 B
1 k& {* a. m8 {, _5 [) M+ l
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )' U" b. |- v; p) M# @' m
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( b7 h. F' `) Y) E: r
& E' M( c7 }# k! j) _6 @$ @#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 ]" A- L/ j& h: C3 K% A" ^
' L  t  u6 X4 J) f; I( X1 w. U3 x# x





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