飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17084|回复: 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
0 {" L1 A* ]9 V: p6 V, A$ `" \I posted this because someone kinda posted a youtube thingy about it :O.4 J/ d; U; e& a  v- F0 s, k
1 R& c- W9 U( d3 V* B- y( t
Find this in DPSrv.cpp @ worldserver
3 z" L) F3 f) x8 i6 X- v& @2 E* V. ]# v$ K3 k2 D" ]# N
Code:2 \4 M0 |  f: K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 T% G6 f8 K7 A5 d0 ]{0 c/ I6 `/ V( K4 Q2 w
        DWORD nId;; j# k5 K  e+ U3 q" g
        int nPart;
9 b6 S" A. `3 J2 U/ w3 ]' _7 s5 M( F2 a: L% S3 b8 U# U7 L
        ar >> nId;( v1 D2 @- [$ I4 v
        ar >> nPart;               
" Z6 b( g) b7 H9 i% t* m       
' l/ C. [2 q8 Z/ Y; d        if( nPart >= MAX_HUMAN_PARTS )       
; Z( X5 @8 j8 l                return;
+ a4 ^6 L/ ~+ M4 A
5 ?3 ?; B( B0 k' x, W        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 Y8 A1 }7 J2 w7 h
( r, `$ Z: o" Q3 {. I  I+ o3 S. P

$ m; t0 K8 g7 b2 ]Code:! `1 S8 B6 t7 t* ?% D7 R# s
#ifdef __QUGET_SWAP_FIX
1 h- V$ g+ X& ]$ h: `% ^0 e8 o9 m  w0 b
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
& A1 S$ R+ m6 z' p                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 U; y! K6 ]* h* \) V( ?3 E1 e* }& s! @& B5 r
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ): y4 z  l6 u, o7 Y$ b1 q
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 l( _/ u0 Y6 @( T8 y
+ X* O2 K, f# w
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )5 m2 c9 f' I/ X. G1 Y
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' `( Y7 g6 ^: F" ^+ Y6 ?& D
3 A! {; x8 Z  t* T" d) l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! P0 V% S; d7 M$ K: n0 w. h' g
and add under
& X. A; [' r. D0 @# q( q" k1 @, j& H. P+ D
Code:
' e  @2 V+ V- S$ rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
% s4 q6 h7 n. @$ _                        {
& Z+ d( ^5 z! y; V. k                                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 );- W" d7 w7 q1 s, p) k$ `2 f9 ^+ I
                        }this
  q  V' _# c+ K5 j% y/ o0 Y
. b# p* r8 }2 U0 K7 a+ jCode:
3 \1 v% {7 V) Z) q! i+ M#ifdef __QUGET_SWAP_FIX
# b5 b/ w; L: U                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 ^" a. r2 R; t. o& U2 e7 U
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. A) H5 U/ [; [# f! {0 y" B: j6 _& A* @: X$ W, z% c+ {2 w$ i5 L
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )) j: E$ G5 x( j; k
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- X$ J' {/ ~. x) r. W( r1 H1 t* y
( Z. t) W( e% m$ U6 V+ t                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- ?2 L0 S5 N" }) j4 l3 n
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- _& M: }# |) j9 B( l' O9 k8 o  E
1 h3 S! c8 k; ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ v4 n9 \$ _2 H2 B$ I9 F
2 v; {* `0 W  q3 O! Y& c
8 ]0 `% h8 M( ~8 G* n

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-21 04:12 , Processed in 0.062068 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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