飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16256|回复: 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 d7 _6 `$ [; ~; s' j7 L6 o! y
I posted this because someone kinda posted a youtube thingy about it :O.
0 \' O( p; J5 l( N4 |4 A( |; n3 |8 Q7 x, ]
Find this in DPSrv.cpp @ worldserver8 C; t/ n" |0 j2 V

( L5 R  O; A, RCode:
8 q% U! \' ]. t8 Qvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); c9 x. r: [- ]0 a5 }6 Z
{3 a) D! |/ @6 _% P9 q
        DWORD nId;
5 @; q% c* m  o        int nPart;
0 }+ a6 x5 s) X0 H2 s2 F2 l" {& S
. r- }9 H0 F" \: M5 a% R        ar >> nId;: U; x( z% O) L
        ar >> nPart;               
6 g4 \/ w0 b8 l: n       
* }, }" @  r4 A        if( nPart >= MAX_HUMAN_PARTS )       
9 s# `+ l8 U2 U3 D; Y% X                return;# y! H1 I( F; x
9 f0 u1 J* ~, M
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 E: X1 k/ l' d' a* ]5 t, Y4 e. Z. U8 z% b  e' E7 N

7 `/ h$ |0 w- _2 n2 ^Code:; d9 L+ H: i/ Q
#ifdef __QUGET_SWAP_FIX9 F& @2 X3 ?0 V3 H
% Z' f4 V8 c: A5 y) [( R6 x
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 I. u7 B1 h* M) u+ v1 @* }9 p                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ n! a+ ?3 a0 y' U. K1 U8 Y' [' _$ \! e1 q/ f+ |; ^
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )$ D8 r/ ?' m. R6 v4 y7 L
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( ?6 I, I. E9 K

3 h9 N: B% |3 `: y! o5 P" d# u  t                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
( Y. B/ F4 u! D* ]$ T                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 ?% c5 \/ {) `
# X+ I/ I0 s2 _8 b. H, n/ K+ Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
  M" g" z& P4 C% j+ L0 Dand add under
( l; S2 `( Z0 F7 `& ]
7 K* e+ h8 D( g9 ~: r# PCode:
, v. F" @: w# lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
  {) k8 S- r/ r* y                        {( W& e+ x' c2 [  h; }1 g* b
                                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 );
! l! ^$ M! _0 I) P                        }this  [8 r9 j3 r/ L2 p) `; `8 i

7 q  p7 k+ t! @: f# @5 `Code:7 p" f, S5 T& D$ d! i
#ifdef __QUGET_SWAP_FIX/ t- w" h! C! j+ W
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
6 M% x$ v/ F5 y9 J3 c: Q                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' }2 l2 _: e+ Q5 i0 n: D

3 ]# j5 S; O% N! t                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( T# n3 J0 E" X  [5 q5 ]+ m  b
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! [- {* a7 }' i+ R% x# `: p: J+ Q; C& t9 S
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, k  S2 L2 h  f; |2 B* L2 ^; i0 y                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& J, [+ f) ?8 D/ P8 {* r" ?
, g! i) W) }. k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ l- }' {  y: i6 g$ F$ Q5 B
# U# x. m4 [! x2 Y  l8 I1 X4 E$ \# X' v- D+ [/ y. s: q

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 02:57 , Processed in 0.066073 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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