飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16938|回复: 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
- [9 n7 ?3 o6 II posted this because someone kinda posted a youtube thingy about it :O./ M$ ?7 V  \0 h: v7 e
2 \: `8 K* @& Y( F: R: a- v6 Q
Find this in DPSrv.cpp @ worldserver) {9 P% e9 J1 L9 _: ?6 W

/ `" e5 ~0 e5 HCode:
- J6 F5 f! z& t% [# ~6 `& wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )" @4 L* V8 {! ]% ]" h+ H. k, a5 ~
{
/ o) N  R% F, C/ l" L6 r        DWORD nId;
) ]3 X' O: b' U# y, y9 F9 z6 E        int nPart;
$ Y/ l, b& r  W: r0 A  L6 H1 a0 d+ N( K" S9 J
        ar >> nId;
4 y+ B0 _# H2 J, j) y, ?        ar >> nPart;                ; ^( G, |8 k3 y9 }! n
       
/ Y8 x1 e1 Q0 i7 d( J1 m        if( nPart >= MAX_HUMAN_PARTS )        7 H- H! ?4 r. K& |0 g
                return;
+ P2 x1 \, |* `) o* G1 c
+ M2 ?- G( ?1 z6 Y- y4 A2 z        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
- v7 E& l8 ~; }/ E/ m" _8 K
7 \) ?" T1 g: c  j" w: L% K7 M8 W4 w. y# z. R" n  k$ w) g% G7 [' w% v
Code:
6 Y0 j( b, [8 L#ifdef __QUGET_SWAP_FIX
3 W+ o% G! @; S- Y8 A" i" Z- b$ S
# n* U6 I0 r6 }+ U5 J! b7 l* i  q                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
7 S& Z" u' [) n. N0 s0 z                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 G5 E' `) s, F, y6 V
' h, \! i3 X. N# |# u( Q                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 Y9 l5 w2 {# K: p                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ R5 x! H6 Y/ i# z  ~
+ Z3 C+ l2 b' T; F                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )- L. H9 f" F; Q* c2 h$ S: D( A' w' E: Q) f
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: @3 m) l3 o) S3 F5 H/ ?& n& @' z( f9 v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" k+ _6 s( u' D+ a
and add under
2 Q0 I  U4 @9 o) G; H6 Z! g- n3 M6 ]: X" J
Code:
- q0 {( z6 r/ `5 I* xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )- V4 c& R; Q) s' H, \
                        {
) E4 @. j  M9 g0 N: M1 R' ^                                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( b) E; b! @0 z* f
                        }this( \2 P! f+ k6 n* u

- U$ V. g8 e- Y6 M! O' U7 YCode:
" I% v. |+ T" X#ifdef __QUGET_SWAP_FIX
2 G5 U( z8 Z9 O& I5 b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& j( V( d9 N3 S/ o4 {                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 O) \# D8 R% f3 W2 I8 A$ E
9 C5 L& m5 I) Q. q1 h
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )4 ]. s$ d) E+ U6 ]" d* G+ g) |9 i
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! ~. B4 z" x3 T& r; l7 v& s- V% x% y3 M  f' \- G
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )( l! i. r+ w' c  @7 t  N# q+ I& U" Y
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );3 c1 M+ q8 n% ]% ^5 B
# k- a" G. v- y# l* y3 ^; P
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# k) X3 B; f, Y
2 y% Y9 w$ H8 e0 A6 a  B$ `5 R* d, i" b4 \) ^; O% d  v" a

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-13 23:24 , Processed in 0.064211 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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