飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1092

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1092
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 & G$ P7 w. ]) C# H* d7 X
I posted this because someone kinda posted a youtube thingy about it :O.) ?  u- i! a* ?$ [+ u
# v9 {1 K* @( y/ n. w0 y% ^
Find this in DPSrv.cpp @ worldserver. s& P' n0 \0 _8 `

# `- r" \8 m" G* ^( j# @1 u5 NCode:2 Q( w5 N9 j7 s5 p4 P3 Y4 C
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, u# n2 p) W- h# I' Z{
: y) }$ L' u8 I8 J' w. ~        DWORD nId;$ x1 Q1 a+ Y' d3 Y3 ?
        int nPart;/ {+ K1 E& i; V' o( ~; ^
$ t+ ?, \3 ?: M+ N' ?5 t
        ar >> nId;
8 N8 k! c1 K3 j6 |6 o4 L; o/ a: I        ar >> nPart;               
6 p9 G% U/ w+ }, i. X- r1 Z) ^        1 r4 k( C2 k$ f8 h, w) y! f
        if( nPart >= MAX_HUMAN_PARTS )        ' K5 C0 S. L( I) }2 p" a, m4 I
                return;! G) m& Z2 C0 v5 p( Z

( `0 s0 W) [& n- C1 r* }* r        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ q! r* l& u8 Z( m) O" L8 V

5 S+ j# j; E( J+ K2 k  z$ o# y( _
Code:9 g6 g* f1 H$ ?8 L1 t
#ifdef __QUGET_SWAP_FIX6 t( M$ ^' u8 v3 b# E0 M9 _

8 o9 `) @, V4 D) v5 b                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) u9 v; \" k$ d- n                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());" c' X4 Y: B2 u
0 V! u" l* h9 d0 s! {  v  j  o% U8 b
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
# K( a2 n6 q( B" G                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );  K; R4 Z1 {/ E0 N3 y

, l' T% L3 e% p/ q5 _                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
& s% g4 d# V4 s  q) O' k                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
! ~! `6 m( w) l/ K
8 H7 ?2 N" T* ]' Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 s9 q/ N0 V! c5 [* l4 ~and add under  \1 R7 _* y5 D. k

6 _9 g, p" r  ^& K3 j4 bCode:0 Q$ ^7 i0 Y! O5 [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% h# L/ R& u6 @
                        {, x9 c$ u% U7 Y4 v7 D' ~( ~/ A
                                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 |+ B; Y/ T( L7 I- i
                        }this
( w- h- b% k4 w; F9 }5 |5 u% I; f' ~+ V6 V2 B
Code:. A) ]1 @9 b( [
#ifdef __QUGET_SWAP_FIX
" ~0 ?) E, N" h( l9 e                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
% J( N8 Q$ H. ^1 R" z. u                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ k* X- N: {- J' c% m; l. U2 O2 X4 f! @$ V6 U7 u
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )4 c  J9 s5 Q+ H6 O/ i( z
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ U3 u1 h( \: P5 y* u+ X/ B" P, F4 W5 |6 I
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )7 H( e, R4 U  t$ j
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ Z" d, c: L. I
& y6 l( l, Z. G#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 l# n, l1 X- p- v
& ]; W6 b4 u# Q5 u; }2 Z. H
: e3 M0 C8 `+ Y1 g0 D% |! u" B2 C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-29 18:22 , Processed in 0.060542 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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