飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16491|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1086

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1086
QQ
跳转到指定楼层
楼主
发表于 2016-1-10 03:43:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Hi I fixed the swap bug a long time ago it got tested on my server and it worked $ W) L% n$ f8 u1 v3 S- j
I posted this because someone kinda posted a youtube thingy about it :O.
8 Z/ D  w: i) d% a2 W& w  B2 c- N  L! f# S
Find this in DPSrv.cpp @ worldserver  Z6 b( k$ Q7 O1 z/ b/ p
% f4 U1 A/ H+ l$ l8 g
Code:& V) i1 d+ N: P( a3 N
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; y% y! D8 T) s/ |4 l- E* h7 c{
: c' W) l% ~* K1 \        DWORD nId;
4 q+ R0 S& t( z& V2 p: w        int nPart;/ {2 G0 f/ `  ?# E: A
" h) K1 c) G2 n: j: ]5 e0 D8 W
        ar >> nId;
; Y4 S! Y  d- a! i6 @        ar >> nPart;                * o4 @3 J4 f! X9 y
       
+ r, C- t. H& r" f3 j8 L        if( nPart >= MAX_HUMAN_PARTS )       
8 M4 J, z& k2 H; K, E9 Q                return;
! E( e8 V+ _0 l8 U5 ?3 G$ D5 X6 c% p# [1 a. x& F. f
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. X: X0 \/ }8 V7 |
* i% k9 o1 P* H% s- e4 k

1 ~# A3 b) x2 B9 tCode:' J# ]2 D  o. G/ W2 H4 Q+ f
#ifdef __QUGET_SWAP_FIX
& i9 L( k1 V/ D/ J0 }' P; {3 B* p, I" \% s; {% @( @
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )- C$ E  o) v9 ]
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
- i) L0 t  B- I0 y$ E( [; ~6 g. N1 c5 |2 `; N4 x
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 W( K/ B/ y; @9 A  Y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 y5 @0 s0 o& U6 z% Z8 k0 t! Z" ]1 k. V  i* H+ v* y3 R1 K
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
! h* y: X% M3 ]. }2 i! ~                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ L) j9 _3 i9 y2 d( ?: \

4 q9 A* R( z  V8 f  N$ v' O9 }6 F#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) R9 p! j; k, O5 m9 f: L# x4 _and add under! i+ O- g0 K6 x, _, e

7 K2 S) ^% }2 ~: k8 C# NCode:
; S. {2 Y( [4 K( M: Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ), b7 p. l9 o( B) b/ o
                        {
* v+ I5 m/ p* c                                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 a" @6 [4 f# V
                        }this
9 ?+ w% q) m4 Y, Y3 F) `  p( G8 Q3 [2 A
Code:
! t6 m! V% H% u9 R#ifdef __QUGET_SWAP_FIX
; P; a4 a' @& Z& C  C4 [                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& l$ e: ?! {) E$ B( X$ o1 p                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 v- b0 _6 c2 L; H: D0 J) h  Q8 Q
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
: N; q9 s' c+ h$ n$ @1 F. E                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 t7 c8 v! t2 Z; G7 J
' L% U# G9 o, H% }. N$ p
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, j8 d; f. _5 x3 b! t$ P) M# e                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 w$ e5 V8 J/ h$ u/ R3 ~
+ ~0 N- J- A/ L3 X- K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . S2 t3 q* r2 `8 `
: V- u9 R5 a/ O0 l( e" ?  m
  J: L8 b" \* _: B% F9 C; U

相关帖子

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|飞飞世界技术论坛  

GMT+8, 2025-12-14 18:32 , Processed in 0.058943 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表