飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16174|回复: 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   C% d4 o& B  v
I posted this because someone kinda posted a youtube thingy about it :O.
# s  {: e  V, ]. T) t3 a7 e. F) b0 f0 t7 h
Find this in DPSrv.cpp @ worldserver
  w# E) c5 N+ k3 ~; ]" g
6 u" S. v3 F8 R* FCode:
( _3 H6 s% N' o& }void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ R2 t4 p5 P2 y1 [0 Q' b- i; r; Q
{
6 v2 A5 n/ O6 c7 \. E& k0 y! b" W9 I        DWORD nId;
5 @/ v% h  P/ X0 z, u6 o        int nPart;
; \* A* g9 w6 K! x- Y4 e$ s9 v7 o" E9 V
        ar >> nId;
1 B- O5 F4 r4 z9 m1 w        ar >> nPart;               
! o, D9 Z& i+ Q  P0 ?       
" p3 u# M& f+ ~, K; o" {! d        if( nPart >= MAX_HUMAN_PARTS )        5 p5 l6 a7 b  X; L" J
                return;
, o9 E- B+ q6 N$ e
" ^1 w! a: T2 w4 T2 p        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 q! n+ J" w: E# d- ?

7 y8 C# ]# Y# @- y0 ]
% G6 b% ], E$ O" P1 u5 eCode:# a, [* a  ~2 C1 n/ T
#ifdef __QUGET_SWAP_FIX
1 p2 J6 Y) C3 s4 ~! }8 B" j" B* K0 Z$ s6 ^, E! \+ F/ I# q, Z; H/ b
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )# T5 Z( [9 J! D- a; |
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());9 K! d, X5 r1 v8 S+ J9 ~, y
" y8 `; }+ r; c& b
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )7 ^5 D) m. d* Y" Q
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 g1 l/ D# w9 z$ x: m/ K5 k2 P
- f3 j, P1 z: H& ]                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )7 k3 Y1 G  n* c- F5 q- Q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );, O7 b/ Z) K$ ~: q& E; q8 W
' p, E; D$ x% a) n
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 k, o# q- @4 [# y! R( cand add under
. A" M0 z$ o/ U% y2 |% P1 \' Z7 d, @2 K, ?5 x2 S
Code:3 }& T" \! G6 _& u, [8 C
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ \+ Z4 r: o: T3 B- L& d- t
                        {2 z( O- X$ O+ Y, L! M! h
                                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+ ~6 u; P4 d( ]$ a                        }this0 i" N6 K( [$ J% H. r9 F/ s4 a

+ N9 c2 b& k8 |1 a9 zCode:1 y: \7 ^* K. P* ?0 s% T
#ifdef __QUGET_SWAP_FIX/ I7 e( O- `- d$ L! q
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
. {6 O3 ]! B* [% \9 X# u, l                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
; C# J) W, s5 n1 h5 _0 B7 a2 N3 I0 ~. d: h, l/ Z4 L
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
+ f' m% g5 g/ A/ Y                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# m# e! }$ b: Z( l+ W
" X0 a& d# V! Y4 r, L                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )' f; a; n, y' i& U: _* U$ Z
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: E$ u2 ?. D+ r; l+ X

9 l) T: c  A: {8 P8 o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + ~; \3 z% b3 G; F- t  j+ N

4 V+ D' t* d6 G- F5 C& `: [
' t" M" v* x) C# ?

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-22 10:04 , Processed in 0.074541 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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