飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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 1 ]' T' M& E: [2 M4 ~9 p9 [5 W
I posted this because someone kinda posted a youtube thingy about it :O.
/ z' y  u. }0 x* E1 }9 l$ Q5 X/ H& j' I, r
2 c) P7 f" J8 |Find this in DPSrv.cpp @ worldserver
# I1 R3 `, U1 Y$ ?: ?4 |- p: H  Y0 q; T5 A. }& q
Code:
- q6 y( [$ \  }2 F0 N& P! V7 |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& [  V! ?4 ~! X" c. w8 ]
{
# k+ _2 g) ^$ t% }/ K0 E$ H        DWORD nId;, A( c! o& Z6 `) s+ d) ^) J
        int nPart;
/ f6 t1 x( y6 s% B7 P. X+ U
$ W2 }9 T* y% S7 Q5 M        ar >> nId;
- D9 Z' n7 d2 J7 @% X; ~        ar >> nPart;               
$ j9 J. |. e/ X# Z        8 D' P0 x% G! w( Z( Z( ]# K( j9 X
        if( nPart >= MAX_HUMAN_PARTS )       
" t9 E7 w9 c/ \# x8 w7 I                return;; R4 h9 l3 a# F7 A, _
) q% y" \( k6 @  s4 Y0 N6 Y2 D5 r4 [
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 T5 ?! s/ \7 z+ Y4 C2 L8 W
1 @1 U; S# K/ U+ g1 P' r. p6 X0 t. X- L% h" R1 S
Code:
5 B" V. N9 H4 L- ~! u3 B#ifdef __QUGET_SWAP_FIX) v* N' m" F0 O! ^/ l) M$ H

/ _$ {# l4 N" [) t7 B. m* Y                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )) l/ E3 A' n4 ~2 G7 M; I5 [5 }
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( H" K( [, Y' k1 ]0 I

+ b1 A7 t( T3 m# N, q# F2 y9 i                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ); g+ [4 }4 K% X+ {  D! q" A# K# s
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* F* S# t7 o, g6 d/ P
! x9 [3 V$ y, q" Q4 J% p" e' g                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
) e* p5 M( N1 P% ^+ W7 u5 P* T2 k                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' Q7 D8 g2 w, C& m! H2 U1 a* }. W% R7 o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* t- X0 ^  [4 z+ x& N: y% f0 d' @and add under$ M, O  ^& m: n8 u4 u( ?) N

* K/ T; R* j6 t5 ZCode:
0 g4 G/ n! Y& C6 @if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ t/ u8 [& X  P+ [/ B! t
                        {# q! \9 N4 ?% y( m
                                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 );* z3 T9 t* @6 c6 Q, V' y' M
                        }this& _$ W6 b2 F7 R- u8 F1 @# M
  O: Q' T; W4 y" C% p5 Q
Code:
; ~: k* I; n5 a; M( q  U  ?) \#ifdef __QUGET_SWAP_FIX
/ G1 Y. [3 [$ L4 s. l- y! e                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )1 R' o* P9 l! h' o! S4 c4 f
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) O! M9 Q2 m; [9 y
  i8 x" P0 J9 p% x8 O7 L3 p                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
% K) ]& {$ _7 D  p  J                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: Q6 M( ~, g% n' \! r; z
# L7 f! F" K& A/ L+ D, x( M2 n0 `" H                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
# W  r2 @; L, }/ r9 R( L                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );- r- b  P/ J. V& L$ [
7 K4 B' {! [5 `3 S2 r
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 m3 L, c) U; Q( K$ d$ A0 f3 g3 _( `0 R# B0 H6 Z
( L7 }* N" p& N; D. ~6 F2 d. q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-23 22:06 , Processed in 0.070071 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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