飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1082

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1082
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
  l4 m* F( P3 ^, Q5 }I posted this because someone kinda posted a youtube thingy about it :O.
( b# H% M' g/ o2 q( x) v* X; U& k
' o; U  E3 b0 y4 z' u* |Find this in DPSrv.cpp @ worldserver9 ?/ }+ H; T; {% }, e; Q

3 w7 w, z7 x) b# ?Code:( [' y+ q( ~3 h) j0 ?. p- T: W! v
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( z  ~1 J/ c1 L: T' P: @- w6 z{
+ ?* x3 f+ R( x% t1 O/ O        DWORD nId;
6 x( P5 n0 h8 a$ }3 t+ P' o        int nPart;9 J5 O- `# W4 x( ^" Q

" W4 D& H( N- h/ G        ar >> nId;+ k3 I& ]  C3 a% |! s+ \. x  h
        ar >> nPart;               
, X* b& T8 w3 @4 @       
/ I- A+ q# O) H: A# U3 R8 i% K" R        if( nPart >= MAX_HUMAN_PARTS )       
/ a% A4 Z1 v  s! @                return;
. @. R$ f8 u9 O2 i' o+ O) z4 G7 p  p& e* o7 |
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ e- v- f( w4 p9 c! c7 ?
0 K# |* U$ ?7 M) w& Y2 n
2 q" k: U' J7 U4 T% @8 w! BCode:$ k8 W1 y/ p( s8 h/ J5 J+ I
#ifdef __QUGET_SWAP_FIX
4 V  J$ l5 F* p0 Y3 t: w; Y, f: m  x+ r  I& u) ]
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
6 W' f3 n% r) c( @2 z                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());: ?2 v" X) }& {( Q5 n
: \5 p% K5 O7 n$ r; |: ^% |
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )' z$ _% u: K$ Q% z
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );* W; z( ~% w. w+ G" f" G& H
2 T+ r% ~. u2 m+ U+ W
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
1 O7 ]& g+ ]' L& g/ X% [6 O( u' _                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 O% @, @, w7 D6 J+ U1 A# k* b. T  V+ K' Y4 m1 w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 d+ o# K+ K: u  q% O. f
and add under
2 g; B% }' |- F  j" c7 Y" w
5 n1 g% X/ K( R! t& {Code:2 [5 U& f3 r" ^6 q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' s& y1 P+ I5 q* r
                        {
1 ^$ J' _! L% h: 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 );
& ]1 ^5 f6 {; @  u, Q                        }this
4 V+ H# m4 `2 W( Q5 i3 Y
, t% A6 C1 R! LCode:
& {2 |1 @  A: L- o#ifdef __QUGET_SWAP_FIX0 C- n. T! t1 d4 H9 `- F, Z
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
: @+ L: ^& z/ w  c! A6 S' W8 x                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 f+ c- C/ c7 N3 z# U
/ c' |! d2 ?8 `. w2 U' s. Z                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )" g; ?# B! m* w+ g# A/ t
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );6 k8 m1 p, T' n. `( g' I& c

) a* V3 a6 }* H7 ]                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )/ F( I  E; P3 o+ ^: G
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 J& j6 x6 w1 }5 |! A- S' h
' L" H+ S; r, D% @4 B6 i9 A
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ ~+ e: K* C% H3 u2 T1 a: _
2 q0 ~9 ^$ f2 |' q, }3 z/ S
( J& V1 }7 b. M7 S! f2 t. ^3 G

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-3 19:38 , Processed in 0.107443 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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