飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16836|回复: 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
- _/ n& v( N* n- R* XI posted this because someone kinda posted a youtube thingy about it :O.
# [1 i$ u6 ~8 J: x  L) V4 R
) z' }: E4 q  Q% _/ \) PFind this in DPSrv.cpp @ worldserver
2 V+ n1 m6 C& s5 g+ [3 X0 M% L- Z4 G$ N7 _' Q
Code:2 S9 U1 b. ]7 o0 [  W/ `
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* P2 u- V0 |1 R# k% t+ \
{
8 P% f4 n  _# {5 u! e        DWORD nId;7 p8 p% \& _* ]- F
        int nPart;( e( y. \5 ^( f, X' a

% S, v1 _& B4 e0 L        ar >> nId;
5 b, @7 R5 [2 R# ?4 q. r( L        ar >> nPart;               
6 e1 `( i: P8 N' X6 h        ! Q6 o1 w5 M# R+ W. B. z/ P
        if( nPart >= MAX_HUMAN_PARTS )       
6 K) w. n. L3 S: T+ n% C! N                return;
: p; w6 V9 v. _
- n: b: H2 w1 x3 A" F$ z+ e        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: |" `; O: W6 ]; |+ Y# ~4 h7 P

1 o& y" E, s2 D4 k. [+ C$ y! J2 L. B! O6 f0 X  t# ?9 n# A
Code:! J+ ?% _% v1 S% J$ M; {& v6 P( i) m
#ifdef __QUGET_SWAP_FIX+ c3 f6 t4 ^  |
% U( q; O5 m. m0 K/ y
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 k# J) g) }/ r" h                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 `: z* G5 C# G! z6 L' X- i, Q; A
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )  J% a7 [5 s( m, n7 R# K, _: E' V
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, `+ f0 V! ]+ G( K2 G( U# q: K& E4 I8 t' F  d& y+ e7 {9 |$ ^/ `8 q6 x
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
% Y9 v0 Z8 c; v3 a* E                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 B" B$ \: C% T2 J
& B. e/ r" g" E9 K; k4 c#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 B8 y6 \; ]% X" r: d. o) Y
and add under5 u$ G$ B* D% g4 W8 ^6 ~9 L
8 [: ~& t. F1 H  a) M6 s/ }: U
Code:5 {3 u( C! z/ x. p; P: r! w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! x% z  H# w4 _8 x. x2 S* E; e                        {. |1 c$ @8 h+ d* 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 );# f5 J% T/ f8 q4 c' C2 t; e9 o
                        }this
" P( N- q3 ~  t/ V( P, M1 z! Y6 P# E  ^4 A3 {7 F
Code:+ T% s* x2 {2 s* @4 O$ g% a) x3 k6 z
#ifdef __QUGET_SWAP_FIX
  O7 @. @- d! Q6 G* z4 J* I4 X' |+ H                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
) S! t% Y: {( B, Q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 p* `2 D6 @+ X* g: E% P$ F: t

+ K  Z! i# r1 y, z0 d1 y5 q                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
8 g& x  v) x& V- L" f$ C                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ X$ _! ~( W! ]; @
; F" F. b# [+ [* B7 B: K                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
* Y; J7 @$ J2 u9 M7 n9 h+ `8 [                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 r* A3 h7 A# \4 `" V
# V; ^% F# L% J$ g" P#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver - E3 \/ U9 O" o- E

8 T  x6 J! U5 n3 Q0 s) g# T  T( j2 B

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-5 00:39 , Processed in 0.083462 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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