飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16538|回复: 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$ z: g& E, g# K
I posted this because someone kinda posted a youtube thingy about it :O.
2 _  Y6 d, L8 t$ v7 Z" \. f! p/ B9 {  S2 k4 C8 w: d
Find this in DPSrv.cpp @ worldserver" s4 b. X& S/ m1 Q

, @: P4 K8 s. [Code:& b, y7 X' M1 L( `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
  R, g# f0 Q+ }{- h8 @# _- h# A
        DWORD nId;
, d: M( u6 E+ p4 w/ N$ {        int nPart;
5 S' j) O( {+ H& ^9 |  f& R- E4 u4 m! s9 R* @5 J
        ar >> nId;
! E: f( A  N8 z& Z: @        ar >> nPart;                1 h7 O& H" `3 i6 [$ {& e3 N
       
, j" q" z' y0 h) g' z% K        if( nPart >= MAX_HUMAN_PARTS )       
5 {# ?: p9 p0 q& c  d7 C' S4 J                return;% y9 O+ T  ~. d: E! [0 F
# E$ R) p2 I3 Q6 {3 q, t
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 Q5 H& H+ g+ U- l+ x3 P* j, b* r- u: n+ f& z# r
% U  a0 j) w8 c  H; O
Code:9 n3 A6 E& }% `( s9 l
#ifdef __QUGET_SWAP_FIX& Y- Q6 m7 ^* L  V0 |4 c
( R; l0 O2 m" K2 V
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 I, P3 X7 e) P& d. v                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
. w2 a) B+ y1 L. O( p  z8 p# Y. P; K
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 B2 q) [$ x& z" L7 I) H* S                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );9 x; _5 [) y, Z9 ]+ B  I' ]" W/ W+ E

7 b! q7 n, J9 t- T                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ y5 m) n- h6 ]; k5 B( z
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );% [6 j6 U, I4 V% y  x' D5 Z

0 e9 E& G5 v4 T9 Q" s$ b; U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 ]  q2 s1 V/ m; u$ x4 |+ X, eand add under
) E, Q/ G# b: C0 ?- [1 V' ]' q% B
Code:
! ~0 U& x1 S; x, c7 P. }if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 r- P( t8 t; ?" W
                        {
4 q$ G2 l1 J4 q                                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 );, {4 [: d9 i, j; I' v
                        }this
  ~& ?% M9 l! C: }" l2 C0 E2 Z* j
( g$ o9 N( ?; m; KCode:
" S# `* b; I$ l#ifdef __QUGET_SWAP_FIX9 Y) g1 M0 @) i$ X& g/ U$ f
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )9 B  i# V0 j% m2 ~% U. [0 Q& V# o
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 d8 a7 u2 d* P# {  s- J5 i: c  e7 R# O5 T% ~0 f
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
9 K2 r" }0 ^0 J                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ X( f2 }: i* m  b0 t' O$ n& i/ b0 S/ _+ v$ Z, s
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )0 c0 Q3 G' C' x: G6 i/ y
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ L( I$ K' p9 T! u  J- o, F# p) w0 y. {9 u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
4 O- K. p: z9 c1 U# {  J8 ]- L6 [4 ~* x% z0 }" v
, V& G% z. Q9 f6 a4 K" \) G: T

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-18 15:10 , Processed in 0.070780 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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