飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1084

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1084
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
& x0 S$ f; ^# G, i9 XI posted this because someone kinda posted a youtube thingy about it :O.% t2 [$ z5 j; s* Z3 p. \

$ q3 M+ h: I! VFind this in DPSrv.cpp @ worldserver& U9 y7 |; ~( h. m. p

' P2 X- Y2 X* M8 X; pCode:6 |/ g& Q( K. |" f$ s# Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# c2 A) W* |9 w{3 a% H1 k9 ^2 K8 O- \2 P
        DWORD nId;
& _( m% E: ?* R5 I2 m        int nPart;
) S- Y0 g" M# s% T; b' M6 V4 t7 Y: E# n1 W
        ar >> nId;# v0 M3 Q8 n" k( v6 c
        ar >> nPart;                # R* ]* J9 x7 m0 t" ~/ E
        3 v+ i$ |/ ]* J# r9 q( t4 R
        if( nPart >= MAX_HUMAN_PARTS )       
  q" o3 O+ v- e+ r2 I                return;/ ^6 x% {9 i4 N

* P: N3 Y& g2 c0 e; R8 n+ k( X# L        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 |/ g! l) n9 Z' E. M5 @
( N8 @2 D% S& ]  ?* n% I% ~' [1 x/ x
Code:
% V: _- i4 f9 h4 E' k3 j& X3 |#ifdef __QUGET_SWAP_FIX
9 P$ ^+ E7 ]& \0 [1 [7 f. x) N9 T% m- g2 [! r+ }
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )# w$ L/ q8 a$ M7 Z5 }7 O8 l: S. y4 A
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
. s/ W$ c/ a# m- ~9 ?
4 y% n& S! M0 [( B; J! U+ _$ Z7 [0 t: G                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ l1 V- R. D  v: T2 C0 [+ p3 \8 y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 s1 ~( Z0 r, ~: F; O8 Y) u
% m* s, P# D4 |$ [. I' H  q5 c
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
/ ^' w: i0 _) j! z" D  _& ]                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' `5 T+ W; f6 v. D; f% H) J; J$ p
% c% f- K% t. r5 l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 L2 _- |4 V% ~$ j: m
and add under+ `, D! `6 u7 |% Y6 V

8 k: k) @' c1 r2 n$ I- KCode:
' _' F# ^$ \; Z) ]if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 W, M- g, D3 s% |                        {
4 ]- I) U6 w; L4 ~& `# l                                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 );! C7 J/ k- f3 t! b- H; T. Q! a  r
                        }this
- y8 g) \, }% s4 P/ {4 }$ e9 Y& n/ H2 M9 J$ e$ j+ H5 `  K
Code:0 F6 S$ r6 `+ H* |
#ifdef __QUGET_SWAP_FIX3 i1 V% q- t$ p1 r# F
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 y( r. k7 ^; A" S
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, k- y, G' v$ M$ B3 M& P$ y( J* @& G

( G0 t6 U- K3 ?' w                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
8 ?. D' [+ T1 d3 o                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 o. r$ ?. |" p6 C4 i
. o' e& q- i2 ~                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
3 e6 O/ P" F; k. X% ~7 [$ x% W  o# ?                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; b" q- M" u8 C( ]
- t7 W  J' ]# `9 P8 L7 C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver   |& D' s) t, {% b

) l/ p: d, M% ?/ S! x$ u8 ]! ~: Q4 C3 W$ D' Y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-18 03:46 , Processed in 0.067532 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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