飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16381|回复: 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 ) ?9 q/ z. i  w8 t" d! }3 d, R
I posted this because someone kinda posted a youtube thingy about it :O.
% d5 _$ J1 |* P2 r* h! N9 a$ P& e2 \! y
Find this in DPSrv.cpp @ worldserver
+ t) e; T- y# S. J, A1 d: w% C. C& j! v: h2 ?7 b4 X" f1 E) ]4 K
Code:
2 E8 G, O, T1 M0 W; u# m0 P& q/ Hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! \9 e* u! I: D
{
8 a2 T2 v6 J- `, c; |4 u% m6 a( n        DWORD nId;) {# N: K1 ]) g
        int nPart;
6 K0 V; P1 k+ F% A. `8 }( \& X) k  S- }% V0 }, S, t
        ar >> nId;
; J! V' t0 S. ]/ P' u        ar >> nPart;                5 u4 }; b3 q/ E; u( q
        / _; ^1 @) ~$ ]" w/ p
        if( nPart >= MAX_HUMAN_PARTS )       
7 B9 p: u4 O$ `1 t' @                return;
, F8 j. `. B; b2 U( Q
3 J9 ^2 x- W  r6 X$ S( F! n        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* r) u& E2 a& x5 m5 n5 x2 @3 M4 B% C& _' B7 m1 I- W% q/ z

, q! Y* {* c7 [- G6 p% YCode:2 O% {9 @. L7 W# u" [0 H' u
#ifdef __QUGET_SWAP_FIX- X% x0 E& ^5 j1 G9 l
& ~/ v. s, R& t+ F1 V2 L8 ^3 w
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )/ O. Q1 I1 s& g# k" F! J
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());+ k) h9 z) F0 l+ k3 g. q' z
6 [" [, S3 B8 ^  L
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- Z/ }; d4 A, v0 b' C
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );- a2 g8 y$ {+ @7 ]
" ~) L- s7 R8 l& ~' S
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
3 S6 c+ C+ ?: b                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 ~( }& f- t: {7 z2 g; H
! M* B6 h1 L3 W/ }9 O! `
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# D3 X* a1 E3 q% u
and add under; _- _* W: U0 q1 J# ]& w
% S: y, O! u# |* l( k
Code:
' H9 o: R1 L/ i9 j/ A( _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 A, r- F1 T  f* F4 m' r
                        {
( h$ V2 \+ ?& ~* z2 s+ ?' b3 m% `/ s                                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 );
6 e. M3 x* B' i) \9 Y* k4 }1 H' w                        }this; y+ U% L* p8 ~* G- J1 U/ @! Y* H

9 r: K, v, o! J8 iCode:
7 [$ g; n! A0 ^; b3 X' {2 W#ifdef __QUGET_SWAP_FIX
, P; K1 k) o0 [/ q3 ?3 M- g0 u                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )8 a2 B" u3 |! X2 \7 @* i
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 o1 m6 k: n- K8 }- s  J

9 g; R! c  {  `. a7 F8 y3 P                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )3 i3 y% ^( N* R, Y& m; ?
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 X0 K6 r6 y: _/ n  Z9 Z* n5 b6 ^5 F+ {9 V: K& p
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )) ~8 o. [+ J4 s& J7 Z
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# i( L: w- W  q' ^. t7 ^" N3 [+ [# F$ I$ B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ |0 P! F0 V9 Z( E3 L
) C* s: c6 A% t& o- |. U9 R3 c- z2 z0 o" l

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-8 06:49 , Processed in 0.061598 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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