飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16484|回复: 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   D5 t$ g! H* x5 t7 f; w1 }
I posted this because someone kinda posted a youtube thingy about it :O.
0 A3 |4 ?2 s4 `  c, H$ v
- ]$ L" a, ]0 {Find this in DPSrv.cpp @ worldserver
% `$ t4 u. {6 Z% I
: B9 M2 @5 K2 X2 B) E2 iCode:
% t0 ]& R9 ?1 Q2 mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 k* j# D) A( _, |/ n
{
- d* a* n) S& [! C! W        DWORD nId;
/ z; h( j/ Z0 k( e( g- k! y( `        int nPart;5 F; q& i# X  [& j1 X6 D" P
9 g; }/ r$ K8 n2 Z" j) E+ _
        ar >> nId;
" M( U4 }: z/ B8 x0 X) L( e0 C6 e        ar >> nPart;                " ?5 X+ x' K3 U  P  i
       
0 O& S! k% M- C4 y7 r  b8 L        if( nPart >= MAX_HUMAN_PARTS )        ) L, x. b* Q) C2 E* [- p2 o: U4 a
                return;
  ^3 q- A# H0 [5 x5 c# ^# i- J4 S) D, q' ]  z
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( G' A- m8 X/ n/ j
( y; R% R* E7 F

) {# t% q+ @+ G; u4 wCode:2 u" y& l% U8 e8 j
#ifdef __QUGET_SWAP_FIX- X+ ?, p$ N3 w5 [6 q, H+ \' k1 N

( S6 v* J$ T( ^                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
& C- p% |/ L' G) O2 M                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());+ |6 @- R+ O) D& h
! }' T0 }1 e* \
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& z4 y7 B- S( O7 o/ Y& C. |$ ]
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );) n. P6 v4 Y8 q2 D  @: i' W
4 ?# O" @% r8 S$ M& {9 r' H" r
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
0 B! y- G; f, O7 m+ `' A- b2 _                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 A. |8 h4 K* l" [$ Z
7 x( G+ m( l7 i. O: a/ `# v#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ x& w; p" e/ h# f- p( Yand add under
3 J( D% M6 _* x. X( Z9 F2 [) ~: i6 a* A& `8 W* E4 u
Code:
& j8 n- q% C4 G# i; Tif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 w5 e* f: N( k9 s% R& R
                        {
0 v1 j* O* G' v2 F! x                                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 );$ x/ D' s/ `" P6 x* d* C4 J1 y
                        }this6 m' r  v6 G' N$ G

( ^2 N0 c* B) aCode:
2 c  d7 v* U7 N* z% O# e& [#ifdef __QUGET_SWAP_FIX3 V. x3 @5 A; J, t8 A: ]$ f( ]
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ), v9 ?) O/ }5 }; T$ r# O
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());" k* D* N* X+ ^, r6 S7 u2 L
" V( K- \: l, K; D, V7 h4 Q7 r
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
  p3 P: I2 h1 Q' k, X- p& w                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; K! y, _) F  Y! ]6 F9 ]
. e2 ?/ w( R7 H- z3 z1 H! d
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- L- t. K+ v) M$ w  M& p
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% ~7 f% h5 }( |) c9 B; |

2 P! G# d0 E+ [" h#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 n. q+ }3 D) Q' S8 P/ D7 ]& Z* k9 b+ y4 W
" L7 K( `6 O/ n+ V/ w$ Z3 m; T

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-14 08:51 , Processed in 0.059561 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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