飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16406|回复: 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
8 c/ n: r# f3 _  g1 z' _/ aI posted this because someone kinda posted a youtube thingy about it :O.! j* r( T/ |2 @/ g3 _0 v( U! t
( Y/ e/ `+ Y0 H6 {
Find this in DPSrv.cpp @ worldserver% D: Y. K. V6 P

* i! c9 t$ O5 m$ f; UCode:
; [6 L, c1 k& j& e$ _# F  gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 ^1 [  J1 a( s6 E% [{' \7 w2 @- s! Z- ^( g& q
        DWORD nId;/ `) M" z# p/ D
        int nPart;
' e- u/ I4 T; R& u0 m) n* N; {* ?: u  F7 ]6 i
        ar >> nId;
& \- b! Z0 {! K4 [        ar >> nPart;                4 e/ `  u0 u! v" M7 Q8 X$ ~3 M: b
        ) Z, G) T0 Z/ J+ h0 N: x
        if( nPart >= MAX_HUMAN_PARTS )       
& Y0 `2 P- j4 }6 d& z                return;
6 g5 {3 D! R5 G0 o, Y1 i7 i; F) S7 l$ H( m, \- p
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 `, O8 n$ y$ i7 y; V+ D: {! n: b/ W0 t" u1 p7 c- B. s

8 D/ K$ n, l- V6 {/ ~; MCode:
: F6 }: _" ^" ^#ifdef __QUGET_SWAP_FIX) b5 Q2 I0 N2 L  m6 y- V3 \
1 e" X8 h* S$ h; j: c; ?
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
/ }& @/ |1 F8 n/ g4 _, Q! \( P                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
) g/ u- M6 K- S8 L# t) z8 l# r; J  u/ p/ {2 A2 k+ G2 s# i8 \
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )6 A; b2 ~% @: ]- ^$ b
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( ^1 N7 h; P+ J8 T# V2 B- |/ Z0 I* C4 G/ x
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
5 t. N) N7 O- F" u                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 O6 \* Q8 P4 y/ [) y3 c2 {
& L+ H( X6 t) |6 b$ i; c& t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 \6 f+ i. X! m+ ~
and add under7 H& d( `9 ]( D6 v2 B

  o" V  q9 t( a: ~) rCode:% o5 b; z) B# U8 L7 V; k6 s! O4 \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' v  c1 @- k( M. ~$ g: J; L9 t                        {
2 U+ U0 V3 Z, L. ~! j) 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 );
+ C* D0 [+ A: ?, I! @  w3 [                        }this
8 C% k1 ]: X" ?; ]" Q! U
( `0 C- j! A# p6 s7 b. j/ E, PCode:/ \2 F/ ]/ g5 S) x+ _' X' X' v
#ifdef __QUGET_SWAP_FIX* l7 _6 a7 E6 Q6 y8 y/ T
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ): R. Q6 N1 c* Z- H, a9 R2 @
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ j) h4 k& r* y% N# q0 {$ j
* u, `1 q# U1 r3 n4 K/ U2 F
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
4 M4 ?: L0 a1 Z# W! a                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# B+ J: Q3 [, ~0 c1 q8 _& M( U
3 c  X$ W. S- _. z/ _# ]" Z                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )5 H- U+ D+ S/ N1 {; @3 N
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- b  z! q5 j7 b% Q; v1 h+ C% x% `0 i) v. Q5 O9 n6 e
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! `5 e) J* w9 d8 F, a* K
4 @: `3 x- Z) f$ y& e/ n! B/ C

: T5 m! J7 F. Q+ |! }4 V% P

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-9 17:24 , Processed in 0.060302 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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