飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17193|回复: 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
6 y/ d3 M5 ^/ I: T, }) c7 @I posted this because someone kinda posted a youtube thingy about it :O.
" p. k7 q6 p' s0 k' |4 H; I
. {- X& o: ^$ |) h9 r1 |! v( xFind this in DPSrv.cpp @ worldserver
0 T" G8 h5 f. }, t9 Q. J3 e" k( w5 m1 _" s3 U& e$ b2 N9 }. |* D  N
Code:; b6 @2 C. v& C
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 J) B; l( U, n  i! Z9 P
{* v9 J" f+ n$ v/ o8 X1 s, n3 g
        DWORD nId;
+ e6 C, w! A9 s3 s6 p1 }. m. R& b        int nPart;, ], l, [+ o! Y5 ^: @

% A6 ~! O* @* v. y        ar >> nId;
% J0 U$ l% K0 u3 L# ]) A        ar >> nPart;                6 ^, P9 p& U$ K' ]0 j6 q' A* x
        " z5 P6 n- |, U
        if( nPart >= MAX_HUMAN_PARTS )       
9 O2 k6 q/ O  ~                return;
1 L0 N. t! ^% r$ M6 v
" D- j  _: d: k        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 g# t4 j" F, [2 O3 k% W3 i+ y: A/ o' o/ r$ S$ m0 F' v+ Y
& r6 f. p: O8 n+ K! h, C; q3 k$ |
Code:& V. G% n! h0 G2 d, [
#ifdef __QUGET_SWAP_FIX
  j7 ~) u$ o* z0 J) f& n* M* }. Z. J
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
# m/ O: x1 h/ V' Q4 O! ]                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());3 A1 L) e* ]0 e0 k, d5 a: ?0 m, c8 B

- H2 V7 d$ ]: a8 C9 k* ?( b: r                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )  |+ g/ u2 D! q: N! ^) S8 d* E
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );" U# A+ }* ~# ?1 t6 {5 W% [

2 T/ V: U- L& a( D! x- _                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ); B$ e1 G. f7 L, P1 T! K
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  a: Q9 A9 r, h7 J0 ^( L
" L! c7 D5 \1 a  }#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 e% N! W; C, r' j6 y. g
and add under
2 t) M* I0 |$ L4 _
) H( k; C4 Y3 _6 BCode:) G& s1 N: E% u$ j) [! b- b
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* k, F, n* Q# \3 d& V/ h5 s8 m! B                        {; V! q" V( B6 D% F$ p2 G* 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 );* e$ N7 m/ E6 y5 D( o, Q
                        }this1 [8 X2 W0 K+ b
5 h1 ^0 L/ n& a
Code:; u% ]. ]! Y. m  C, b7 O
#ifdef __QUGET_SWAP_FIX$ a8 |. v: v( ~: ?7 ?: t
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )& ]' @$ m/ \% F1 }
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 H: B: j+ t, B
4 S- b5 N) m1 s4 c1 m; @                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )7 a# T; {3 b) \1 e3 ]
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: `$ b( r5 f' i, R8 h
; R9 I! q# ?" V                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
2 y" u- Q) m: ?& d- e" {7 J% P. S                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 ?% [  y$ A0 E- D% B
$ m" y1 A  Q; y3 e#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ g, M+ o2 M  l% O
' |! a9 e* T' V+ Q

) h5 a: \6 Q* {2 P* ?1 b

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-24 11:22 , Processed in 0.060325 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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