飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17051|回复: 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 , j6 w# A7 z( c; ?2 O; N' `
I posted this because someone kinda posted a youtube thingy about it :O.
$ c0 R( C1 O  N6 w8 D  k
# F" h4 j9 p* Y. Q' S) DFind this in DPSrv.cpp @ worldserver
# j6 C& x7 C) l* B6 F5 H4 c* ~" U
+ f5 ]  ?: a7 \* j% U" gCode:6 \4 `5 r5 s7 n. Q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 W" B8 |5 O" Z- J0 t. d0 o$ o{: U8 C+ o7 R$ P: e3 V0 o' I
        DWORD nId;- r9 _8 L* B* w: Z3 p
        int nPart;
) x8 p5 A# m8 b" |& M
  c, ?; S. V# u2 V/ K/ o  b! K! h        ar >> nId;
' ~5 K: y9 j2 V% D        ar >> nPart;               
. N/ ~. g( z5 V5 h6 Z! c, D        3 N. r1 h% ]- R9 g+ g6 [0 H$ y
        if( nPart >= MAX_HUMAN_PARTS )        4 n, x" X( ]6 f8 a. N8 W+ Y
                return;
6 Q1 }# o, [2 \& P/ |
6 f7 E( ^0 p8 Z8 H6 D/ A1 y/ a# j        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% \6 S' N3 `8 x7 C. {/ o  O5 {9 b* j  H6 H1 i( ], u1 f  t0 D

% n- ?* R1 T2 Q. v- gCode:% [2 f: D4 M' {/ Q9 t# u: g! D
#ifdef __QUGET_SWAP_FIX' P" T/ K( Q) x- z+ m4 ~: L

" e# g4 N& `- ?7 ^* G                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
. A) w% c; ?6 D4 D( J" P                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());9 b! g: L3 m: ^
3 ~: a# G) a" D6 Q9 X
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
) l8 @3 e- k& x9 ]7 ]                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );, u! ~0 }1 b8 M9 ]$ ]) L
* O+ z. K( _- a, r6 e9 J
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )7 U! F  c7 @9 z  A1 |* P  ?
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( a: o# w7 A0 R
! d) Z3 f5 r* y; G# b#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 Z2 D( i- {0 B* ~' V! c/ Mand add under3 B/ n5 m* o. x5 Z( T

5 K+ m  @  _9 H' P/ y2 ^  NCode:
, [# q) N7 X) W. W* T# mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% O+ ~8 g# B) [$ o. ]
                        {6 A8 n( E; u, I0 |3 P0 s" f
                                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 );
% r" C# ?: H$ t4 @# e                        }this" P" U: s1 B+ J, c9 q: J

8 X+ `3 S. S3 y7 Z3 V: qCode:
& F' k1 V! N& L7 Z1 ~' l1 K, G8 B#ifdef __QUGET_SWAP_FIX. t8 h( M- g9 \
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ); l, Q$ K, d% W+ Z8 `% q
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" `/ o" }! j" C( v$ G. Y# k! n
5 W) X& z' \1 Q                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# o, }  E3 c, }: o& ?3 [1 D4 p                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: r3 S* d' ?2 l8 Z5 ^; J; K$ x
7 u- w1 a3 X3 u' S* w' {& d
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
; k1 c9 q4 X) ?; T, G                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& O! Z5 t# m. \' {' S+ Z" X
5 O; _2 [! g5 |
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ( S8 i5 F$ v9 J. x) u& x+ z1 J5 k/ E

& Y. b) u% Z/ m7 g) k9 V  u; P/ S5 e; {( ^0 x; O5 w# _  P

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-19 17:56 , Processed in 0.059461 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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