飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16915|回复: 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
. [6 B2 `/ N+ d' dI posted this because someone kinda posted a youtube thingy about it :O.
  T8 Q; K+ O( Z/ t: D; _8 \4 p  j
Find this in DPSrv.cpp @ worldserver
" B$ a! {+ S) b7 x' K8 }; {$ T
% d8 f/ L) v1 D/ t8 W6 zCode:$ S! w* n% O: N) d/ o3 T# x% u0 ^
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ). W; l/ \( e4 `6 R0 C5 p$ Z8 }
{* H$ ~7 x% S/ A( y+ }, w; L7 F
        DWORD nId;; V/ |. W$ q" W' o' |0 F3 J
        int nPart;: b: `( L! \+ w1 s" e- b
- e! ~9 f* y' T* P
        ar >> nId;
4 }* w" D: }, V  g  h% D' P5 d        ar >> nPart;               
6 D3 H3 y. A) q6 U4 T) x       
9 ]( a" v* V( N# G7 ]$ N# B        if( nPart >= MAX_HUMAN_PARTS )        # i# m5 l; T* q; z4 k
                return;4 W  ]- a% T5 U4 F# O. Y

" y1 ^; R9 j7 k  X: }4 D6 }) m        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& ~1 @8 N2 b4 i4 P& A' {5 V2 j  s* d: {! J; Y8 q- l, M8 G4 Z% o
5 Z' o" M- v' O3 H
Code:7 a- z( m# o' Y" }; |
#ifdef __QUGET_SWAP_FIX1 b9 k/ R/ |8 `) P
* Y5 Z2 T# A1 b8 f& }9 D
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). M4 J+ ]. f4 R2 w
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());5 y1 c* o  ^3 O- I- f: u* m  \

5 W$ i- L  f% S4 A) i% L" B& k6 d                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
) k; c; I1 ^8 n% T                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );  I; u+ O! [/ u

  Y3 C' L! b  `4 S# ?2 ~! n8 y                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )  a5 v1 k$ |9 [! y. Q) H. T
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; t' R& a7 L/ w* {$ ^# h0 q) }! O7 O
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* b# T7 I: Q4 L
and add under- j3 m1 k+ t, L4 p

6 K7 J4 D7 A! V4 l3 }2 F' S7 |Code:
) c8 O- \3 W3 Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' S9 Z' a4 h% q# s
                        {' d# a) D4 C* n5 f0 ^2 k: T
                                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 );
" c* z2 ?: ]% u                        }this) e" B% X. ~# `' c, p

/ F1 \2 s) L7 iCode:' f" ?1 E! @& \5 h; w  O5 G, Z
#ifdef __QUGET_SWAP_FIX
& ^  Y- D0 J/ m+ l! o/ z                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
) n- ~- ~3 M( C- f5 V                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 Y4 U8 l, H, @6 {5 A5 m1 \* O( L* k( m1 E! T7 {2 d/ N5 f
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
' ?& X( S- g' ~                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! q4 D# q  e# B, f

9 n0 {8 F3 p1 s* b( d& |, W0 v                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% m, r& M4 B4 T' K
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: s- N4 O: o2 C4 q* g8 P

1 H1 [9 c# a& V3 p' c& `) ?#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . D$ K0 |  k4 V# B

1 T- M6 `$ V& }
6 Y" O* C- r9 V

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-12 15:34 , Processed in 0.094271 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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