飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16247|回复: 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
' N& l- a2 q* @; xI posted this because someone kinda posted a youtube thingy about it :O.) e0 [! c! B' c, ~# ], E

( D7 P# y2 c" I) }% VFind this in DPSrv.cpp @ worldserver3 d) l  E) R7 z( R; K" v8 f+ q

. t  G* P! P4 |# ?& n/ RCode:
5 j0 o' }% a. Svoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! X6 |- s% n. n7 S3 P6 m5 T{# V) Z( Y( N( ^  ?9 m! x+ q' K! c
        DWORD nId;
2 {3 V5 c. I% u        int nPart;# H" G# ?  V5 X6 ^
- a9 h+ s; Q, a) j( V% L! S% t' n! J
        ar >> nId;
" r6 ^0 z" n: n        ar >> nPart;               
7 T& O) |" ]1 _, [       
- O- d  k7 }1 Y' Z! I1 p8 [6 D        if( nPart >= MAX_HUMAN_PARTS )       
2 ?7 y+ @& w  A                return;* i, L( u* H* e  h  o% M

# _6 E- B3 u7 L9 ?( Z" }5 b5 [        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' C8 X" y' ^1 Y) T! \' \

! E+ z5 G( Z2 S, _  \: G
  t& ~% g! ?) z( TCode:
& ^6 ^* k5 @- g5 ^5 E/ k+ U#ifdef __QUGET_SWAP_FIX! Q( l$ T; Q8 Q9 E. o

  a9 J! b. _! z, K& \* t. X) ]5 J: ~                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
! s3 C5 W! F7 c1 A/ ^                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 B! [4 M9 n3 q: K8 R' k3 W) N+ S3 j6 w7 n4 a& K9 W# d6 S
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
( V8 E( f9 Y* ]: j# q! j                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 ~4 n1 [1 C; N/ L

2 v4 A- t, @0 L. ]' H" D+ u" z                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
  G; x" H7 i0 N0 K! o  L                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" Z1 B1 A6 a  z2 m1 {% i% }
! v) X: o7 h+ q% Z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" d4 T& a, Y* K1 {9 X1 {$ ?and add under
' E. i2 v5 i1 k7 \$ u. t
$ ^9 Y- ?' ]3 b( `: ^5 TCode:0 x' N. W4 c( u6 X/ w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 \% h# F: }" v% g& v5 S                        {
: v2 u, U2 p7 E+ t7 `: Y                                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 );
+ ~1 z9 j+ {7 D0 k% m/ V                        }this7 a: @6 B7 w+ O4 c" K
0 w/ z9 l5 ~- _
Code:0 F3 T( V* J, b; T/ P" K) i  i
#ifdef __QUGET_SWAP_FIX
' l, n- U  D* f. u. ~" }                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )0 _+ N7 R/ t; C4 c# G8 V$ T
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. u, J7 q$ R5 Z% `1 ]1 u! \( P4 A1 P% F0 U4 c5 ]
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# Z0 w9 p1 r7 _/ u5 u                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 l( I8 A0 P/ l( d" m& F, v( W. x5 o  `, }4 v9 g3 L
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )* y/ ~' l' G( K5 G
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 z; T0 S: W  D% k# W$ R2 p* |4 x7 r7 z; _+ X: H7 n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: C) p! P5 I; n
* w5 i2 z3 A6 h9 C# t4 f7 G; \1 o6 M1 |
% w! {# J5 `/ ?3 C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-30 02:22 , Processed in 0.058948 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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