飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16700|回复: 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 ) x/ x3 O: \& e
I posted this because someone kinda posted a youtube thingy about it :O.
( n3 `8 Z5 N! j
7 t5 G1 O8 ~" }+ O/ F/ |0 }Find this in DPSrv.cpp @ worldserver
1 j% H6 o9 K6 l! b! i: X5 \9 o9 T
2 |0 k, U; v2 E! k4 h4 |- Y9 O: iCode:
2 r  M, _5 v3 ^6 R2 wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 Z, P: X% V' W1 [0 v( a{: B) Z/ V% Q# a+ ~" F! Y! [
        DWORD nId;: o- t6 k! f0 K8 \7 e0 t
        int nPart;
5 x, h# l2 `; ], q' M2 g: x/ |' Y, @  Q" b5 n
        ar >> nId;- S, ^$ {2 i, v, ?
        ar >> nPart;                * z; s5 ~9 Y, _
        , w% D8 L% b' ~& p+ ^1 K# i
        if( nPart >= MAX_HUMAN_PARTS )        . v6 Z( m. w5 d- a
                return;
' _7 I) W9 Y0 E8 F+ h3 M
+ G5 m- t) |* M& H        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: {; ]% C! u* j
0 L7 V9 |# L2 n+ V
) D: ?9 L9 G( C2 M' y: QCode:
! P2 b" o+ V- P% ~) F#ifdef __QUGET_SWAP_FIX
/ Z- a; `/ r  C$ B5 O' H' K& G  B- M; t, U0 U
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ): U0 P4 z0 t! U; K
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% i4 E+ Z4 g; a" h* i1 i7 B+ o
9 o: I4 h& }; q0 P& g                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
3 v" e6 [2 X, E- y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ e( g) d  p5 x
8 I& b) y3 _, A0 k9 T& F
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )7 S4 P' q1 L; I* U8 M; u
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );3 o  S0 N4 k6 b2 J
8 R. }- X* W, q6 D$ m0 O1 U
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ S/ ]% x% V# \and add under4 p1 W2 G0 ?9 g
7 Q, V) S: E# b4 x
Code:
2 k, G6 C( l0 G, H$ Z. _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
& J; k! S. g6 l$ |                        {
# S1 e8 d' ^$ Z3 ]% Z. N9 B9 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 );9 Q' _5 Q  M. y. O2 w
                        }this5 F) R; A/ K5 e9 H2 H

0 U  ]: ?7 S: C6 U# R: F8 @) nCode:# Y8 V1 a& p) [9 w
#ifdef __QUGET_SWAP_FIX
1 s) s. d# Z% I3 o( b  q: Y# c                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 \  [5 {$ s# j                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 }$ Q' D5 w" F/ W1 E4 P0 y. g! @- X& ~- I
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
5 a) w8 {9 q' ^) o( s: n                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* X/ H$ z& H* J$ `$ ~+ M0 @

* a* U- S5 I* E5 ^/ I" S                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 Y) {- X$ P' s6 X3 a1 O
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% A8 S/ K7 e9 O5 U/ [6 P( j0 ?! a6 |4 {6 ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( p1 A6 u7 H5 L$ l' [, C
- m8 w+ _* b  u6 p3 N. u1 U
6 i+ T5 i8 M( {- s6 I. X

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-26 15:16 , Processed in 0.066513 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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