飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16776|回复: 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 " T4 X$ F& Q  Y) C- _/ _& T
I posted this because someone kinda posted a youtube thingy about it :O.2 V$ V: m! M: j  U) I$ q

; i" R+ u9 U+ I# O$ I, n( o. {Find this in DPSrv.cpp @ worldserver2 ~% \0 d* }/ N
) ?+ e- b: B1 a) u) f( \/ @# x
Code:
3 H( X3 f0 d8 h+ K5 ]9 k( Ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- @" k- C2 s/ C, K  M{, W( d7 W8 ?) H, Z; N2 y( ^/ a  }6 M
        DWORD nId;
3 [! s+ O% \7 f        int nPart;# _3 ~' T% Z1 C) i

5 b" ~* q9 B9 W        ar >> nId;
2 B+ ]' y# b0 I8 Y  Z: ?( H) y        ar >> nPart;               
" [! k+ {1 k8 _( C( @' ~* O       
3 b" [* R; z( |  v( G        if( nPart >= MAX_HUMAN_PARTS )        1 }$ A# o2 {; W& K3 F) L
                return;4 }5 p4 L9 {$ G" v& N: j
* [* }1 s% A( R3 Z
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ Q) c' [* e; n# f2 ?; G3 x
) y% R( Q0 M' L
. O9 y" f+ E9 {7 F4 m
Code:0 i$ A9 `' B6 X$ x# q/ `+ @
#ifdef __QUGET_SWAP_FIX" q5 V( S5 f  }+ S

- `' H/ L: h% {0 n) g0 J5 \                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )1 P$ ]+ w3 t* ~' N
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
# B0 h! x9 {! U. A: m3 ~  s# \
, \. ]: a# d; P7 D                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- W9 Z, b3 `% z) `$ j/ \- u. y
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );% X" J/ H6 y& a7 |
2 p1 M% J6 p' D
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 ~& y- a8 F% P$ b" W
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );, v$ b4 T2 a1 F) ~' h' Z, z2 I" i

7 G& \0 _+ n% q* t#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 x8 D& I* V! S/ j: F
and add under8 H/ T- {) c' ^/ L
. D1 b* z! y0 Z8 n* T
Code:
9 G7 y3 n& ^+ I) D3 P& E. U! Tif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, X6 c( U. G6 X/ x                        {
: ?; |( h+ \8 D- x: t" 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 );5 B$ c" O' M0 `( H$ ]2 w1 l
                        }this2 b! ]5 F  _  s( m

) }* L9 |( w' {+ o, ACode:
8 j. S, e! X8 D' F( X#ifdef __QUGET_SWAP_FIX
, S. M! ]( A! N6 |2 P/ k! U* A+ _                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ). u) K/ F, H6 k$ t6 w
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* U8 A( }9 _# q  P' ]* E

5 C5 d. m6 s4 o# B) k                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; U) b2 B" d8 K6 {* u$ K) [( E                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 k( i! `" ~8 e7 g

" C# l5 H- n5 E" }0 a9 @) J                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
5 ~$ M# x  _( r                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 i+ O% h6 Y; N
& i6 D3 U7 L' V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 i$ d3 ]5 I7 S# F( Y
! `0 u- r" G3 r' X# n9 u# _
. ~9 O  n  P/ t. H( I

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-30 10:13 , Processed in 0.068170 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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