飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17267|回复: 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 7 ^! }% u, W, X1 `0 _
I posted this because someone kinda posted a youtube thingy about it :O.- n. \* z) _1 J' ?
4 e- F. u  r0 h2 ~
Find this in DPSrv.cpp @ worldserver
( L* Y" @- K2 |  L
% |: U) l' j: H3 B! L0 d( k8 F, {Code:
! b& P( h  X) X2 M4 m6 hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! D# Z* B5 r; p2 n* \3 P& I{
+ Y6 C4 ?7 N& M4 d1 G  B        DWORD nId;
$ y5 T- C7 R4 O6 y4 _        int nPart;. W; ?2 {4 P5 \
- R! S, E  @5 Q8 P% O: S& F
        ar >> nId;  `0 C5 H- Y* I3 g' W1 y1 X4 C
        ar >> nPart;                - P( U  }' ?  K$ v0 `2 N
       
4 K: J% ?* S. ^        if( nPart >= MAX_HUMAN_PARTS )        3 }. d+ r, T( D& c$ L9 S
                return;1 ~1 E+ [0 B3 H# C" ^; N" O

- i+ b7 g5 w7 n- R6 }% ?        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it7 P7 h4 r& P# k$ \- a+ S

0 w7 V8 M1 v- t
4 m2 T" B; M7 w5 ~% p8 n. y; PCode:
3 i6 e6 A6 E' {! x- _' d#ifdef __QUGET_SWAP_FIX
: n% Y$ q* f2 j, H$ M# V
$ J9 D: U  _# E# ^, Y' ~                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ c- J  G7 y+ I
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());7 T9 J8 Y6 o- h0 }  H
- G4 i% Z. {* P; ^( k( m6 |$ k
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- j( W. H6 d* w" T1 F                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 q( N( I2 s  Q/ X5 E

# B2 L1 C; T1 i9 E- \                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
# X6 a  [; ^, V+ D9 N& x* P+ F, V                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  T8 z, |% l* A+ H+ [! }( p2 U4 n+ l2 U) q8 N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" s  @- F& c! l  Mand add under+ \& P- B4 I( {" _6 x" r( ]# l
+ Q+ s1 p7 R: ~! S4 }: |
Code:# h% |7 i2 D  x4 @
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% D% K5 d2 E  K- q7 M: X                        {( P( L7 a  Q4 n9 D0 \  J
                                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 );
. F/ d; G) K$ j                        }this
( [" ^4 l+ J% o5 a) L$ p3 t
: S% V% I0 B7 f/ T9 R* q4 fCode:
. ?- {+ @' U! \7 J#ifdef __QUGET_SWAP_FIX
2 w! @! y- J( a                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; H& {8 I$ V! k( o$ M! q' t: @                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: g* d+ Y0 H8 N4 `, R) a2 {* E
: p- D* e1 I) {  E
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
& x3 x% N1 E  R' ?3 B                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% e* t0 h4 a( v3 m

- @; v! B. Q" y                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ), b* T& P2 d8 Z$ M; m& ?7 Q% u
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. O, D5 q! Z. n, c8 J5 C6 _& s2 `* Y8 o7 o+ D1 }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% e; b3 g9 C5 N3 A8 {  u4 P- j% q8 F" @- F2 A

, @; D* E% X% }% i" c% @# d7 c& ^  }

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-27 02:08 , Processed in 0.069259 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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