飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16465|回复: 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
% z" X9 s* P( r" I8 p6 Q5 tI posted this because someone kinda posted a youtube thingy about it :O.
- ?: e( P# V9 v" O9 Q5 W$ Q0 h
9 W$ e% F1 m  `) e8 u: eFind this in DPSrv.cpp @ worldserver& k3 j2 e3 o$ L% |) @9 `

* w( U( R7 d3 v; i& j( ECode:: q9 a5 T; K; B6 U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. l/ B, n1 X. J6 Q{
, ?( `& L1 i( Z! Q$ |  c! H5 U        DWORD nId;
( U: h3 K0 D" W( }5 w8 l; N        int nPart;
* C/ d7 h: }" f5 u: H# \
! C7 ]' V- G" D/ D$ }        ar >> nId;& R! {* |- E+ k  E+ s
        ar >> nPart;               
) N8 L0 \  \2 ]        + |9 B) [; w4 X
        if( nPart >= MAX_HUMAN_PARTS )       
0 |" Q( H% p/ h4 E/ Q; N2 v                return;) L' p) ?# q1 m

$ Y, w& c7 r# P/ P, s. T        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% f3 g+ P/ w' F. G  B
  M) g  N" N0 w6 P$ N% U5 q* z
, p( o( t2 S( t: |7 c1 v7 h' GCode:1 `# d+ k* Q9 ~
#ifdef __QUGET_SWAP_FIX
: Q# s- w+ M3 g  {/ n9 B4 K& Z* _% }' M
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
% z) x$ D. P+ v! w+ V                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());; Y8 b3 S9 C  c% H" b0 p3 k

/ j0 I+ h, o7 ~* {/ c8 |1 ~- ?                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: l0 o8 s( s4 n7 M% L. }                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ f$ k; h) F# m" C% n2 P' [* x
1 |5 ]: T! f! `( f# o: A5 E                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 G2 x! T4 u. x  ?; I* L7 {" y, Y$ w
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ Z( p$ G. q" e. i- ~+ K" w4 C& y) `6 [( Z( W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" k# ^: h& I- V9 y, s1 rand add under
) U! f, E  a: r2 }% [  V
( q# w: E, L0 `& e3 u* ?' P0 sCode:
* m' ?/ L- X% J4 d9 oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 ]" [" O; _( W2 o
                        {
5 M0 p2 h. G' c; R8 C+ J- U2 l                                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 );; _2 O0 C& }4 p4 i! ~: k
                        }this
3 o- Z+ e9 r' p
, Z& A2 }$ b1 G/ j  h# s1 V3 V& ECode:
) `8 V' f' R5 {#ifdef __QUGET_SWAP_FIX
) k8 |' s! {: F; b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )/ \% b+ S( m. b/ g, O9 O
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 u) G" V* |& Y: T# b4 p
; s5 D1 w: y7 A+ n6 n
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
7 v4 z" A- @/ U1 g9 w" j0 r, U                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" L; c& s4 J( ^: S- p4 k) g  _
% M( o1 h+ W& P                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
8 N! v% J+ M" T# g                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 l% i  z, b7 h, u

  u- V* ]0 S- @0 n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . n' G1 f; o0 A5 B+ v7 {

7 [4 M8 V& q" ~4 a* B. J9 e2 M, M0 I; T+ B# }2 Y* Q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-13 00:26 , Processed in 0.064744 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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