飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16382|回复: 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
! w1 s0 q, O' N" CI posted this because someone kinda posted a youtube thingy about it :O.3 V2 |. J, e* F: p

! K2 `; U/ k/ X- a. xFind this in DPSrv.cpp @ worldserver  W$ B- h5 d! d) i: `3 f

* ]9 [8 d; N* Z8 z; ~Code:
) c# c' \% r  gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; M- \% A2 p- F& r7 l; Z{( g0 d) U9 R+ u1 D; b
        DWORD nId;
, a8 r+ k) k" ^/ n8 o% t        int nPart;; T( j# m2 A! r

% y8 a2 x8 {, @, S1 ]        ar >> nId;
  N8 a5 ]$ K" E0 }: H        ar >> nPart;                4 ?5 G0 s9 i( v! |- ^$ m1 M! I
       
6 }$ O% a; S  t. t2 @0 d7 s" A5 S, d        if( nPart >= MAX_HUMAN_PARTS )        " w9 Z3 {2 Q5 |; ~* k$ N* ~
                return;. E2 G8 O; G( G' t1 G
$ ^/ I5 z. N* `8 D* I! Z
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ D( z2 _. P% J: p0 X

& s9 E1 F1 G5 H2 U- o) L4 H
7 ^5 O2 ~5 ^, }4 B. X, sCode:
5 x7 |* I7 @1 M6 V#ifdef __QUGET_SWAP_FIX
& ^) S1 A6 c# m* e4 b7 E
" n1 H: N2 b) C                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ ?* q- b4 p# r$ q+ S; \5 p                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());  {! Z" U" F" @' v
4 d% }6 N+ u$ H6 I2 W' ]
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- O: g$ c" g6 ?
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 `' X2 E* W' Y

# Y/ n$ X+ w5 W  B4 n1 A) k; e                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" Z; f/ J1 w8 R: T( A# n! M8 @                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% P: U' T. O5 q" Y0 k5 q# R5 G0 ^

) E3 Z2 k' m0 `/ g+ m# `7 ^+ w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 q2 @2 `. i4 p" y& X0 A) z4 l
and add under/ |; |4 x6 ~! z5 @1 g/ c3 C9 X
6 O/ K" m7 q8 j* _7 X/ L8 T- W2 V9 q
Code:+ L9 D+ ?( w, x( Y/ B% g  U+ w) ~
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 J$ u' k6 L9 q4 w; c' E1 V                        {
# L9 m' n" o+ T' f- Q9 u/ r                                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* Q2 p! |* D5 y2 \7 _  H
                        }this8 [" w: G3 [  z* e" |4 ^

+ F3 D+ I  Z& J* SCode:
& F8 T, f" N! g#ifdef __QUGET_SWAP_FIX  t! S5 W8 U' `7 L# H4 J$ y4 X7 H
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )5 G% P7 b$ b3 V# ^2 j) \
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ \! n' \. p6 Z/ m; x

+ }& F. {& x2 c* h, P                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )2 `# U) _# D, e
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! \8 r3 ^, L! [  z  }
3 x3 t/ J: f* Z0 S                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
1 B2 D) R% b( O7 G                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ X. T% i, D* t# l4 I& v
) V% @$ z) A$ }4 w; i9 C' z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 q" H6 M5 Q- ]" w& Q- v7 G% F: {
2 s2 V  _: k) L; P' M
! ?$ H  a( g2 a: A! U! A, U

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-8 09:48 , Processed in 0.061480 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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