飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16296|回复: 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 ! S& b) I3 X; S* M4 ^
I posted this because someone kinda posted a youtube thingy about it :O.' R+ s) z* m& @# U+ o; H) z

1 k3 a4 s  Q( C+ q; @' v+ }4 yFind this in DPSrv.cpp @ worldserver
; Z  a- X6 u% W% S
3 E* C' t2 J, l+ U$ ^: M% VCode:( z) A* g8 g) K: h( _' B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 f( Z% t0 h7 n" _( w2 H
{
& I' s. n6 V& ?4 R+ p        DWORD nId;
  a% I1 n3 B2 {; K        int nPart;
5 R6 c4 i5 T! y1 f
. o$ [: o. {+ O, _) C4 i        ar >> nId;% O. j9 P6 k7 [- S& s7 o4 M4 C. B
        ar >> nPart;               
( N1 E2 G& f4 D$ w! l* z       
# c# u4 o/ F% e, M1 N- b9 Q$ J        if( nPart >= MAX_HUMAN_PARTS )        3 y. L' L) \( i
                return;3 ?# A# F: i% m6 d; O6 J
& x, P! ^0 p1 i% W# S# X/ R
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 P  g4 c, l$ p! S7 _
* K2 O4 p$ K2 a- t& Q, I/ e
+ B3 D5 f1 Z  F  d. r
Code:7 i6 }" ~& |# l4 q
#ifdef __QUGET_SWAP_FIX
2 O& ]" {* o; C" G# p1 c
3 L, ~7 u: G0 O- }2 r- C* H                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
$ I- a/ }* c0 ?4 D  ^                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());: X3 @! T. O/ Z/ ~" g5 [, E

# h; `8 ]" r* X                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- Z4 T! ?1 M5 v                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );- Z# I$ R. ^# K% R3 K- X

; V" o0 C1 p& i# \+ p: T- a                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" Z7 ]% C; n+ K  }: Z5 I                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ p) M& x1 V6 e! E' \& v" `

, S% s; _0 W, E) H' X7 l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" l" m/ M# @2 t3 T3 |* T
and add under
! a0 b+ h- ~5 C
0 H& @& a/ \" \& T) F7 nCode:
" k7 R* s  ]0 l+ eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# K" k& w# N7 G+ x1 \
                        {
. _& I/ G. V/ b2 T$ d( @! _                                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 J" e: C4 a  P5 O) d) Z$ s  O3 x                        }this$ w. _3 W6 u( V

' L) B! q. J7 p7 w3 O  R2 g2 zCode:; S0 s- y; [( x) A
#ifdef __QUGET_SWAP_FIX5 w4 ?; ?; e) A8 U% g
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; P/ i2 S; e4 c& v8 O                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# B$ ~# y8 Z6 L' _
& i$ B- L' K0 l& s9 U+ E. N! A' L
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )/ z6 \( K7 N+ U& J$ C" [
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ ~( i& A9 J7 O) T" u4 _0 r' Z. j+ \/ x/ l
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )* b, Q- \/ D, c1 a
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) t. y4 j2 k/ F! I) F7 f8 U
& E8 U. a$ r: l  }* i) m( C, C% j5 k#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ E7 z6 F6 H; z7 {; |, H
. K; x% n, r: d  W4 S8 I

. B% @9 N; R4 C4 b" b! C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-3 09:05 , Processed in 0.060666 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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