飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16262|回复: 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
% K3 X$ P) x- D/ bI posted this because someone kinda posted a youtube thingy about it :O.
& t6 b3 H3 w( m7 v* V+ O. |* e8 S  i* S8 e" A
Find this in DPSrv.cpp @ worldserver( M  D4 q2 C- p1 b$ c: W
0 Q% z2 }- l9 v) m. [
Code:
: P3 U# ^1 c5 Avoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, S% }( V* W/ W- m{1 R" p/ {, P/ k$ Q/ F
        DWORD nId;/ t8 Y; p. F$ L
        int nPart;: W7 `( e8 P3 g+ e
1 `# O. a8 y9 o- k; G, V9 z
        ar >> nId;
8 |7 \* V: ~4 Q% c) a" P, Y        ar >> nPart;                ' d/ X' G4 a1 d  ~
        6 }: ^  ^" U% ^& U
        if( nPart >= MAX_HUMAN_PARTS )        ! Y6 N' @1 D" i. m* Q
                return;
6 M7 |; S% d" r
9 X- h* B1 m+ ]. U+ A        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& `) R5 v- E, v7 @1 n5 q$ ^  E
3 h, V  J1 h; v+ V+ N+ S1 b* `5 i6 j+ \. y" \( o
Code:
4 F% m9 N  f- y, C#ifdef __QUGET_SWAP_FIX+ p- s6 a& V* b. g4 u: z0 H' d: ~
5 T6 }$ _1 S3 {' D! d6 E" D
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )4 p1 u8 D7 \+ }9 I/ a% M. S+ _5 x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
) M0 t/ H* I/ N: X& M
4 P! D9 q" ^" ]8 f: e; @8 s- W0 i                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ): F& y9 @; R7 r) p
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
- m0 a  I1 \9 R+ m* J% |5 l( `! ?! O$ R- B* L# V, H
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
1 b  U9 ?2 \8 D                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ W6 L$ t9 |* U  M, K0 O' l  L9 P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* q4 m( q0 Y0 y3 R% h3 j9 yand add under$ R" C; Z" G4 a3 k' {

+ c- K4 @4 _/ {" v: n' ?; }4 jCode:5 L! [& V; A0 T
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 A  c8 [. [; y% ]) V; c                        {! K3 K! \2 J$ w
                                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 );, f+ }1 O, @+ _" e
                        }this
2 W  F4 G0 |* Y* p4 M# L9 B) u$ v
9 _6 s, q9 }4 p6 }2 ]Code:$ r, p% V( i7 O/ y. R/ g* [- i
#ifdef __QUGET_SWAP_FIX
  I2 Q+ u6 {& N# z9 q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
2 U0 e# D4 J: i5 l3 Z8 H) A                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& q2 p( f5 [. ~. b

9 a0 k! Z) C, ]! J8 Q                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# m0 I0 e9 E3 |0 \1 d( N                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 U! p+ ^, d  `- F9 K7 z
/ O/ Q: U7 ~3 T
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )4 r# \4 N' R# z( ^
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 @' F9 z0 O/ y$ ~2 C/ Y) M, Y
% z0 \* c. |0 W+ K0 h( F4 X% o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, @6 }2 C* I& e' S3 L$ f4 }2 F: ~5 g1 Q& a+ V
( G! z$ D5 |$ _& Z  P: r3 O) A

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 10:05 , Processed in 0.061003 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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