飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16872|回复: 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 8 V1 v, G: F/ a8 x# [
I posted this because someone kinda posted a youtube thingy about it :O.: L0 s2 A) L/ S& [( q- P( k

2 X2 U8 N$ A5 \) b5 wFind this in DPSrv.cpp @ worldserver& U( H' ]. k- N. |$ u0 m+ S. @
: D* V, \, r3 a* @" c
Code:  a4 K6 I% p3 H) [3 s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 i  \, Q% S2 n. {* S" o
{
4 ?9 g5 h( W* V+ `% C' \6 v        DWORD nId;" E! h( v0 ]9 L( G7 w
        int nPart;# p1 {; o8 p3 h% X9 O8 `2 v
# r% l$ W; A4 ~4 A
        ar >> nId;
  z* Y+ L: u3 ?2 u9 s5 _        ar >> nPart;               
) o; O# i; e$ [+ o! N& m        3 a2 m0 N, f/ O7 U6 f( P
        if( nPart >= MAX_HUMAN_PARTS )        ' k, r9 ^" z2 K% [. w0 p( ]) D$ x
                return;1 h$ h- n# M2 _5 B4 ?

0 [1 ~, `  z6 {6 C* ?. d' c        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* t- j3 \* A+ p; @1 [0 n
3 u& q2 ]/ p# w% C& p( Q) S2 e, ]5 B
Code:
/ `, o6 i# o5 k7 Q- ?% v#ifdef __QUGET_SWAP_FIX- o5 Z% U& }7 @: |# g! B

- O! X& h+ I. j8 j0 [- q( _! ^                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 x; n0 ], n% i$ K1 Z                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
! ~, q. G( S2 Y. r
  s0 m& k* g7 s1 \! `% b! Z                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
' ^% ?& k+ k' J8 c$ R                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 A8 w( {+ @+ d8 f1 V6 p) c+ z# G+ Y. I* t, R
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
8 q1 e. L7 w  K  z                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );- J& I! h5 D& Y) g# H4 `6 C1 ^& i
3 _. i# S7 m1 h* W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' \) \+ q- d' Q; n" {4 ~8 ?and add under- v* p' y. l! |

9 i1 P) ~: L( W" }Code:: D0 l- ]: Q& B2 K$ X; {) O( x! ~
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: F/ v2 H, x. F1 x# i# X                        {: ?8 ]9 c/ z+ N( O& g) `
                                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 );, f& K9 @/ d. c4 p
                        }this" ^  `& t" p3 N# L; D0 J" V9 A
) m; C/ x. @% p  Z6 y1 B9 z* G
Code:. u6 \) W9 E* \( S
#ifdef __QUGET_SWAP_FIX
- b( l/ v* s6 P  ~+ h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 U4 R  d6 ?5 \! S9 F
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 u: ^- }+ k4 t) V% d
, f  C) Z# u3 T& o                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
* ^: _  A, @5 h( v                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );) [0 F6 W3 L5 w

( f% z' u) [( r: ~/ B3 A                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
8 s+ x% V$ l# D  A/ x# A                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# ^( J! D) |9 Y: z8 c+ f# u
4 f; j5 ?7 E$ p+ c. y4 X#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
  b, T% X, j) T% g- y9 h8 z
& E+ \, o5 O; i3 b- s% E) E3 Q3 m( p. z, \

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-10 08:29 , Processed in 0.064951 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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