飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16293|回复: 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 y- w8 H& b! K( g$ @
I posted this because someone kinda posted a youtube thingy about it :O.- s1 C: j/ i" [% u4 }5 D
2 @7 A' u$ g% I6 l
Find this in DPSrv.cpp @ worldserver
% n! K7 V/ b. d  o& _+ X% z/ T- d' c6 W7 ~; q
Code:
1 c4 K8 \% K. d5 P" J$ ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 ~* R& D4 I$ N+ T0 @4 Q& b{
5 J3 x: I( i9 ~0 L1 D$ M        DWORD nId;
1 d+ a* P5 f  ~        int nPart;. m' T5 x9 f" p+ @& a9 @" o

4 r* w( x% _, b- A( o4 l        ar >> nId;
# ?7 V! d" c9 U" T: y3 j5 w        ar >> nPart;               
( F  s9 h! K& D* m! R( u8 i! o       
( w/ m5 Y9 [# K1 R- u* a' m        if( nPart >= MAX_HUMAN_PARTS )       
6 ^# _. U, ~" V5 G. U1 g5 o                return;
* e' }9 X' c, ~# y4 P2 w  c8 V
7 w* s' K4 ^4 {        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: E& q  Y" g6 R) R, t
! c1 h- V! X/ X0 i' i8 c& J) `

$ i% p1 a* i8 o+ L( j1 P0 ~Code:
; ~7 a7 l# O. _& Y0 f0 h3 A#ifdef __QUGET_SWAP_FIX
, q" L, S) ?6 N% o1 }/ U7 Y! ]* x* k, H" @5 Z
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )3 Z  l: w* w- f3 @0 v8 Y7 w
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());4 K/ m- z* L. E: l# f
" W; ^9 R4 U$ Q6 H) G. E2 u
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
3 E) s) D; S$ J: G9 V6 h$ {/ v                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' v" B: j6 _1 X& i- ?' |: L

, @" f( E7 R: W2 o/ k8 N5 m                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )) J# J: l. _0 V3 a% `
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) y* f  h0 d9 ]! X! Q) a) F/ g

" `/ L" e$ ?' _: G: ~" s9 w#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 Y4 T4 P! g; r" iand add under
4 }* [. p4 ^, L$ x8 [6 Z  S7 ?; U: T8 r  N1 a3 }7 G8 c
Code:0 o! W% O. d" i8 F7 G1 }; f6 C  {
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- i; w  b+ S( _% G) k' Y9 k                        {8 o* T+ s2 X* A3 d* K( {2 v
                                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# `- K$ y! W! n( O, C                        }this2 J6 f2 O: l9 J* D. `
8 a1 w# M6 R, J  S0 h& c7 _
Code:; L3 H6 Z+ o4 T9 Z
#ifdef __QUGET_SWAP_FIX8 z7 f0 N2 X7 A
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! I+ a+ H: ?7 v2 \% f                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 a4 j! E8 `3 D7 H# k
/ h1 b$ ?0 s8 ^5 A7 t, j
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# B0 c+ R" k; i' N3 e                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& P* E6 r# K7 i3 |4 Z

. B7 ?' D4 ~# S2 A4 X                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ), Y2 I/ I7 ~9 [# W
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );7 B0 M/ ?6 J$ E& N8 C
; ~3 r4 P/ ^9 s  {+ ~7 M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 O) t8 e9 o) R) ~/ K' e. o6 H& I8 ]+ U1 D% Z2 W# y1 S5 O

# Q$ ^$ K9 }* \/ t8 u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-3 06:10 , Processed in 0.062008 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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