飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1092

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1092
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
1 \, g! X+ [1 t/ ?I posted this because someone kinda posted a youtube thingy about it :O.& q/ [, O; l! o1 ]
  p$ z5 k1 K- j* s3 L9 D  H1 Y
Find this in DPSrv.cpp @ worldserver- z/ P/ a. {1 f0 l
; b2 o0 t8 U8 R7 s2 H; D
Code:6 I- c5 N6 w' l3 R' C. Q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( J$ {2 c+ x- W* D, s0 u
{
( D' H8 D* p3 C# ~& o! }        DWORD nId;) s. G+ f2 G0 f+ k
        int nPart;5 [4 M8 f9 B1 I4 _; o4 \' b0 O' P
* f& O/ a7 s4 _
        ar >> nId;4 U; L7 m0 Q) k0 L) M4 X. u' @" w
        ar >> nPart;                & J9 V8 @) s, x# {& U& Z% B: [
        ' C# g( O& I2 S5 W3 c
        if( nPart >= MAX_HUMAN_PARTS )        ) X: }/ q" h' I% _7 n8 }- C6 \; B
                return;
" B7 L7 `0 D1 q0 w6 e* F# f+ q" ^/ Q9 ^# Z/ a; m5 j
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 e1 K) @+ b0 ^% v0 w
5 w0 x7 _" v0 P8 ?9 Y) C% w6 o+ M. f7 X
Code:* u8 ^6 K& u; v
#ifdef __QUGET_SWAP_FIX0 O7 H' p8 P6 b5 g
& l" l" \$ V) O/ v$ Q- f8 w
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )& X5 ~+ w2 h1 J# p/ m
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());8 D0 ~9 f3 }9 k5 l  a( l
; w  X1 J6 P& Z
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ P. M" f1 y0 c                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );) X4 s2 z# |- q4 V

  v- Q$ ]9 K: l" ]# `                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )0 }. m# _7 m2 N% A8 w7 h
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( m7 E" D. t! f3 V+ z+ x' W. X" s7 d& E) a* F! r+ C
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( d' r* J8 {) p7 u% V- l, Eand add under
6 m& J4 h  n% e; s+ j% O8 L9 l1 }0 O5 q1 u) \3 T8 o
Code:
2 o. W% b! K: ^$ a" [, cif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% I5 r% c' {; F+ P$ G; s) i% Z( `% X
                        {8 h( p: H5 q' x5 U! h8 k
                                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 );
" A6 l% X' {9 \+ t                        }this6 T! W: i8 h' V4 R1 ~$ I+ c& K

. J# B0 Z: a/ X$ I5 L. m% ^2 eCode:
) H  A" \) F% i) \6 f  z& x/ s#ifdef __QUGET_SWAP_FIX9 v! w+ a# J/ K" \: K4 A
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
: G! o1 ~% W9 W5 v1 m. p6 U& K& U! _                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; f  h6 M" c5 S4 _& U- Q) ~7 L- |  Z
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
7 G, _. k: M' U( m- \* ]1 D" I9 T                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 Y3 }+ ]" ^5 y, |/ @) S' o' c! Z. M& S+ t$ G
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). I  H- q: r3 v5 G
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
: {' e+ |! _4 D5 o- I' ^! s' I# u% w% I  I9 {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 f1 t2 a& k& U5 E9 M# m* K) s

' Y$ ^$ h+ ?+ ~9 U! m6 V( [1 O6 F9 K4 _5 U0 [& t, f+ D

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-29 16:21 , Processed in 0.069902 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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