飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17159|回复: 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
, H4 Y- v9 t! a) G& ^6 c: bI posted this because someone kinda posted a youtube thingy about it :O.
: |2 s) W3 R# H: r
* R8 l& e5 t+ p9 GFind this in DPSrv.cpp @ worldserver
, |0 G! s& O  N
$ H2 n: R4 z$ g  A: u  PCode:1 Q3 A/ ]7 T+ ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# ~+ ]" |9 g- Y* M
{4 u' s' W# [1 g$ I. c% I
        DWORD nId;
# v/ x3 Y: P( _6 E. W        int nPart;
. t9 x+ a" @% @  H0 J  y- B. D
8 t7 a0 \  R1 M6 Y. e        ar >> nId;( s% y* S3 _) N
        ar >> nPart;                0 U# ?1 n4 n& v
       
! j9 B* R" L6 k, v3 w: V        if( nPart >= MAX_HUMAN_PARTS )        6 q0 L8 u% B& l" l" U9 G, h# ?
                return;
1 ]. A$ b5 U1 f. a' T2 C
: c0 g7 B$ k: x, y1 N        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* p6 R- z' v. b7 c0 V  A' j
5 W7 D1 A/ S0 J1 F. ~% H; i
+ h5 U; u7 e' Y% o7 ~1 GCode:
4 ~0 N& u- m7 }8 [8 ?#ifdef __QUGET_SWAP_FIX
  L2 Y2 A. x& I* Z7 ?. S
! `* I" Z- }3 `& Y                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )4 I9 ^( B2 o8 v' y6 D6 b$ Q$ u* t
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
! k: t' Y& x+ z5 o+ e2 ]! m4 g7 I- v/ T( y3 v4 I! D  s% k
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
5 V5 h4 O5 f, _* H- ?  n; X2 Q                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ Y9 }8 Y+ M# V. r) J  k: Y+ S! W3 n6 o, [. L% a0 o
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )5 F# [9 Y" c' |& \0 C/ o- ~
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ @4 K8 ]* w  o
! N& c: L  w% O: N  Q$ ?# O
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" f$ L& ^4 p- ^" }& I- O
and add under9 W, j' R/ ~! {8 K* `: h
2 L5 i% C  R( F9 p& ^. C
Code:
: b+ U3 q7 L# [9 _' hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
( d* {- X) w; L. b2 n; G1 o; N                        {7 ?0 G# F: j3 a, q; G+ ?
                                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 );
. k, M+ f/ ]! M* a# V) M) L/ w4 N                        }this# w3 f; E: w; |7 b4 h9 Q

1 Z" {1 M0 k! C$ t5 tCode:- X2 x9 ?2 K5 q) }' W- b' N
#ifdef __QUGET_SWAP_FIX
7 i) X% o! H' S6 u0 |. o0 o                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
. d, D& {- c: F6 L8 c1 e                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# S# R& d% N% x5 ^
% P6 G/ L3 i. B, `. f3 s
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
  l4 r. @: T3 _1 o                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 y" E9 a. D% k& @- P$ X- t+ i8 v- |  A, E9 G
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 H- P6 e) |* J
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ n4 V; ^! V% o$ ?" k/ a1 e8 K  Y# T

* h% j5 C4 t  q# f! {1 O2 N#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ I) ]$ @7 l; c. h) \' j
1 X( D0 P* P7 N0 S  U# r) l3 G; h$ G
- `/ \! Q, Z0 k

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-23 07:33 , Processed in 0.110821 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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