飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16866|回复: 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 6 B9 k' J; U8 z- {% ~6 V# F! W, j6 I
I posted this because someone kinda posted a youtube thingy about it :O.
: {6 g' m1 B6 i: ^! p- G2 D
5 A) c3 k* W, C; q0 _Find this in DPSrv.cpp @ worldserver
- a2 Q8 Q* b8 [: e/ A7 L" u0 u5 \# b0 r8 Z1 o
Code:
+ G: C: m& A: u% Jvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# p: _5 D* f7 S2 n- }0 f3 ?. \
{
1 J# U: y2 {, J! Y6 v        DWORD nId;/ z1 W" ?) N: h) H
        int nPart;' @3 g% M& [4 g, B# M

  r3 Z- m/ K4 f( }5 m/ ]$ h        ar >> nId;7 q$ e( g4 `- V; E5 v9 h! a
        ar >> nPart;                # j, {+ x6 k1 I
        + U4 F8 N! \8 r! h3 m
        if( nPart >= MAX_HUMAN_PARTS )       
' U; N; P+ \* q                return;( e; D5 t  y0 r* A( z

5 K9 x1 w0 n; ?  ~, f4 O        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! D/ D5 J2 t0 O6 _. k
7 b. B$ x9 u( ]
4 K6 b8 a. P7 W1 H0 i; Z% \Code:; J) H# c1 j3 ~5 `( N- J
#ifdef __QUGET_SWAP_FIX" {, Y) f  q$ V8 X$ \2 \  Q3 Y

; t0 b4 k5 J5 s( c- f                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )5 R/ e0 j9 l# S
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% }; {4 t; b- ^4 I3 b/ f+ y- a: c1 o4 X- `2 [
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, Y* |! z' X. m6 T7 Y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );. |$ A$ L, L" k. H- m; W+ t9 ?

8 [2 q" d3 n' ]. Q4 q4 E* J                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
0 p- k  M8 \  ^6 B+ }( N, R                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& t6 |8 _4 M& p9 K
- m5 r4 g7 s1 [& k1 H#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; `) V: e1 J' r5 e" u( F
and add under: n$ T) t  d: ]4 I- _; x
+ P' E' J  Y- N" k% ^0 i  w
Code:
0 }+ G3 n) G! ]/ tif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ B4 \$ W) o  p( h" W$ ]; G* d                        {* E  m6 i; N# }5 h* P
                                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 );* y# f4 M7 h7 x" X( D- u# ?8 L
                        }this
, @0 O+ }, x$ p5 s7 q2 L' D8 G, J8 l9 Y
Code:
! b* R3 l- `7 n5 w9 Y/ _#ifdef __QUGET_SWAP_FIX
) s9 T9 w  }# F& D9 }) s4 n                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )4 W6 D1 x& L) I5 ~. \
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 _9 @) a1 `! g! d0 n2 L- z% x  V! }0 [1 z+ p
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( H. X3 n/ a+ B3 M
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
5 \' @  a; G, E; U& P; X& _& a, u2 I/ D' V9 c7 F3 }; {  ?7 j% n
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
' `# v/ C/ P8 k2 t                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
" [* Z6 F8 h" `: ~% ]& |1 t; v5 ~/ r8 o; Q8 _5 m8 C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * Y  v/ [" P, f" B8 T2 a+ e

$ q0 t* K! @5 O, b; t5 {3 [% l: z2 U' ^0 ^; P& L- z4 s

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-9 18:23 , Processed in 0.067281 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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