飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16760|回复: 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
' e- |5 X. e  o. m- |0 WI posted this because someone kinda posted a youtube thingy about it :O.
- u5 u5 _% p; V3 S+ ]/ s( s5 ~2 U  {" a% ?9 H$ t6 n: S
Find this in DPSrv.cpp @ worldserver
5 [# I& n. h4 o+ e4 W" D/ ]
. g. q0 g+ M! f/ X, ECode:7 g% ]' r3 \3 p. ?" b' i3 Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 m( G1 ]7 Q6 j* F: M& J' Z{
& _: g& _0 I7 I( s        DWORD nId;
6 u1 ?+ t! l2 v7 |' M! p        int nPart;
& w6 T1 w0 Y+ |' u
% x2 ?8 j# J7 ~( g        ar >> nId;
# k, c1 {/ z9 T- _" u( |+ }        ar >> nPart;                0 A5 W, A7 {. Y# n: r* y. \* ]* a5 o4 I
        ! x; t8 m5 H$ Q+ ^  m
        if( nPart >= MAX_HUMAN_PARTS )        0 l- A- e8 u. J" R$ s' j
                return;
: ~) Z; X4 Y3 z0 V1 ~
7 i1 h+ }  T% N  u        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ Q! V' u+ ~0 \; y  D
5 i( Y3 H! N7 O
; C( c6 U3 j3 W* l) v+ F
Code:; ]8 g" ^7 i( G+ N7 y  ~
#ifdef __QUGET_SWAP_FIX6 S8 z; @! ?! h
+ y: s. d8 ~+ S9 ~3 W" A
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
" r8 E/ {+ r9 h6 M- U3 {/ u                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
& O/ o% i1 ]' |7 _/ y7 {. f( v5 X7 @& r% j: U$ J
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
3 }$ M8 o9 C" q  e                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: t: i/ {( o* U3 O& v; u4 S! C+ \/ d8 f9 {  g" H9 }
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )8 f/ i& X! l! z! [( B
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
4 q7 ~" c8 L  B' f% z* {3 }0 ^& l# @& K2 _$ W2 _9 N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp9 |' x! d+ W" e6 \% G
and add under
% h* S) }# D7 D3 k0 A& y( T. U+ Y! U
Code:: K3 V- Z1 u, N$ q0 ?7 h# j4 |; o
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 B( [5 J& [6 `                        {
( N# V* r! B& J. M                                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 );% B/ o+ k) l4 g
                        }this
" t3 i) \, t! K( v5 V+ `$ ?# ]4 A6 n0 \. U  [
Code:; l' d; M! T6 i3 l
#ifdef __QUGET_SWAP_FIX
" B5 m7 \5 O+ Q" }                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )" M$ p9 [! d& a& w
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 H8 z  J, f) d% b' h1 Y2 A  V; y  c* t! p5 N; @0 m
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ). u9 z% }" K6 @1 O" e) Y
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );0 z$ c( @* _7 [5 e- b% n6 q

% H9 b3 `  u' \3 R8 t                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- y' O! E- B# F) e0 |: b
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 ]+ l9 ^, r! M& U( b& L. y( T
  q5 D- y6 e5 m1 Y$ U; Z9 C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ g& B: }' f2 }0 x7 v/ f& a1 A3 F7 y$ y- r: s8 C, m$ `$ R3 \
7 o8 j3 U9 S' a2 f# H5 z% X

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-29 04:38 , Processed in 0.066471 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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