飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16394|回复: 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
. {+ A3 @! C0 u; Q) L+ zI posted this because someone kinda posted a youtube thingy about it :O.0 K4 p0 v3 B1 K" g, G6 k* d

# h& t& H% v. e9 }Find this in DPSrv.cpp @ worldserver- }$ j; {1 s$ {4 K
+ O2 J3 J% s$ f$ r: n/ S$ f
Code:  W; ^" M9 c- N1 g6 ]6 F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
+ {5 d* ]! ^0 w{: W, [: Y- L+ e6 s. J4 f. f8 s1 D
        DWORD nId;
0 |$ z) ~5 x0 S# |0 D6 E        int nPart;
  \; O. B  w+ t7 W  y; R
" T) c" l4 I/ f6 d5 ^        ar >> nId;
( {2 N( F! s- K2 v, S( n! A        ar >> nPart;                6 ]4 v" s  W) r8 e' q# z) t7 |
       
1 x' d1 x! W3 Y        if( nPart >= MAX_HUMAN_PARTS )       
4 c. C6 e9 D$ M3 r$ E1 q                return;
" j: R9 ~; o4 T( E# j- }3 {# t
/ L. y8 D& }$ y8 a        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  L& {! C9 R# K

8 E. g4 R$ L0 t4 J+ G% i
4 H5 a% K3 f. B8 }$ @Code:; O: ]" u9 O, q3 R
#ifdef __QUGET_SWAP_FIX/ I. \" W! P. C, s3 p! U' o
- f9 a; P/ Z( F9 v  ]$ y+ k3 ]6 U" ?
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ t6 \1 D7 L# T( O3 |$ l: j; I4 {
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ u" [: I  @! ~1 w- n' S+ E, w; k
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )/ q4 T4 z0 i+ H, S
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) i% ^2 \- X3 T7 x3 G' W1 v5 D" H, t# O
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
, v8 b/ b1 s; d                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ P! z) B& D9 _$ P* p; ^2 Q. C' j
. t1 `( z9 ?; P& f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: k6 X7 {8 o& P% nand add under
7 Y5 H5 Y* f: l" [8 J/ ^2 a  E5 U- Z1 }, J
Code:
6 ^8 e; x2 y/ I2 s+ r) Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' W- ?- I- }4 a0 Q' {
                        {
- a' R! ]( h  [                                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 );" B+ a6 z1 Z5 O. J5 ^
                        }this4 P. I6 l; a, a  Z- Y3 _
. ?( t7 ^: f  X6 |4 a% O
Code:) m. G( g4 n" ^
#ifdef __QUGET_SWAP_FIX
3 F+ N/ V# O0 C  ~* g1 J                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )  ]; v: {3 b& H" [+ A2 l
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: J# I" W3 x; N# B  @
" S& _# B! Y3 O9 m( i+ a  P7 O
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )* @1 t* [" m' V; `2 [1 X
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
4 S5 {2 a7 i9 Y  E7 k# ~. x$ h! q7 V5 C' ?' e
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( Q; t  V6 S. P8 E1 ~: e
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( L* _0 }6 o+ T+ ~% g

  g0 `6 J. x" ?/ J+ Q' A5 s$ Q5 [1 ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& M  B8 [1 H! c# `9 i! \' }- B' q& _6 v7 i

9 B0 ]9 S- l) {) c( T" r' T- W

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-8 23:36 , Processed in 0.062852 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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