飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1022

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1022
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 T# _2 j) s$ [  MI posted this because someone kinda posted a youtube thingy about it :O.
$ V6 Q" c9 H  U9 q% x- E3 W7 t$ p5 O# F
Find this in DPSrv.cpp @ worldserver
/ m9 j) {' _/ l3 L" |" z8 O( N. h$ ~8 w* a
Code:$ Y. [  B: U+ G7 [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 |- z, _0 ?7 n/ v  S2 p9 z
{1 q, m1 c  k" d' f' Q# O
        DWORD nId;
" s) s. p% H' Q+ v- M        int nPart;
0 @0 C5 W( E* {! K
2 l5 S) q% w! ]1 a7 `4 n" o! P        ar >> nId;+ G9 F/ A$ ^1 B0 w
        ar >> nPart;                , n" T" e# P' x: Y9 C9 N
        ; ?: |) E9 @  z/ k) x
        if( nPart >= MAX_HUMAN_PARTS )        / D. t' j. I8 q0 @; }
                return;# W8 T  j1 E) z0 o" R+ P$ g
' V0 b4 h6 m* |/ K4 h2 p
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' y% f, `( w$ H) ^7 l3 }( z4 b

. U1 j3 K# I+ w* X1 B) ^, ~* `1 V' N; p
Code:
" U; p7 ?0 R4 ?' r#ifdef __QUGET_SWAP_FIX
) ^1 Q1 x: h1 }- a1 \; v& F  N
1 I0 K/ j" y$ G$ v$ U                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
8 w$ Y+ X" P7 s                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
* C: j) W5 {  ?( R: t  A
% s6 k$ e8 A& F4 P2 g                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. D3 m/ `& M) Q; }1 Y; r                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
; {0 M1 N# ^8 }8 d9 ^! K9 X6 f2 K% _' m
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )0 g2 ^; P" M9 M/ ~1 P
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( z! }* ]" i, n  j" }

; ?, [, A' Q8 I" z0 p. m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. r$ M/ R# e2 U" F0 J# C( G- {/ O
and add under
& G$ ^" J/ ^" Z+ q- V. J; R# E! h, y
6 \! n, C4 y3 f, U& [Code:
0 z, ~- {/ J) j" F; i6 ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" m- @9 K3 i) ^                        {
. _- P5 H+ z3 g$ g1 }, i0 F                                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 );
# v' N" u" Y9 O* Y3 {3 |* j5 S5 q                        }this  W1 h. v2 X7 z; S

0 I! `7 f, K8 x0 NCode:8 C7 ~- ]2 n# Y) A. J/ G
#ifdef __QUGET_SWAP_FIX/ q/ z1 |! S6 Y% c7 ?( N
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )7 x8 Y3 A6 v( @/ m
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, E) z3 i1 \, q* m' K& ]

  y: Y+ {5 ^3 }. `  S                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
; m1 W6 Q: F" c' O. L( x                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 }( C4 S* a8 v: S" V( {9 A1 B- L1 S" l3 p2 x
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
/ N) ^4 L, J/ V+ K- S3 L9 ]. O+ I                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) K( P; a; U! k9 P
. k+ ^# v, D# r; O4 K
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. g) y* P' [. V; J" n* A0 H+ ^. C- F+ g' t0 U9 e! Z9 \
0 J) x4 _: r7 |" s/ [/ w& G& e* g

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-29 11:30 , Processed in 0.066786 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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