飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16515|回复: 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   g, y) u$ i7 S0 `9 a# y
I posted this because someone kinda posted a youtube thingy about it :O.* B8 v. G# A. b1 l2 }
8 S  {9 I' Q0 Y+ e) P5 U
Find this in DPSrv.cpp @ worldserver
: Q9 s* m: ^5 N* D4 Y8 h! F
8 Y& _0 [) Z: y* iCode:
$ ]5 d( y/ i+ X* {5 Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; M7 u! S- m+ i6 b6 d5 Q{6 \! d( J7 V. o! S* G
        DWORD nId;
  q) _: d; _/ ~" J; E        int nPart;
  Z, W! n4 s' Q
; I, ]7 S4 i  G; t  }. x        ar >> nId;7 L' s* ?- x# x# C- p) w9 t
        ar >> nPart;                7 b5 R: {+ s3 `4 x
       
7 A# N: _! l! G        if( nPart >= MAX_HUMAN_PARTS )       
' q6 }) {' s+ _                return;' c5 I$ E  `8 U6 J* t4 o1 ^
0 D5 X1 T% d% a9 G& B, R
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- D) C4 Y" ]" ]% a. y3 V2 N3 f2 u0 |6 n* y& Z0 {

1 U/ F& z& c0 i# T; |8 yCode:
/ F6 l' N) N. g  y0 }! K7 M1 J#ifdef __QUGET_SWAP_FIX; z5 Z  Q* [7 q  R) F  o

' R" f6 e2 g  `0 Y# e                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) q1 R1 F- m  i: N. R' `2 K, V                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());% `7 S0 v2 r( z
2 h7 E1 g( I* N, q0 t+ l+ X- C
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )5 U' ~6 h2 F+ T  Y% i) C
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 _" a6 J2 E+ f* ~- l$ b9 j2 B, z3 \% I! n
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
5 L/ B# |- k5 i- }" k; Y                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 C* r. N. M$ U9 v* }7 N* e. q/ J+ R- R: w" P. y6 o3 D/ ?1 {
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! l9 E4 Q* c5 @4 O9 h; t
and add under
# D1 Y. S9 c. y0 u6 K( g: `6 \( R( P) c  h& F
Code:
8 f2 u, o& m. s' ^' f6 Uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) _$ E9 ^" E& R
                        {
( _  }# ~3 X* B7 e                                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 z) e: j0 t( x1 Q1 g; _) Z
                        }this% ]6 q9 l: y" x, V2 m- Q" v
3 F8 Y4 O- \2 q9 G% U) X1 k
Code:
6 V" J7 _) D; Y- \: U3 W7 b# H8 t1 G* O8 u#ifdef __QUGET_SWAP_FIX9 y+ @! ~2 ?7 B
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
+ ]1 u0 b8 m) \+ D" u$ @                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());3 H* x  G/ {' T0 {) ?

1 j9 \. D- K+ U                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# k  `( e3 x5 L# A                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ C4 M' V' F  d$ N$ A1 @/ ^  T
( J3 t0 g* @: o' ]
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
$ H) V; Z9 l8 y; n) g; r                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' W. i8 _6 i# k& E2 R, s) ~! B) U* K7 j

8 C4 s* ?" _+ s) A: q. Z7 [#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 |" d! T: f3 L4 a- H9 x
" q+ d" Q" [" b. \" \" h4 B7 e9 W$ A& D1 l& b. b6 S

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-17 08:56 , Processed in 0.130729 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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