飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16331|回复: 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
1 o* O! i1 t1 c/ o  m, e0 \I posted this because someone kinda posted a youtube thingy about it :O.
. j8 R+ n8 Q' Y/ G' d. R/ t
' {- Z9 R% J! J5 o9 |: q# w) TFind this in DPSrv.cpp @ worldserver# x* a; M; w1 r, j  ^+ Z
- o0 ?+ T/ {4 d. h1 C# F7 V
Code:
. ?+ B& \9 q6 n% Z+ [, evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' L( H0 o+ T% L8 _. u( C; G+ P{
7 T" y/ m% P: ?$ t        DWORD nId;
8 j6 U" d# ?' ]  L& v        int nPart;
) d3 t( q/ z$ \  Y( [/ J: p" a5 o( O' p) _+ z+ w4 A$ s
        ar >> nId;0 W& |4 U& U. g; p# b5 e
        ar >> nPart;                9 [% u+ u8 j; R# G; m( ^
       
! V/ F6 Z9 k1 z" A* [% k7 O* o        if( nPart >= MAX_HUMAN_PARTS )       
2 ~5 i4 W" O. I5 _                return;0 \9 C0 D2 O$ j8 V7 N0 z1 M$ v

: q9 k6 H4 d' v: w- D# L# Y+ q        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" D( w# v* Z+ Y6 K
: a8 E  u$ R5 }
; l, D6 z( J" p# QCode:  l) s- \; k9 ?' f
#ifdef __QUGET_SWAP_FIX7 v7 u2 v! U0 l/ e  D

. R& I, q( A1 L0 P" O                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). r& q6 l: z1 v
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
( h, t4 |/ u: E# }9 g# ^/ H: x5 }, A' n5 n
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )0 x5 B  q1 H# W4 @1 H
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );, q$ _* _  r2 ~% O3 D0 G

6 u& K- m0 R: U) b( u- j                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )4 f' u$ Y+ }' H8 G7 q! w9 C; l; I
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) [" Z) o" k$ Y" Q8 a% r% z2 a6 t, ?2 @1 j3 J, P/ ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 T4 V$ V+ g/ Yand add under
  N" v- Y' k2 A; u2 b
" I8 j" R( k3 p% K3 N% f; W4 BCode:
0 E2 O( G5 R8 @  q+ Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, c1 H/ Z0 l; M) J                        {6 h# W* F1 r  w% D9 [7 T
                                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 );
) b1 U: l4 i# |; K7 z' E                        }this5 J0 e8 A, s$ D4 u3 o. j
; R9 v8 j. }9 O* S
Code:
5 @# \. y' u! p#ifdef __QUGET_SWAP_FIX- c7 q1 `. f5 l: `. a$ W6 a! l+ |
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
- o. k* n. A: z& v9 N# d                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());6 P. D1 x+ q' y7 |( s+ S) G

- z  _" K& U  A                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
2 g7 j7 d/ q; _. T6 {5 l) Y                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
' f) o* N. s+ h8 ^% M7 L% @; G$ U2 b$ i8 h5 q. L  O" p
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
4 F! v1 }/ l2 ^; x% F) y                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ w. L* J* H6 V! J9 ~0 Q0 u) g0 y8 t9 n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
  Y: c, c6 F7 Z; u" S  {. w
& E- p* h! o: Y5 n  \  _$ S# ^4 Q7 e% W0 @+ w/ H5 I

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-5 15:58 , Processed in 0.061453 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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