飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1090

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1090
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 j2 S  d8 M$ R( CI posted this because someone kinda posted a youtube thingy about it :O.
& B5 m+ ]/ Z; ^7 {: P( l% n
# }- n+ F8 Q4 @Find this in DPSrv.cpp @ worldserver
; I) r& i4 \9 X3 ?. F# K* v1 d& @0 q1 r/ O' r/ k: D3 R# d
Code:
& D# c& s( M4 ]3 [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 n  N! r& L, M( j
{) T% O: Z. R/ h5 A# i8 V
        DWORD nId;
8 m6 J- a6 ?# c( p+ g        int nPart;  ]0 i$ K& G+ B$ Z7 o
& v4 q/ I% W' `( U
        ar >> nId;
/ p4 o) H% g$ Q! J8 B0 @        ar >> nPart;                - X5 r1 N( f2 Z& |6 [& i: z1 m4 N. [
        & W1 a$ Z5 w: h8 z% {
        if( nPart >= MAX_HUMAN_PARTS )        ) \3 p4 ^: N3 M; b# L3 D, D1 {
                return;, H: _0 I6 Z2 W% w
2 N  i2 D/ a# |7 y6 \- D6 N
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it+ K2 q6 x3 a( J" l5 h
' ]8 t9 r9 y5 f2 V# i

  r9 |0 @: t) T+ B" ~, ZCode:
1 M6 H$ N! q2 W3 L0 N#ifdef __QUGET_SWAP_FIX2 k0 X( F# G/ F# @$ _0 B

9 \0 r2 }. s+ t5 J, q                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' g1 x5 ?8 f9 a5 t; p' J4 }                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
" t' e5 w( \4 H$ }0 c
0 w9 \5 o( r. e) c% C8 S+ a4 S                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- C# G6 Z8 }0 S: `+ V# X, V                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' s5 ]8 `# X- O5 A2 l0 o8 v
' [3 d6 N9 Q' |! \& p! V5 D1 X7 A# ^
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
% }! |& @- J. Z/ N                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* [* j9 J$ n$ s- N( S" y; ~% L
. }) F- l* m% ~0 w: x4 C' e/ C2 L
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ P5 q* r$ P0 N3 _9 V: Jand add under
& `6 I5 Q: N# ?( U9 K( M' F; X6 u7 h
Code:
* X5 h- {& X4 ^. r* A! C7 w0 v8 ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* i) G2 }5 e. f3 s, A: Z& Q
                        {0 e6 P; ?" P' Y- t% s3 ?/ ~
                                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 );
0 m) z' J& B2 G' |" B                        }this
; u6 o' S' i( W8 }6 c) Z3 k% B
3 Q* n; Q1 |  l6 L4 r# V' fCode:
5 y3 [/ _- v! P- I9 w. ?- L#ifdef __QUGET_SWAP_FIX( H& A9 M/ j8 h9 v8 Z8 G, U
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )% e7 f6 e1 ^' r7 u
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 X% d7 a2 c# S) b) \* D, [& L2 z/ U/ k4 d4 \4 s
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )# t0 D7 |1 k+ p7 x" i# j' r- S
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; A$ \. q" v# U
5 A7 V3 W* Z5 Q8 i" j                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )8 p, I9 V' Z2 s+ m" n) ~# Z! B
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 a6 h6 g. n) S& W8 u) t& ~, z, i2 J8 u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver   B: p4 T+ Z8 [* B& G
& k" K3 g% Q0 a

6 N5 ^  M6 w5 f

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-28 04:58 , Processed in 0.115346 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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