飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16809|回复: 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
# O, \% ?3 H9 K/ j3 s2 a' PI posted this because someone kinda posted a youtube thingy about it :O.
, y. O1 q: S6 |6 `; J4 }
, C. h; p7 c- f* IFind this in DPSrv.cpp @ worldserver6 u% n( V1 b, _$ o

5 ~0 L! N: S, V7 tCode:0 C6 h2 R0 L9 Y6 S3 L; J3 o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& w: o* i% T' f' A2 Y$ K7 I
{
. W0 o3 H0 c0 _6 x  ?# d4 t% u4 X9 D        DWORD nId;3 R4 |+ W5 O# {! Y- k2 O
        int nPart;2 K; Y& |, D8 J, d

! S3 i& Q4 M" V2 C# g6 i: }        ar >> nId;
' G" ?- `3 h+ j- y  c; |        ar >> nPart;                1 I, k  @' u# `* j' @+ r
        % |' t0 P) g. h: y$ u
        if( nPart >= MAX_HUMAN_PARTS )        % T( P& k% N7 Z5 l" C* }9 x! d" |
                return;
0 x5 y5 a# D& P( a! G1 V( _2 K) o" |6 p0 r. ~6 o; g
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% e3 _4 e. w! q7 n0 s% I/ \2 Q# q& F) G5 Y
" |9 h) Z1 Y5 Y+ s0 a0 X
Code:
% w5 L# m3 P3 B8 f) {+ J#ifdef __QUGET_SWAP_FIX# r( \+ Y7 }  Y

. |3 }) [% r9 v' q. v4 T                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )) w. s9 V" |2 m
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());6 X) e2 M% ]3 j+ ^7 Z, p

7 {4 q3 }5 ]/ Y) I& a& z                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: K) p+ W- L' A, t- g* Z! d. y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! |9 |: i; L( ^  N2 R& ~  w3 J1 q# k6 y- t& `+ ]( A+ h5 Z. w
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
- X( g6 v- T. y) ?4 k                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ _; v, \6 D/ u
2 H9 K+ K+ e1 W' w) t' v#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 q' p, I: u* ]1 |& T
and add under
8 X) r0 b5 o$ Q5 T, u2 L, x4 l4 D3 B9 @' o
Code:) a7 m6 B& M( ^, s1 j9 W% U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 T7 @9 b4 `$ l5 O9 M+ b
                        {
0 p- U: B, n8 z: ^) u$ w                                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 );
- {. e# e% N3 b% f2 M                        }this
- d% t7 b2 P3 ?7 \& m" g% k/ E0 S5 M
) l3 p$ [. z- y! h3 PCode:2 Y* X' @( p; y/ V
#ifdef __QUGET_SWAP_FIX
6 b7 {( z: v3 o" ]) _2 y7 q+ |% M                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )/ i9 ~" G; l0 t9 j/ Z+ j2 u1 P# x. G
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 a) ?4 e  n- L) G: x7 e' _4 ^% ?

3 i. y0 b. J1 N. s  n  g                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )9 H" w3 Q- H% g1 Q
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& Z; Z. A5 f6 {6 D7 x0 t
0 O! e$ K, M1 a7 h9 _# [
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, }4 H" g/ e7 o- ?  u                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ t, q& z! f% ~6 i6 A
: R$ J) g8 m" c' l& M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: Q+ W/ Y% n1 ^* Y! N* W
( b7 L) U" Q4 Z8 P7 T' `* u2 O+ L4 V

相关帖子

回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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