飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16407|回复: 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 ( D; Z8 P1 h/ ^! n3 p
I posted this because someone kinda posted a youtube thingy about it :O.
/ r+ ?& ^% \1 S, s4 ?' w% w* l! R( x$ E" T( k
Find this in DPSrv.cpp @ worldserver
* m) z5 k# ?8 t. g! N
9 U  X! f4 b$ e+ g5 u  rCode:; p) P. d9 y$ D% G* s$ H, R
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 k/ E& i+ H7 W7 j9 s
{& m  m  u: Z' m1 y6 o
        DWORD nId;
- R. W0 l* n9 l8 w        int nPart;4 T4 q) l8 X  ]# [
# X  N& _3 |/ j( c2 n& y# r8 ^
        ar >> nId;2 j: g9 i3 z+ ]% t$ D
        ar >> nPart;               
9 Y- ^- M3 a5 E        # t0 \! ]' [+ \" A4 u8 {: V* C' j
        if( nPart >= MAX_HUMAN_PARTS )        , v) K8 b! F2 a9 \
                return;
2 }' t, P+ e) G! x" o5 ~, m+ N' D' ]8 ]
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ c1 w, N( E2 w7 G3 a/ `% O# Q" h( m; w$ [
% f# F! e$ j" k8 x
Code:
4 a: E3 r! F4 q7 c" S#ifdef __QUGET_SWAP_FIX
! A: d, f6 n6 w6 P
# D! E0 ^  X- R: Y! W6 O9 i                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
+ i- I9 h9 g' a7 a                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ q  t6 p* s, S9 A! R& J/ b, f$ v
* ?* |2 z" k4 u                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ): l* u( P; v8 g0 R
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 {8 D' x# M$ u+ ^& U0 p- S4 d
% X: J2 @2 q5 }                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
! t) t4 u) ~% t& S, K' B4 Y3 }( A                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, @1 n6 q8 m/ G, W* A# R1 @& C, |6 V: g. G  ~0 _, ]/ }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- e& P9 k6 a8 w0 J6 l& F& ?
and add under
9 ^4 f! E# H. |  {2 X1 N
3 t. ~9 i! ?- }- f5 x7 A) f* yCode:
' B1 y9 a3 m4 l) R6 X/ K; ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 i' t% D" c0 q* k8 {3 d4 x
                        {
, m1 i% l5 I4 j, z                                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 );+ V/ ?9 u! x! U
                        }this% r5 e! |( U2 f& ?% h

  \+ B: x7 U/ Z. s( P" G" ^8 vCode:" }; W! V- ~9 _% |1 K
#ifdef __QUGET_SWAP_FIX
/ C8 a+ `. z3 i  F( `                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )) D( S( l9 {9 B4 K1 b; H: t* y
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! N; U/ ^/ R; M- _

, {# P* x. t2 d  ^* A5 I                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )& I! m6 B: D' N. D
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( K$ y8 H& L& J9 C3 m  {4 C" D
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
$ z. d# ]. |9 q0 _* I                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- m- v# V0 P' a. [. {0 P( [; s3 K% t( }( m5 W6 ]6 ?% {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! H( p/ K* Q; q" D1 q  L) k5 N; Y
2 m! w0 D* e8 F7 e, _
, j7 k' R0 E. X: o7 I9 I6 z

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-9 21:03 , Processed in 0.070158 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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