飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17172|回复: 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
2 A$ k2 p6 }4 z: }I posted this because someone kinda posted a youtube thingy about it :O.* e! R% u1 E5 X; l1 w) h! @7 p

. ]7 G" i8 B( _/ o& f" TFind this in DPSrv.cpp @ worldserver* [. M/ b# \# G% n1 }3 V+ B
6 {( T8 t$ z6 m& a; l
Code:( g$ ?9 i' C  M8 K1 h( A2 P3 }
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ F$ e- Q# R+ H  a; t% R$ o
{
% \& h6 {% I) ?" o, I( _) O* i# L        DWORD nId;
% M) [8 ]+ u' H7 z, P) m        int nPart;
- C$ ]9 P# Z3 l2 b( }  [$ `/ J6 F0 Q  [/ ?
        ar >> nId;8 h) m, i8 R4 J& P
        ar >> nPart;                + _3 H9 |/ S# g9 H) F( K3 R
        , Z: R6 ]- c7 h2 ^. l4 y
        if( nPart >= MAX_HUMAN_PARTS )        0 p/ D: R& I6 F) R2 l6 L/ C
                return;
% F1 F1 _! F" @& |0 t0 m. X. f, ?6 S0 o2 X" E
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. q5 g- l" b5 }8 `9 m
, \, }, k5 Q+ C" e4 g5 v2 a* C: N
* Y, F% \2 ~0 A5 H4 d' [( P7 `' {" ~9 KCode:
0 n; q; {4 f" d9 B  J& g#ifdef __QUGET_SWAP_FIX
3 ?" L( @7 R1 C5 I! \  k
' n8 m2 [( A  D+ }                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )2 B* @) C8 R' E4 k& z" \) \
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
' o" d9 n  H5 e" Y4 `" ^& h9 V
( {, p5 U% Y: g; U" q4 F- ?                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
1 B$ p& O' c6 a, P# J" p# V& s0 X1 G                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 Q# P7 v- @7 {) t* U

$ o) ^% I: E: ?1 z' C+ q4 Z  L                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )- \& E: N0 e. Z6 ^! T
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ c2 A& V* U2 Z# O7 Q$ P
. W1 B( S0 ^0 C* ^$ [; Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 z3 S0 n/ j8 Vand add under
& G8 Q( b* s' j! H) ?" T0 D5 H, R- h5 z0 ^
Code:' T- u8 m% @. v! U5 a% C" I. {
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 p/ b, I" p$ M& }& c6 A* b" ?
                        {
0 u. W2 j3 r* l. n* r" p                                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 L+ F" c# c8 A5 R                        }this
0 t0 ]  n( k' l2 S) L. m7 q+ H0 I; j4 a% U( K: F
Code:
0 P/ V1 ]2 ?; ]* [: b; g8 j. l0 D#ifdef __QUGET_SWAP_FIX5 @9 S+ N& h1 j7 w$ I' i
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
( q. t2 j& A7 w8 s% e% h# A0 D1 A) p                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* g% `2 m( L0 L/ b$ r& o/ G3 l; G/ C- p
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
( H: W/ }& }6 |3 ]8 l& ]3 t$ ?& M  A                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: q) }, Z% c9 u$ F- [8 g" ]
( T- {! M4 s" E                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )4 @9 g0 z2 u4 j) w6 E& ]( U
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 e9 \- g" P$ v1 v( q2 k% ~. A9 F; p

7 y8 m3 D' j- S; M* n0 {#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) u' r- ^0 H. A) [: g8 A6 B4 E9 s: ~

' ^) h8 Q  p0 @& b3 M

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-23 17:59 , Processed in 0.059871 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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