飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16357|回复: 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
! P' u. o8 f' i2 hI posted this because someone kinda posted a youtube thingy about it :O.
$ p3 t3 o# `4 y1 b9 I9 p! K1 q
) `; v# _2 f% l9 i5 w1 C  J" oFind this in DPSrv.cpp @ worldserver" R9 ?2 K: _1 k5 o
* w9 g( U$ m) |  \+ t) m- P! |
Code:
2 C" l6 V+ A5 Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 f; ?: o( m+ T) R) w4 X{
! `: ]- g- r' q* @1 c# [        DWORD nId;0 d# L8 [2 R4 k3 u$ R0 Y
        int nPart;, Q9 V! V" p# p! r  ~5 }, l
: n. n, w4 f- @! P/ q
        ar >> nId;; \" f* P$ x& |3 v% b+ b
        ar >> nPart;               
+ P, n/ j" ~# ~/ a7 a6 c5 ]        - k& f2 p9 O7 T0 `0 `. S0 Y* `
        if( nPart >= MAX_HUMAN_PARTS )       
- S7 l2 G" `; f                return;9 P$ h& g; s( q- d" L
& I* l( v: G+ u* Y0 o2 v
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 m, @" N/ B: B! c  S1 D

, ]& I# ?3 [" B: i+ F
* H% ?& q' n) l1 O0 HCode:
$ G6 {" }% v# m' N# |! i#ifdef __QUGET_SWAP_FIX
1 X' p+ D' f: h# h' q) q: z
2 M# R* N: n* _% @+ v% A                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 z+ S+ T1 {# t9 f" d- h/ G
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 v) U' G) S: _7 T. o4 K$ z4 p
* _" ?4 L6 U+ s! _* w  I                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )' a, H0 \# F: T( }
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );- J0 y' c# X! o  D3 n" Y2 G  Q

+ N4 `' R0 j  |- S$ A% M1 ?! s$ v" ^                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ): ~! C# Q+ a4 C( B$ U6 l
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 z, p! G' V/ z. J' o
6 A. `) c3 u0 ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 {: \$ `# ]0 b4 q4 W1 v
and add under  W# B$ ?# E! I, U/ A3 A) A  ]

, b/ ]* H* z! W8 {. O0 mCode:! b, x6 p! X/ S& @; I3 Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ n6 N8 `$ y2 @6 i0 }: u; n
                        {
# w  e4 i# \+ Z- A+ W5 [                                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 );! r3 j  ^- }: G# X
                        }this
5 l$ E) U! c" }5 n! P( }
, u( C5 P# |% FCode:
( m1 R: d, }) i2 M#ifdef __QUGET_SWAP_FIX
8 F  F4 \' a0 P; C5 T% G  ?' k                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
- k( S* Z2 j' z: u0 D# |9 m3 R                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' a& F& v! L/ _9 [, s; W" c* D9 }2 b9 t4 u2 q
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )8 W# M# b6 }) w; y2 l
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 r2 x  j$ J/ l2 h" N
, y% |7 R. I! D, e- K! m7 e
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )0 g% B4 O+ @; H! v3 |1 o' U  Q5 p
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% k$ B; A9 }! U. v/ r  @. l) T, [: Y
  C  ~9 W( a2 D! O  [, h5 p2 V0 V#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) C$ G* F7 i+ z( G( n) n% t8 m) h! w3 p3 R9 Z

+ Z$ a7 H& _; x, b: {* R0 t5 U

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-6 23:28 , Processed in 0.064071 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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