飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16217|回复: 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
: j$ c* _- h1 T$ _# r: II posted this because someone kinda posted a youtube thingy about it :O.
- ~. s" q$ u3 b- ]2 ~
$ [! s: W% U! p# ]' }Find this in DPSrv.cpp @ worldserver! d3 W' |  g0 Q% r4 b

4 f! M' X+ R2 U( mCode:- J: H8 k2 S" L8 w2 W( j
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 I4 r+ p9 [; F{
2 p8 w" g+ y/ U% o  U6 E: u& i9 ~. D        DWORD nId;
  C5 y) H5 J- f2 w' S        int nPart;2 |; m3 k, e3 D

& L% o# w" Y/ K$ y        ar >> nId;
5 Y; ?' ^3 K( t; }        ar >> nPart;                , G5 _8 m4 d/ B7 f0 C' C6 ~4 Q+ I
        & P; t: O  y' _& ?
        if( nPart >= MAX_HUMAN_PARTS )       
2 F* |, Y- P$ Z! C                return;
+ U' `( {0 {' l: C8 G* w' T
) n" G% r. K5 W+ x; T6 ]4 S; J0 x0 q        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" k9 q4 ]8 n; z) S4 o& f. a! h% m( b9 }- p
) z. }( |, C2 n  |: y
Code:
+ V5 ^) A, Z7 X#ifdef __QUGET_SWAP_FIX
4 u7 S6 L# M7 Q4 S5 ~0 b
: ~* d4 r) U6 T/ i                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )$ k, k* G% I% u- }4 k  s6 R
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());1 L6 E+ A! F/ t7 V7 ?% c

6 X! g: C9 L: I3 p                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )4 B! {$ O: w( _7 L9 R( h- n) a7 A
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. t2 S: t/ G* N! Y1 `  A1 m" w& J( w4 p+ @
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )) `9 p* s6 ?/ n5 ~4 d- ~
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ i4 f$ @) b4 u- j
  J# E* q% D- H9 R# o. y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' L# F/ P* d6 _1 e" Y8 A: G" ^and add under* y6 v8 t9 D* @* Y; }2 |

( c$ h! f* f+ M& q5 H* vCode:4 p: c$ q' o4 d$ |7 t# G# w6 S
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ ]; c! x% S6 [3 i                        {! L" r" ?4 }9 B  q9 G- F3 N
                                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 );
3 C. r( m; ^5 F$ @- c: B: D                        }this
! F' t4 m; M+ \9 r8 F0 C5 ?3 c, b+ U2 e8 i% m7 y4 |
Code:0 c- G% J% g- \+ ?
#ifdef __QUGET_SWAP_FIX1 |  V) h$ E7 ]) I( V  d
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
8 E" y  Y7 @. z; g+ E5 n0 i                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 d' b0 l) J' ~/ ^
1 h- w$ U' ?3 ]' v                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# {8 x6 W" W/ h8 S2 r                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" d& U; _8 I6 [# D# G! ^% M( O9 \! c0 j; E
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% v7 D& e; c, v7 g7 X
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; k" m3 J$ q; h

; Z3 h- \5 R+ b0 R: p, r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- E, M" G6 I0 C3 Q" o4 o% P3 |- x8 D3 x* o

$ u# w/ ~, d; y' E

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-26 16:29 , Processed in 0.063899 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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