飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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 ' m. l( f) A( H! T
I posted this because someone kinda posted a youtube thingy about it :O.# g8 g/ H2 b5 D9 `0 S

2 b. `/ a0 t* q+ E% ^5 mFind this in DPSrv.cpp @ worldserver3 {0 X# W$ M, W! @

8 D! z. D& e/ Z! ~+ B6 d) K  PCode:$ j( S; M4 A6 J' I7 H
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 h- p2 }9 N3 B7 k{' t  O' a; Y  C
        DWORD nId;
" H  W$ C" q8 t2 Y        int nPart;/ K; w9 B" d/ b# V: h( i8 n5 S

% m7 Z7 z! V+ t- m        ar >> nId;& a6 h/ F9 C5 ]8 X  T7 G
        ar >> nPart;                5 c. g, F9 T2 L2 I
       
8 y6 b/ a' P: I& R* {% \( |        if( nPart >= MAX_HUMAN_PARTS )        $ A& C( W& O- C  X
                return;% a; \0 h4 H6 u; @

+ g' U& J% y- B! R" i/ c. P( y. Q        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! w1 \- |( b' t8 e. u: q; P; n% Y6 T
8 Q' }& u: }1 E$ z( h) I# T2 Q! v2 n. ]2 P3 q2 x
Code:+ t9 Y* ~5 A, a0 }3 @6 n
#ifdef __QUGET_SWAP_FIX" J; U  C8 }) f" j# G2 h

4 N' A9 V9 W' I* \- `* r                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
2 K# A- f& L+ q0 E$ R) n( B                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());* C9 _6 D* }' N3 y% B# O  ?

7 Q0 L5 \& W* \/ L7 n                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )3 ^9 a" ^& D1 H2 e/ T1 c
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 v  j  m! w2 Q" c0 R2 _% W+ {' v, g, B6 _) ]3 |0 t9 k
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )7 l. G1 c5 F9 O5 q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  G5 }: J$ L# L
* K" K4 ~  I% z& N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; @% P# \* C3 W* O
and add under
# Y& m- `) M$ ^2 H: ]7 b, R2 b9 e; n% o; K  w* N4 ~
Code:
8 }, T% u. c# `& P. Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 \: [% p& G$ w! J. P                        {
: R5 F6 k' a: l9 f- U9 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 );
8 h' n+ l7 i0 K' m9 V1 e                        }this
+ E4 u5 m3 N8 I
5 w# Q% f: N, ~. [# mCode:& O" ]. \' i+ Y* B
#ifdef __QUGET_SWAP_FIX' s/ W9 X5 E# n
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
+ a! J8 m! C& r; c1 U2 D                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' _4 v1 p3 }1 y9 B4 k# M+ Q

* e; W. j$ i  O3 y2 h* k                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
/ L7 |) r; D# X9 x                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 D6 f! N. J1 `  ?
/ y0 N# \0 V3 u4 Z- D                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, K9 H2 h9 _" X/ I                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ Q+ ]; m$ H: r% @  F

& O; y) \; P  J3 j#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
# r/ R$ `, Y5 \' r1 @# I0 {
$ y! \2 K* @# v0 [# v' o8 z. m( Q  b) {* s5 y# d

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-27 22:10 , Processed in 0.062465 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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