飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16435|回复: 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
9 t) x$ t: N: L# ~2 i) bI posted this because someone kinda posted a youtube thingy about it :O.' R; u: l+ k' P0 _: x

3 A5 h& P) H4 R1 @, QFind this in DPSrv.cpp @ worldserver+ B8 q% p+ b% h+ P
; {/ q6 _; x8 U- b1 Y
Code:) @6 ]8 c9 h5 ^2 N9 m! g" O& b$ C8 L1 s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& T/ t$ a, `8 \! l{
- C- U6 Z$ O; O$ ^/ I: H; j3 H        DWORD nId;
+ o8 S1 g9 ^- u' f2 P/ R        int nPart;
  i" ^" a3 X1 b0 E0 c& A7 ~2 W4 i% k6 J* @, I' y* Y: b& N9 @
        ar >> nId;+ @, n) {! b5 G2 O0 ^1 F: U
        ar >> nPart;               
1 P6 |$ W$ K& j. B0 E' M       
* h* k  f% s* p+ D        if( nPart >= MAX_HUMAN_PARTS )        . f/ h! n% m2 k: w: N- [, V+ V
                return;
! U# F; ?' \2 l$ I
0 j6 ?5 J6 c$ J5 N: E9 ^        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& E& W1 g$ o; \# L
! [5 e6 S0 Q% U4 f9 i

/ A7 p6 h. ^# n+ j! N1 {Code:
1 d% `) L/ b8 H# s! n$ r#ifdef __QUGET_SWAP_FIX
  G. \3 ~2 u/ {& C+ z' E5 a
! Q! h; Z8 w% m& N) |" I7 h8 U                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ m9 v( Q& E3 o9 u* Y                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());) b, ~, C% Z0 Y3 K1 ^8 E

( |9 ^3 I! C4 c7 M! p! w: S                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )" g" Q1 ?" @, S6 z3 _
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
  E' Y. w, d' ]: q& @) D4 t
! t8 y. m1 {5 R$ A0 d% `) R                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
) g$ I9 V4 F- Y' q" h' B                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" a, k  }$ E* j- v! ]  Z* S7 {; v6 {- h% Y9 S9 [) V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, A0 x* _* V' band add under
" C( m  ^4 K! q9 X& H& O3 k+ P# H, n) C8 M( i) X, L
Code:! N- \* _$ v8 @" l3 Z! V5 n( G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 z( ^8 X: r2 h' M# f  e/ h7 S$ O
                        {" L  E3 x4 Z. X4 L& i* C2 i# `( Q
                                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 );6 ]' L6 L+ h6 F
                        }this
) e6 K0 p5 `: f0 b( I2 v& A9 C7 k  t" d: _1 G  L+ `/ ~/ Z* K& q1 K& z
Code:
( |& F4 {0 z: `3 c$ u( ]8 [. ]" v#ifdef __QUGET_SWAP_FIX9 i: A2 n% ~2 T
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 _( B& \" F; s
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 W  ~; c( g/ Z# m! O
5 _) H& E; G# D2 H% X  d
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% Y0 u4 Q) h" f5 \$ Y
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. r3 v  k4 X' i& p! C- \5 D/ @/ ^

7 W# w" p- ?. z, P                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )1 S. C0 v% M( r2 ?2 [
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ u8 z1 L! Y0 {; H6 @  a1 q
! [* g( D4 _$ d4 q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# v+ s# f/ j9 u" y) C; e: {0 F  O7 m9 Z9 _
' y  J, ?& l) z6 F# y: @9 I

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-11 13:41 , Processed in 0.062371 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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