飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17407|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1094

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1094
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
' W$ Y- c4 B; W3 i, D1 |I posted this because someone kinda posted a youtube thingy about it :O.8 d3 r, s3 M. X; W/ W$ h
/ N4 k* B1 m2 e1 [% Q4 q  X
Find this in DPSrv.cpp @ worldserver7 {' n& s! j. v
2 p3 t0 y( j( C
Code:) I$ L  j. V0 }, z/ c) f# c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 Q$ t( P' F' h{
7 B3 Y6 {5 d1 @+ P5 N; S' r        DWORD nId;/ P) y) W2 P9 |+ {  B
        int nPart;2 B6 b( `, D4 O5 `: p- K

) ?; x+ V$ w' Q0 c7 ~8 a        ar >> nId;0 V/ q; r& X/ r& v
        ar >> nPart;               
) B/ I1 t: ~4 G4 W% V5 |) u, X       
. P8 Z8 U# z- H. V! d        if( nPart >= MAX_HUMAN_PARTS )        ( w1 x, I0 M% Z7 r! z* t
                return;
) O2 A4 y" @- I- s  A: n+ i
1 f7 O  `2 c( i- K( g        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' f9 S1 C* P: i9 L
9 s5 ~0 H. _; k& y  C
9 w/ `4 \0 V! e! D( f3 x3 qCode:
0 ?( `# m) ]- T. T" ?$ v+ L) k#ifdef __QUGET_SWAP_FIX( l  F5 p7 G7 c7 R  ?

# R/ T9 @/ v# j2 s                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
* u3 H, H  _4 O                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 V9 e9 R2 F5 A; s0 p1 a8 G4 b) }7 m& t" |3 f' X
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )( w6 m5 g" `0 l
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ A- K8 q' S4 d4 Y- t

- L4 K/ m3 O# U* b1 h) ^4 \, k! e* u                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
7 P: \# i' o6 H" [, N                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ p2 a" p3 g! x0 r1 i4 ?4 \

+ H( \, Y/ s+ @+ q" ?#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ a0 _3 \4 S( x3 J$ Sand add under
4 B. N! Y6 \: B# E0 R7 c) f
1 I% `5 |7 k! p# u& VCode:8 n' p  \  A& q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 K3 n' B" y* B/ b
                        {! e8 W! ~! o: h) y4 @) }
                                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 );8 ~+ M4 C" n) V
                        }this
7 C5 l2 ~! R! M7 `( O5 t4 a: m: X: ?0 d( U! c/ [: K
Code:
$ E5 k+ _) |# e- [/ J5 e#ifdef __QUGET_SWAP_FIX2 l; y2 ~7 z: g+ z
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
1 T$ h4 g; V9 N/ q+ t                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# I4 r! k; u) @2 B5 ^

! ?/ @" C2 S2 |: {- ]( p                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" E2 P) e& _6 v. S* i4 b                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 _/ L! j9 F1 w/ U
3 u" R7 I- `! T8 D$ o7 p1 j3 Y
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 P) t& b  O1 c/ P$ a' l) r
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );  N. L# s2 j& o: `# B8 W0 Z0 X; I4 p. X

/ U2 H" z2 m* u) w, ?+ o: S#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: @, B. w; A7 F+ P0 \1 o% p+ T$ u7 S

0 m, y3 f$ s5 P

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-31 19:15 , Processed in 0.065560 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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