飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16859|回复: 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 , S/ s* a) z. c5 A4 E
I posted this because someone kinda posted a youtube thingy about it :O.( @( Z8 h4 L" K/ j3 B3 f

  K- u! t  s% B2 O( ]9 s" oFind this in DPSrv.cpp @ worldserver/ Y& D1 v3 G/ f7 S7 ?
* {4 p" \" d! n. [% ^$ U$ ?  w# Q
Code:
# ]' U6 m' ^/ N8 j8 k( ]void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) g4 D. h1 X0 F4 c$ J3 y) g{& i; O/ ^3 R# r. a) e5 n/ b' T
        DWORD nId;
- `+ U' t$ C" t* R+ `) s$ V" D        int nPart;
. ~8 F: e$ n) b; ]1 F
: A" G: ?6 W- z) l  F        ar >> nId;
$ y, Q: I5 }& `+ Q; h9 [$ o- S        ar >> nPart;                ' S6 l( r* D1 t2 Y7 w0 O. e) X! m
       
& ~% W8 l. |* T/ y5 H- h        if( nPart >= MAX_HUMAN_PARTS )        5 p+ q- K% Z: _# \
                return;, C2 Z  Q, ^- ~8 p0 u. S+ n: n
! T9 g! F! f& t& R
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' m: K  u3 e) _) ]6 |" w$ M7 O6 G5 w* z( i  X* @/ i6 e

% @- p9 g  T) U/ k, c  V: o  @+ SCode:
; H+ K7 Q5 p6 ]$ d#ifdef __QUGET_SWAP_FIX- F: p, W1 q. J/ x2 ^5 a  B# ]- M

( h4 P  [( b8 q+ q; m0 P2 ?                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )* w: f+ Y+ @! z+ u7 S( u$ S
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
- R0 Q3 ]: `$ k! r% w5 k: a! t
2 `2 ^) G& b9 U4 A2 t+ G                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- Q, s! Y, @- Y& w7 U& Q
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' |6 v& x- k2 T; h

/ b5 t& S) j6 {) f  M6 I                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )2 g, }! z& x0 R6 t+ @
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 C! i, n* V9 {2 l- k- k
% z6 F: D9 H, ^2 |. |- q; r8 s1 e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- f0 ]: K- X8 j2 @5 s
and add under9 `" @$ l4 s2 g1 F* w4 t

1 P( B3 k6 H6 m: q8 {0 RCode:
2 Q7 H' e3 A) lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# F, M6 `' @; @! [$ s( y1 b/ S0 p
                        {: p' I9 G( N! u$ A
                                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 B) l- o9 H8 U8 ]: ^# K6 q                        }this
4 Z. W( g- z: `$ a) e8 b/ Q
1 n" @. B' B4 {% N2 p  I0 R6 k1 [Code:
- w: ^1 C  F' V( |. K/ k  j#ifdef __QUGET_SWAP_FIX3 q7 Q/ r: o* L7 m/ V# w
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
& \/ u' c/ k* b% S& ~  T/ y- S                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 L' e! h6 o) x3 N( `+ j% F; B8 D* F9 a* `/ \) I9 Y
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() ); P) r' m, Y, _+ `5 L
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 a- V4 e4 N" L2 r
) L" m. Q0 S  J+ z* V' r
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
: m  @. s' G8 |7 v                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. |- s; \% @4 L  _; Y: ^' P
/ L- [( a8 X& d4 w3 v2 n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# h- P  l' ^- X: X) W% f  I9 k. A+ y4 f) q- \& L

" A. e; ]. z% w+ D

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-8 23:03 , Processed in 0.062624 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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