飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17104|回复: 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 $ P+ F: H" f6 o- C/ a, W2 [" a' X
I posted this because someone kinda posted a youtube thingy about it :O.
0 E' W2 Z: P. t. P* y3 i9 t' l& T( u2 ]3 n
Find this in DPSrv.cpp @ worldserver7 O5 t& Q. P* `# G6 d- b

+ D& u' s3 u9 R9 UCode:4 _; g# K3 |7 n, _8 B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 m/ Q& B+ Y; d{
, p% @6 I! B: o* \% b) v9 `) t        DWORD nId;1 j6 W( Q  H( H
        int nPart;: r# F8 c4 u, _; ^  k* k: ]
: N- D  w. L" z3 M. a% D1 |& `
        ar >> nId;& ]2 M; \* ~" L
        ar >> nPart;                & {. Q7 _- Z6 d8 W& i" D! B) E* i6 `
       
3 R" Q( I  {0 z/ J        if( nPart >= MAX_HUMAN_PARTS )       
0 K- @( Y6 x# r                return;) b1 \. X' \2 K, S: B

" C4 w8 }1 N5 C, x4 l$ X$ u        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 f) S" a- q6 {3 Q- Z% g- C( b
" e4 H, F# C8 a) `8 Q7 Y0 o5 H+ P( r- r- m
Code:
% r( f7 f/ B8 R. N+ y#ifdef __QUGET_SWAP_FIX) c3 y7 V. _8 U: S4 k4 l. a
, X1 h5 T' @2 V$ }# g: B  O
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
  Q! l# A" I6 x1 v  `5 S3 N                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());, z* Z2 ?" M, L6 _
" s0 ]" N+ I  ^; Z% Q4 ?
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
  ?5 v6 K* j' t  ]                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ P0 E9 [( e1 u0 L/ I. [
; f. v% J' d/ z- e                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )% p3 v+ F0 S$ M
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 }) o; q( M, }0 ?

: `, p4 v1 o/ T& j' D- [: R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 C& h! r. e' z" @, p4 w, ?
and add under
3 V% ?& `4 |% s1 s( e9 W3 y
' K  w, w4 M9 L, d, t  J7 K6 h1 ]Code:
3 @. ^: F6 S# q# D! ?7 v/ v1 m, Z* Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# E9 A4 Y* i" e- P( ~& I: w; @
                        {! K: @1 I/ J( H
                                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 );' z9 x7 ]7 L4 J  U2 L0 Z
                        }this1 i; a5 ]  `3 d% B% ^5 w
! T( r) w$ L+ E7 I! z1 x; T$ h
Code:1 i! c- G8 u4 x9 s' D4 }
#ifdef __QUGET_SWAP_FIX6 }2 o9 \: M0 ?6 G+ X0 v- V1 t
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
4 U6 G7 f1 h( B6 Y6 z9 ~                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());2 e6 a& L/ r3 `( z+ Q! X! r) n
7 t( S0 ?/ k6 q+ s6 H0 d; q
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )3 D) K! }( n2 x3 P; ~3 r
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
  O# N3 s! ]/ ~6 b; c: t0 E" D0 s. B$ q- _1 e1 Y, @8 R$ ~/ N. S
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
4 Y8 m9 l) M0 l                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) L) x8 h7 v  f3 q  _! s8 e6 D8 h; o& Q3 G
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 l9 Z" Q: Z2 Y0 M

- w1 e3 A( ^* z/ o# W5 q4 w
& Z5 V: D5 [2 J  j. B0 `& U3 g

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-21 20:05 , Processed in 0.065104 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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