飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16416|回复: 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
% a2 e% ~' e; iI posted this because someone kinda posted a youtube thingy about it :O.
( Z6 M" y/ l3 f) v8 K1 j. ^/ l9 K, g" e
Find this in DPSrv.cpp @ worldserver) C  V$ ~) i  O# w
/ l# @/ E) w! h. {- P9 M
Code:
, T; H& J( {9 f& H/ w. d+ fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 X* w  V! I1 f1 T& U
{" |1 g+ T1 A: B( V9 Z
        DWORD nId;
5 c' `. Y: T5 _, |1 S% f5 B        int nPart;+ |; j7 D6 Z4 L

8 N9 f, }; d0 o' p( M, o9 Y        ar >> nId;5 f+ ^5 H" r" H- {# H
        ar >> nPart;                ; _" B* j6 S% P. o& O- N
        0 C. ^) r. v: r+ s# h, i
        if( nPart >= MAX_HUMAN_PARTS )        # t* e6 ]0 T+ B. ~+ U
                return;
" P$ Y: c5 }' f& q1 x3 Y5 i1 h5 w& I
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 q2 k) C- Q8 i& @0 Q* v7 D0 c% n) G" |1 A* v3 L

" s5 a- v, L" U( F4 I7 a2 ~Code:
% B" r9 H! t+ z' m* }5 a3 A( n8 H4 ~#ifdef __QUGET_SWAP_FIX  b& ]+ o4 c% p5 p, T2 Q$ m; L) p

5 \  n; b' X7 T2 ?$ `8 c; H: O                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 M7 P. v" V! I                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 |& Y+ Z; ?# o; m6 i# H! ^1 w0 H' i
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )! a- Y2 K! E# ^# B. z2 F9 q! e
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 f1 L9 e0 J2 K& r' o* S
( m( L, a& }# r& a) y                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
0 H+ u' m- u1 W: `0 \$ m! m                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 S6 d. U& L" Q3 {' b; `8 V
7 V) E7 k3 Y! _# ?- _1 ?0 P$ ^, o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ g* _. S( D/ Tand add under+ t$ t# `# l2 u* ^( W

5 l) M5 D( B5 r7 @Code:
+ G1 H% A" t" s) |; Uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 e/ i$ T' g2 `  |, d
                        {
; i( H) H9 Y3 i8 G- g4 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 );. i3 C( H# H# [
                        }this
* I; T/ h1 M4 B5 |6 f" d. P
% ^. b" y4 q  k  OCode:
! F% `7 `' ~* v* V1 [#ifdef __QUGET_SWAP_FIX
' g/ h4 E9 x7 Y. k" b- S9 M) g$ o                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
" r- M6 p5 y3 y% g- K                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ?4 y( o; y) G# x3 s  l! L5 s
# u8 \' ?' }1 o                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
* C; J" h) m+ W) H+ ?                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( J) l8 ?( c0 ]/ u! I: A3 H0 f: `) a, r1 ^, W+ J+ l/ A5 O+ f* c
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
: K" h- U" W- g  x: ]                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 a1 o9 S% i3 W* v
$ u3 ?9 i4 @5 ?6 u4 z6 L2 V, Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 P' \  _% H  B* C

$ p$ s6 W2 X. H( U# e' r8 _, @7 J
& q9 D  O" X4 s8 X. G, e5 u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-10 09:09 , Processed in 0.059451 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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