飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 15015|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1064

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1064
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
5 y! ^4 C- T$ U1 t; x' dI posted this because someone kinda posted a youtube thingy about it :O.
9 L% ]  W# z. K- L3 N5 t
! c# ~) i2 G2 rFind this in DPSrv.cpp @ worldserver
$ U- H* S! j, r  q7 z+ g7 @; i- H
Code:
5 I# M4 z  m' q" {3 I& h- i& ?void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )$ M8 l6 |; i7 Y# L9 m! ^! ~
{
) A7 z7 I& O' k" x9 b        DWORD nId;
1 q) U  |# e  P! k4 ~        int nPart;
$ D! A  T" n- G- `. L
, N8 S: }) E* ~( q        ar >> nId;
8 h: h4 }; r6 L0 s, n7 S+ o        ar >> nPart;                * D- P6 B- }5 n  w* w
       
& K$ _  X0 V# V' t        if( nPart >= MAX_HUMAN_PARTS )       
3 }" K; r3 w8 J1 y7 C8 j                return;
. i$ |, w0 D) d5 N/ u+ O, Z: p% o6 H6 B
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 u1 H- o# Y( x) L1 t1 H( X' X4 N
8 b8 _4 \5 x5 M/ S- W0 {: o2 W0 Y" H8 @  K
Code:2 n6 [) j$ Z* i, {# O& b- i
#ifdef __QUGET_SWAP_FIX
' I' b0 [+ Q4 w+ ?3 |
! V' M; u9 r, z& {' J                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )- p! O2 M) @* }  L* ?) R: @+ J
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());4 \9 O0 [! Y- ~1 ]
* e7 ]# y6 a9 U4 U& _
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
( R: V- h1 b6 R9 B6 W% e0 {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
" \. X. \2 n  ?( N/ x  w* H! z% A; j! H, I
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
: K. p; u5 S. S7 c( F                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );# x- W+ S. }- _9 `+ p6 q7 A
4 D' t* ?0 D2 Q( g1 |
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) S' s4 w% f1 G: }6 I6 ^( r
and add under" J* u6 t$ J- X: D7 E
3 K8 ]& r+ U) w. P0 N; o$ |
Code:( Z, C9 ]$ r, _7 @( u
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 J0 G) S* N9 x* F  L
                        {
: l: E. `* P* E" e# Y                                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 );
) x2 R& [, E% k$ F2 R                        }this; h0 M4 X5 Z+ w4 p: A$ j, b9 v
. p1 H7 H; ^! ~: K8 X% s
Code:
4 @* K1 j, ^+ l5 B5 k' \2 v* U2 q2 m/ V#ifdef __QUGET_SWAP_FIX
5 a% V# ~: Q: i7 V' X$ Q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 u( ]% f) A: m) U: Y% Y
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
5 V  Q+ t, x7 u+ |- }: V+ j1 h2 p; X5 d1 D. s- \
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )# M% l4 Q* g$ w# M! m' D
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% }6 o  y+ {- N
: i- f+ y4 |7 E% ~6 j                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
( |, [7 B5 n6 z, F8 ^2 ^! G                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) Q' X; K( k) P# Y# f
& I& L5 j: |3 W3 m1 ^) r5 q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 k$ z2 J3 H, _6 I) }
& \  m0 R  K! z3 a
5 W$ }1 ^3 z. P" p* F; x

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-16 20:48 , Processed in 0.058731 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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