飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16740|回复: 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 5 ]7 i: e" {% l! ]0 F
I posted this because someone kinda posted a youtube thingy about it :O.
) A) V# A- z8 L
; r; T2 p; w6 D6 ~! nFind this in DPSrv.cpp @ worldserver. K/ p2 H, X: w& ^0 ~+ E) Y  X
: I! G, k+ F* p" U- W# P& @
Code:
, k/ M9 ~' {$ U% D, ^* n4 Fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& }( m2 w3 C9 H+ |" R$ p{
' X! u/ v# R2 w. C9 O7 q        DWORD nId;
) q$ \: w; U5 |$ g' W! X        int nPart;5 x0 `% d5 f, a5 t8 d, ]4 Q

5 ]. ~# |9 u. X* M; d/ Z        ar >> nId;
+ K7 S0 t! \4 L% `! x2 w        ar >> nPart;                ! V7 n, A9 K% T
       
& a1 A+ ~& f" l4 ^2 T. G        if( nPart >= MAX_HUMAN_PARTS )        8 v* Y. U6 J, U. }  E
                return;
/ h  `/ e1 [. P- [7 ?. ]
6 ^) f$ S) y, y2 D3 B+ F& Y        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 O' H# ~; I1 d+ z& O0 S% t

( M  T/ Z) @) H$ ~% u) m; u( |1 r9 e
Code:
6 j% q  |6 ]# L#ifdef __QUGET_SWAP_FIX% v; y  _3 U+ p1 V

2 L) r2 K" |* x" ^; }+ T1 H) d6 ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ): U- D( e2 s' t: x( O4 Z7 S
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());2 G' ^2 h/ r$ }* r# {

/ w* s! h: A: W* e9 I                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 C9 G9 S; C7 ]4 j9 _/ O, o$ u7 P5 I                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 g* [7 X& r$ ?  j3 p; B' t, R
. Y& j" K" ~, }. E( {4 w: N                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )* ]7 J- o% J4 V0 S" V/ F" p+ v
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& d8 Y$ C- z, w4 J) ?7 t, y
% f8 ?, G. H, g1 P# i#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ m! B/ S9 ]" l/ `2 S7 e; f
and add under
5 W5 l/ c! C( M1 O- V6 q2 l5 h6 ?& h6 `- _
Code:2 k* Q! {6 N" J( O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); n: x. e9 n& `' n
                        {
0 F- L  J' J, G* K+ W                                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 );: x8 E- s7 s% N; `
                        }this/ V5 c" Q1 y3 T9 \/ {7 F

: p# S/ |$ Y$ g5 ~: N% V$ {Code:
# c6 q6 @8 b5 d4 ~2 B5 q! [#ifdef __QUGET_SWAP_FIX* e" T0 [+ \2 C9 b8 |
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 V2 n% t3 u; s" Q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 ?, S5 n' Q5 z
, q! b( m- M% N  M  [3 ?; h  |                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )5 e2 @) M+ X$ t$ ^) U! R/ a( w
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 y) U. E5 j+ X/ n( V7 A2 f5 @; L/ z) v# }7 I- W$ Y2 V5 W
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )  z" p% x6 V1 p* p, `; @" n  a
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. @3 p; Y5 r4 U8 u' ]

5 a0 s5 [& X# Q( j6 r. c5 K#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) P" O6 N, }; K$ [# @) b- Z5 H3 {
& a- U0 g* }8 `  {- a( o

* T8 B. N' U! W7 F1 u6 o

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-28 01:54 , Processed in 0.065000 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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