飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17190|回复: 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 9 j! Q6 V! j, C7 k* M' l& w# Q
I posted this because someone kinda posted a youtube thingy about it :O.
! |: E& w$ N; ~: _& [: Z
# l2 s( f" G* O3 r, h/ A/ WFind this in DPSrv.cpp @ worldserver  ~9 B( t, d* K* u# t2 J6 J

* n" a/ L' [7 I! B4 X' t7 jCode:
7 \  \* }/ @' Z$ |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. N/ {& {5 S- u5 e7 S1 Y* Z{
8 [3 \, I8 A. E; \+ m" T+ t! ?' W        DWORD nId;
8 E. I) G' q. t- k/ r        int nPart;
, [0 q- i& B% f. D0 ~' G
4 o' H0 A0 U+ n        ar >> nId;& r6 b, f5 @( D5 R& \
        ar >> nPart;                : ?( b9 Y3 ?: J  b0 L
        ( v9 `: C4 u% X6 M* {# i
        if( nPart >= MAX_HUMAN_PARTS )        ) h# {4 v6 Q' E+ f' @
                return;: r4 Z9 o8 X  [

! d7 B! I! a0 D: {) b2 y        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 j) Y6 e: R3 d3 B1 T; l1 s. b; v
  Q, c. w, }8 G" p  ~% n  h
% W# ~4 }( U/ h/ C, Q
Code:
: u( G, F6 ?& H5 ?  {; J#ifdef __QUGET_SWAP_FIX
3 e6 a. X) P2 N% L' A: _
4 X4 w" ^3 ?, P; T: O                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )9 \; R+ ?3 F8 Y
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 r7 h8 x0 `, N* Y& o
5 b" s4 ?1 B( l1 r+ ~( G8 Z% {                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
8 c0 o1 v* H- f8 N$ ?* ^! }2 f                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( }! ^" y1 t7 g, Z5 |
9 G0 a( F( w- p; d1 u/ T( L
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 \4 n7 I! _- [4 _" U, Z                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ r  `! Y6 g( _8 R: n

) J0 }  f+ q0 C, }+ W& X" t#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ A! Z$ j0 K  `- Y$ n/ Iand add under
: O9 R! k( T, Z& r- {, l! f6 Y' b2 s/ b) T: J4 v
Code:" w8 f8 X5 W. B5 V! d9 q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) t+ V0 M: k1 L: d8 e
                        {0 ]) N! u7 K' u9 a7 n0 x
                                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 );3 ^+ T. M1 ]: T; N2 u- w3 o
                        }this
/ C3 U7 F6 o5 w+ S3 r! X2 ?$ H" o9 P# `0 P- r# J8 M
Code:+ B5 D1 Y7 n. e! T. W2 X' u
#ifdef __QUGET_SWAP_FIX2 U8 a7 @* {6 V$ a: u( C- t6 G( {2 B
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 ^( N+ J& m2 B& {6 x3 c+ b
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 c1 K3 [, u# [- c- e. C
! b" j" X) Y3 c$ C2 i0 n: x                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )! W# S4 [! _8 ?  u% F
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 A% E4 _5 }2 a$ s  Z. p3 l1 e! C/ }8 F2 f3 x( \
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )' i# h% h% L" I) J8 c
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
  B- ~! z9 u, t% o8 k, N8 Z$ H6 w: ?4 O2 `/ y0 {1 x# D
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver   A( o) C8 A5 y

& U- a+ A  ?5 R4 s- ]1 t* ?& t# @% {4 M

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-24 07:53 , Processed in 0.061876 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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