飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16825|回复: 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 + b3 ?  W" f7 O: S, \" f( R
I posted this because someone kinda posted a youtube thingy about it :O.( M/ ~" g9 h( X% I  N- t0 H
* W2 n: L& Y* m* P9 b
Find this in DPSrv.cpp @ worldserver8 t* u+ ?! O: X3 H* }: z

: h3 R; @/ `; G: [8 v% wCode:0 }' C+ T* U# Z' E. Y$ K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) a+ ^- r) T+ p' w7 h  b
{
) \, H* R. S% Y$ u" X5 ~0 d        DWORD nId;
. D0 x  L1 ]* E, Q8 U# }        int nPart;
9 l7 F5 [6 D' @1 B  K& s3 J+ M" B) g9 q8 [
        ar >> nId;  O( |7 o$ a2 G6 k' ]) e3 E
        ar >> nPart;                + _3 P9 |" l6 V7 u
        5 S, |+ F& |8 t8 A9 r2 `. d& q
        if( nPart >= MAX_HUMAN_PARTS )       
2 L1 F3 j) a2 {& ^/ y  E2 a3 b                return;
9 t2 `4 ^  o, H, A( H  E, i" K3 c
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: ^1 S' y* ~. q
4 x; o' |6 \7 a( n  h) b* l6 E2 N' x: U* d
Code:0 C3 W, f" E! |( k& e2 I8 b  b
#ifdef __QUGET_SWAP_FIX  Q3 o4 `' y0 k3 g
8 f& j: e" _+ S% H8 T# u
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )" Q# ~1 w/ H0 f# M
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! N% ^, ^3 S/ D; `

8 l) C" w0 O9 A7 r                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
) v1 W  a# a0 o- ?# _: I4 S* ]                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 Q: B- P# z1 X  G, Y
# t7 ^; j9 d* Q" S$ H) r6 y
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )* ?1 N4 [, N$ C# ?& L" ]1 Q( e
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) e* {: B3 {' d+ o
' w9 u( _7 C1 |  V$ e) T6 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" b) [/ Z0 M% r. land add under) F! a6 ]: K* F9 j( y$ t" o5 \+ y
- L, z" o0 o6 h$ w+ c* X. \) t
Code:
& Z% a( q1 Y  m  U: T' @1 K3 Q' eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 D& J; s# W3 F) I% J                        {
' m, H5 V  _- H! b: `                                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 );0 X4 E" `4 b4 H  y
                        }this/ |* U0 E# P9 R+ t
" N  h" V' `, O. q3 ~
Code:
; r7 q; E) S0 r* V( E: C#ifdef __QUGET_SWAP_FIX5 [4 b8 B  Q& F- K; l
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
9 H2 v  y+ q# |                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 j5 u# X( S( \9 P+ J. b* T- \1 W6 O" C2 c
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
4 W0 A0 N/ L9 T                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
0 J  |) W: H) D, i) n0 B
3 |1 ~4 M; b# B! m& i$ P% z                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )3 _) r/ p4 I3 v$ P! z
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ q( J# ~# n+ O$ S
3 G. G9 |# J8 A( L- e2 l/ w
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : j2 _* n. r6 z- }4 F
4 s  b. H" y& D- Q. e
. V. i, {( j% w

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-3 03:38 , Processed in 0.074928 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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