飞飞世界论坛

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

作者: 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 " W4 [; H! G) [1 d, a
I posted this because someone kinda posted a youtube thingy about it :O.; p1 l# V- W, `3 |" p
4 G, z. o. a6 ^4 W; v; L# \6 d
Find this in DPSrv.cpp @ worldserver! B6 \: z& _5 i( c' p( \* ~
1 ]6 M$ b# }8 B$ s) G- S
Code:
$ [& _  z" t/ U7 Avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 H; w1 m# d( D6 U4 p{
7 x( z' f1 b2 g( U        DWORD nId;
- G' E& F' t: @6 p- k- Z; Q! l        int nPart;- u% n! u! h! [; Z6 k

. U5 p( V) M) J        ar >> nId;4 ?& k' @4 t! W5 K$ {* w
        ar >> nPart;               
9 L) Q! u5 L  \" M( X3 b        9 \  D( G1 w& R7 J9 ~
        if( nPart >= MAX_HUMAN_PARTS )        ' U% [! O$ ]3 v+ r+ w
                return;
  ~/ D# @' t. Y* I. K  [4 k
/ F$ h! d$ z3 C# m# @        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 i- ^! L* ^' q8 |% H- a2 W9 r) |7 {0 \) S5 G

& [8 n+ {: q! Q3 O" E1 ICode:
. s' M8 p7 M, T$ b#ifdef __QUGET_SWAP_FIX
: Y5 @. Z2 C  p; G$ `
: v: m7 U% Y+ R0 e3 |( A                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )% q" \2 M7 T6 S; I
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( q& h% U" j: g% d$ C, }
( t& j% w3 ]6 c
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ): M3 W  n1 K9 u
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 \2 U/ t7 D/ V
1 J- O# j6 i$ j1 e+ I0 g/ t
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )1 U3 s' p1 f* u5 Y- F% m; G/ Q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( h, p% `: z' \4 w" _4 b6 h. c* n& p9 v( j2 R0 _( h" F: ?& Y0 c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 F- D9 g+ j! E* \$ {$ }; E7 `
and add under% O; {0 E0 L) |7 E# N/ S  E0 k. Q
& j# v! k0 J2 o1 z* D7 ?
Code:0 r7 L$ g9 R9 C* N, t" {" U2 \6 e' k
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( ^( I3 {$ O5 s; S. k( t) C
                        {
% F6 q! o3 f" x" B2 V; ], ]" V. g                                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 );
) D* Y! Q; r  D  T" v                        }this
% ]3 p& o, C1 J
: y) K3 P: w1 U- g$ m2 {# sCode:
4 O/ s$ N' d% s; F#ifdef __QUGET_SWAP_FIX" X0 q- N4 U5 P. i- P5 J
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
8 B+ F5 `) G* c* v% J2 U1 f                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 G* a0 H1 C6 D! C
( J4 k) u0 {  H! U* y1 A3 s! u8 U                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% V5 {8 ]( Y6 Q* [. o$ H7 T( n
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% m' B+ r  D1 h; A4 [3 L

5 w9 p) C3 {& d& w& y  R                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )0 U9 C- n1 M7 R0 k. a
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 S4 y0 B4 T& h: e# Z1 ?' \# _* u
: b0 X' t: G8 n" Q; k#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # Q) J3 Z; a. ~( v# |) R

1 ~( @* a- C2 g" Y/ h# i* j  C' e0 s( N1 z





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