飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16778|回复: 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
6 g& N& w. z/ K8 X* W9 ^I posted this because someone kinda posted a youtube thingy about it :O.% E( G0 d0 X- J
5 e/ w7 h9 u" ~9 y
Find this in DPSrv.cpp @ worldserver
/ h1 c( l5 P% V, x, e! N9 I2 v4 \2 _; O
Code:! M' @% D( b' [- q8 x2 Y4 F
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 s" x; s) D2 t% X# `: y, l. P
{
8 C% u- K4 A6 v. s8 x6 @        DWORD nId;
# k: F+ R& U& }; N) z; I        int nPart;
0 d4 R: _% B/ s, r: p2 q
. _2 N4 \5 H: X: j/ v8 B0 P        ar >> nId;
1 \# J- `9 [; E  u; U2 K! F        ar >> nPart;               
! P1 T3 d' U$ f4 ?% B: K  K        : x- S5 b: B* a' H2 ]- S$ l! m/ \
        if( nPart >= MAX_HUMAN_PARTS )       
/ {: g) O5 j5 X6 ]+ O                return;. p+ G0 [+ s) M3 H2 Y  B/ x

2 L1 M  g/ t! O. D, l        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 l% Q$ C2 [& G% z
0 q1 O5 s$ [( y9 f! m

4 y% g6 q2 }1 e& c- dCode:
. |! `# p- F& i6 }1 ?2 w3 S#ifdef __QUGET_SWAP_FIX
9 p" i5 H+ ^: z# E( W5 z" ^: _5 G3 L6 [- [
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
- G  W3 v) _3 \9 {- O: x  g& n3 c                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
: v/ t% O! z/ E$ V( n6 J% w! M' v5 `
) R" @8 g, f: f" U% R                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
! Y! A' S6 x/ v: H; b                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );& y( |2 D9 e1 N% o9 d& H+ f3 T, A8 Q
# w# D5 ~+ ?1 w+ ~8 M
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )2 O% A+ \1 F4 C/ V
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 W( m5 M; D# H3 C

7 ~8 D6 a. y9 _4 h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; ]# l3 L4 \" v
and add under
/ H6 R0 O5 l4 I6 E4 D/ f3 N; ~5 v1 J0 h+ O+ D3 l' O& J
Code:( k8 [8 \3 a# @/ d( p+ L6 ]
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% ?% K( J" U5 _$ D# U& H  B& z" A& I
                        {7 f& y% Y: T9 I1 p' S) 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 );* |- y/ d" [- o0 H3 h
                        }this
/ c: Y( K6 j% `' M' f
% C1 k3 @1 H( s9 z+ I: m2 U& CCode:0 w' l& e( \8 T( _. {8 h
#ifdef __QUGET_SWAP_FIX" W! T4 g; @/ K1 l4 j
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )  C; b0 c( E3 p4 _$ F
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. P8 R" i5 A' o4 Y  J5 ~' q
  W0 B# K/ S4 u% W; `# R& B: U                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# ]/ [# `7 J7 M- a3 R3 j                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( m' O: w  n7 K, b8 }" O

. e. u- f0 w; p! L) x                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
- _+ f/ c& l* \8 H0 R$ T1 X; E                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 ]: L- j# i. A$ Z. w+ r
- C& a" e4 X2 o3 X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' W, W( _6 P- c& C, |9 Z

$ ]5 C+ `7 e: h) k9 c8 h0 f% L8 a9 ]* [/ b, G# B

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-30 11:38 , Processed in 0.069265 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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