飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16765|回复: 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
( b% ~8 G0 L( n( E  S' v( zI posted this because someone kinda posted a youtube thingy about it :O.' r* Z' F8 R, c( W. J
7 p9 |0 d( f+ `
Find this in DPSrv.cpp @ worldserver8 S5 }" V8 f% E
. ?3 Z3 ^7 j$ L0 q6 v$ R, U
Code:
* |7 E) P) D/ w# r+ y9 cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' C# q+ Z, S  h{+ h! P' ?, q9 S0 G( I
        DWORD nId;
( `; f* Q* S4 K9 H8 ^  [( c+ |        int nPart;$ G! N/ W6 R3 {6 D% p

/ k  d1 _+ o0 Q& C' k        ar >> nId;0 G- O" W# y* ^- |/ T& Z7 c
        ar >> nPart;               
+ L$ @: }5 p5 H! A: O; x9 \        # U* f( e# f" F/ _* w
        if( nPart >= MAX_HUMAN_PARTS )       
/ q: b. y2 q% d9 `2 s; B                return;5 d2 Y0 q5 M; k% n
0 ^5 \+ U& q) R. t2 M6 ^% U/ i
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& S2 A' L5 ?+ ]( `+ i
; n' h* n. B, {& I6 D, Y8 Z$ l6 w$ R% A. ~$ b, H  I
Code:
9 S( c) W2 C3 `. O, }#ifdef __QUGET_SWAP_FIX
, k: W2 U$ I4 I) y+ r
+ ~8 P# k. X/ K2 z                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
" @3 W1 j( e' v) p  x! n4 |' ]                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());% Q  i9 j& a1 S3 I5 ^- z

6 m) b1 n8 X& g. ~& b7 V' o                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )9 N- V/ D1 i6 o1 X
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' h! G  X3 \4 E. m2 m
- g6 x3 g; Q* c) @
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )4 X* T/ f7 ]0 H2 w* \
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 D, u$ T5 D6 l: |6 R0 h3 X8 i$ A

% g8 ?8 f) N. [6 I#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% H  R% E" V  ], qand add under
1 ~! z0 t- h# q: p9 U# f& D- c: N6 L, ~; c: M9 X
Code:
; x- J6 r! B4 O# u- |; L) lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 j/ O+ Y5 i1 m' a4 m
                        {
4 h( o+ t4 S. y' L0 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 );
9 P0 C3 u- r; b" `6 r1 C  `                        }this
8 q5 S8 P" m7 d  V7 U! K6 |2 W1 o" ^; D3 f2 s
Code:
5 F) i2 _4 K6 v  O9 E4 j#ifdef __QUGET_SWAP_FIX! g) m- t5 O  C+ N) z
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
$ Z* O; A/ o2 l0 e0 f8 ?                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());9 k1 O# Y* G6 {4 n* x) G

- B" W. m2 c/ n' ?2 r  |! S                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
! T% |# y* O' l                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! F2 {; k$ k* G' ^: S& J1 t
1 L6 F, C4 Z7 I+ F" j- {
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )! N; x4 R' a+ {
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
  p3 P8 b! \5 s1 e  v: J6 G; Y. ^3 t" |' N  z0 \- q! q4 M  ?
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " S3 u+ p$ I+ g& G' N: S. R

2 a  B' |2 \2 r' m# t
( y7 w, S% H/ n+ A( U; C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-29 09:44 , Processed in 0.077393 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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