飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17124|回复: 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 0 Q& ]3 u8 d  C$ a( t+ p% g" s
I posted this because someone kinda posted a youtube thingy about it :O.
: d& _2 m" Y9 P5 b! M" _$ p& H
5 R0 E" H6 S0 l. X( |/ h4 h' p3 QFind this in DPSrv.cpp @ worldserver
  V$ M) ?- x: x; j1 _* z  y; z5 k& @0 d( Q3 o+ B* G4 Q. ]( f, O) o" ?
Code:
7 W) ?5 i" H, v0 \6 v( `( ~8 d, |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 J$ q( F% X% j
{. a% J! Z: y* m
        DWORD nId;
' u- r3 l- @" p; G( B+ Y, W        int nPart;
6 ]: U: {' `) g# d7 Y6 [: T/ r: {5 D, l
        ar >> nId;
/ [4 U$ R! o0 o. b        ar >> nPart;               
& b* E' ]) \/ s) }       
6 e) F9 }: y% W2 J4 ^        if( nPart >= MAX_HUMAN_PARTS )       
4 l1 }) L9 U% ~5 l                return;
" w9 O) Y0 W7 A2 ]. R9 K2 l# M& N0 m4 ^! {0 V7 B7 Q1 f* @
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
/ }! j, p. r- |) C' G' ~2 S2 }6 I2 {% L9 L

5 W9 H) o! Q4 u% A6 x: n  E7 ZCode:
- G, ^- P1 ]6 Y) ^8 U#ifdef __QUGET_SWAP_FIX
! z- W% P6 L4 |8 o6 p7 i  t
& ]# m5 W6 s: S. D1 X7 q; `! ?                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
/ q/ f* f0 w! o( o$ E7 l                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( O# c6 r( x: ^! H

$ H/ n6 j! P2 E5 {, e                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )) J; ~0 p' R1 x9 ?1 S
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );; D+ p& K/ f$ r
# k+ p( u6 f4 D8 m+ r- _3 q
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
7 F3 L& X) N6 J. ]; X. i! B                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 m' V" U+ q. Z) H) l$ f
, F& Z& k2 K2 S& y* ~% K3 z5 \#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; |  p+ E, O( m8 x9 |1 t* ]
and add under
& G, z  o) J3 n  `
9 [  }: A% [( z- q! Q# Q" [/ ]Code:  z9 E& K( F! ~* f6 x
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" J' _& Z& u  [. x                        {
, Z; y. K# e0 F. s6 D! I' 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 );& N  n+ y. t1 g  A  `, Z  t* n
                        }this
! o" M1 i9 Q& Z% {2 v- \1 }
6 X( w1 D1 I& \' a. _* `7 k% ECode:
' L: F5 {7 S  `; i9 e#ifdef __QUGET_SWAP_FIX
$ B* t' g+ |% u8 K# F  j; Q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
" {! w8 R' [, [8 k2 }                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* }( P/ H9 a/ V+ p, w, i

5 A3 N# e( C- n, x) b, @. [                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
& g# _, ?- I+ g. ~5 Q6 v, J                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& K2 K1 V! ?/ J1 L! u4 Y& o

1 ]0 p, f/ E% `3 o3 a# ~: q4 o- K                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
4 b' P! c  M$ `+ C                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 U" f: m. y" V7 `8 X/ `/ M
) a! H- k! s  x  p8 f7 g#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 H7 O, S7 v. n& g3 v
+ C  q. O9 v9 D) x3 ~; D9 K
+ w8 b0 G' O( O$ J+ x, G! C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-22 12:58 , Processed in 0.062445 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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