飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17180|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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
; n3 g8 }9 W, f& xI posted this because someone kinda posted a youtube thingy about it :O.! ?) m8 J0 o7 l6 G5 Q4 d8 @/ I
/ J7 c/ n: ~6 d3 k) T# B
Find this in DPSrv.cpp @ worldserver
1 `" p6 }7 z! E7 P/ |7 E+ i2 Q0 K% V, H3 w( X; v5 v
Code:
' C8 x  K; }1 Z% K3 a) {2 Q* @0 vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 R# [5 {2 o5 T4 U
{
+ F$ g$ ]6 p9 N- x1 ]; a        DWORD nId;& R% x3 R5 X1 ]/ S7 h# v
        int nPart;
9 q- b7 \/ p; R
* J% F& c6 [/ W7 q- {        ar >> nId;  ]7 L, x5 z. Z
        ar >> nPart;               
/ I4 v( W) t1 W" \2 j4 t* @       
, y, Z0 v& X: J& x        if( nPart >= MAX_HUMAN_PARTS )        6 q% {1 U: g" j4 S7 W4 I
                return;& ~+ Z; d! L5 h/ ~% ^

# w2 @) _9 O% }        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! ^( V+ F9 n2 I- v% F& y
2 g& t4 d& M0 j7 h$ Q
/ {9 U* H; ?$ e- gCode:6 l) k& C5 v7 d" a/ [- B$ ]& K
#ifdef __QUGET_SWAP_FIX
8 L: B$ b! ^+ P. S9 D' l
5 n0 r' H# u# v! k# H/ x+ @* y4 z                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
: E* h% f* E4 D" X! f2 I                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 C3 L. X  f4 P' a% k/ v/ Q& b$ I4 T; t5 y0 A# V3 p
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: m9 M% e% X" r, q4 i                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );! }8 z. r2 q) G7 r( s

6 g- Q8 o/ ]2 F; h2 ^- \( _                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" A+ J5 K: s8 E: l* u$ F0 O                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 S9 j+ p$ j! t
$ h# m( z# _) _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  W; C3 e: {( ~
and add under
9 v. H( d* {2 N. C
' k; v2 b4 P) h7 `6 eCode:
% N( m: W5 j1 ^/ J6 m$ pif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 A  K4 n: P" }$ J% g1 R                        {+ S8 a$ R3 s( [* @& 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 );& Z) B8 i, \# p9 |! w
                        }this/ E# H& p# o0 p) L

; e5 H$ h0 X5 hCode:
6 p3 f2 c* H7 F, m#ifdef __QUGET_SWAP_FIX7 W- c6 A& M4 `
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
5 O( k" a7 m! k1 |+ Q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 b1 o+ M; ]) S. B# [4 r( _. W

9 M' K  t1 v3 b8 u# C                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )9 X" p" N' I" w$ d, I* w. G
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 L6 ?$ k4 ?9 z3 l/ _$ A( G) s: |1 v7 n$ B% x
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% @9 N* r% C! }2 q
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# H7 g2 Y. R* o3 H4 p; b2 X0 l" ~5 g
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) c% K, U% s3 ^9 K
0 B5 r+ _; a$ ?4 L! q3 Y

. J3 d5 N6 c. c1 B% y( E; u) E

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-24 01:31 , Processed in 0.066692 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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