飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1064

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1064
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 " z2 _$ J% a* p2 j' p2 S4 P7 c
I posted this because someone kinda posted a youtube thingy about it :O.
8 q: }7 L' \7 s# f3 Z
% W* I: f: Q) x. J5 @5 I5 k" [Find this in DPSrv.cpp @ worldserver
" R% k1 U4 [& G1 I+ H
; {4 |4 B- t' t5 o" r3 @5 M7 iCode:* B; M& k8 S7 L6 h1 w% g% x
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, R# s8 o/ Q$ D3 Z{# z0 {) v$ S  U7 G0 J3 D+ Z
        DWORD nId;3 x6 e8 }4 {& t2 z0 g8 h. [
        int nPart;
3 E5 ]: T+ }! T6 `: o* l1 f3 q9 [+ @
: ?4 o1 F& H5 {  G) v        ar >> nId;
# H( C$ \+ n  ]4 ^& r  g  M$ d7 U! @7 @        ar >> nPart;               
. {2 }- a# @4 Y1 D       
' y1 ]' e1 Y+ X  L; W, \* N& O        if( nPart >= MAX_HUMAN_PARTS )       
  M6 E- D! s6 I                return;0 ?! y* E& \+ U. w( ^; @8 G

& U7 }% J) t, W! I        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 G3 l. d/ N9 Q8 L9 n! }
" d+ Q8 v6 t" n! `- g) \$ \4 |1 V8 C
  j8 U- q  P& U7 x
Code:
: G, B$ K8 F2 {#ifdef __QUGET_SWAP_FIX$ G2 L+ Z0 I. v0 \* R
8 i! S* A% i* ?3 `
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )$ j; h5 ^4 r- ?  }. F) F2 \
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());. o, o( `+ _; @6 {: N/ P
9 D5 j. H' k& j1 g8 G
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
# \  ^& @3 @: C& {! t. |6 c% H$ i                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 X5 e8 }9 S: K; l

% ~, O6 ~, E9 [                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 k8 _) p: [& p* S& h. L: E                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# A$ |: {- C9 p) x6 b
% o- F) S( R0 X( S3 G  h% U' D2 J5 X
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& Z0 D  y" C6 I5 Fand add under( M' d3 n# A9 L+ U, Y- |: R
9 V5 K. J& ^, H8 ?' u
Code:
: I! b. V* ~% {0 e* ]/ \2 C9 zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* f% c) f- z4 x
                        {
& G+ e/ o2 j5 `6 L/ l7 `) U9 ^                                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 );3 Y6 ^# x& x% m  ^( {
                        }this' f0 c* W+ ]9 X1 w( j2 I. P# J* E
2 |% a9 S3 }" s" p$ T; `) I# z4 P' A
Code:
: W  e' \; ]/ {% Z/ \# K& e#ifdef __QUGET_SWAP_FIX) x) N, H% B1 g3 ?
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
. v  H' t/ v' G$ Q$ J$ F* N                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
( M7 d7 S6 q5 ?& J$ k8 \' T; H) _0 U+ J6 y. \$ R4 w0 Z
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )  n3 U  `: D* b( d& H/ e% j
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 v5 J* F2 P9 @. Q( K
  O' C; H! j; J                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )# {7 T* M2 X" m9 J# c7 i* n- E
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );  [) Q: [- e2 y4 j* e) M
0 ]! j" D4 H0 P( ?- H9 Z0 c
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 6 z0 u% A  Z6 H: j$ U
8 F  e. a- b8 V6 l+ g# m: c

% s4 s; ]2 M2 i+ \/ d7 D' b

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-4-19 21:02 , Processed in 0.061544 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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