飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16419|回复: 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
+ H0 c* `: G% a  iI posted this because someone kinda posted a youtube thingy about it :O.- K8 B, z' i; Q2 G: g
4 P/ f! A0 j6 c; w2 |# q. Y
Find this in DPSrv.cpp @ worldserver5 |# N4 Z1 E( q3 A
; Y$ I3 T( t9 m2 k) |
Code:
) m( h& e" l2 M$ l: ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ s; V+ L4 e* c/ L' `
{+ z/ {" k6 V5 \5 T) m2 G
        DWORD nId;6 Y6 v; g' X# T+ E
        int nPart;
2 x6 B* i& M; F* m6 V6 _# u0 J$ P, @+ P5 q
6 q4 h$ k9 o, i6 q' s  Z$ `- o        ar >> nId;" A, Y. d2 J4 K1 q
        ar >> nPart;                2 |: Q! T5 B8 l1 J4 a5 A
       
, y# }0 N7 X; L. p2 F* |        if( nPart >= MAX_HUMAN_PARTS )       
# K8 F7 f" L& f                return;4 a% _5 }5 G6 u) `' O. D
0 @1 U. B: q. A& j  v% v
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it# c- m: X5 ^( f+ q" v/ F7 {

( G  C; D  \6 P0 Z6 q1 h8 l# e& F( c
$ ^4 R! I- F4 {2 ~( ?2 UCode:/ B4 B+ ]3 F" M
#ifdef __QUGET_SWAP_FIX& W) L# ^( N  c) o

7 v7 o" F2 }7 L+ c                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )% |9 o2 K. ^1 c( A( X9 x. l
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());+ q/ X. Y+ Z: Z' _7 n; C. P/ |% J. `

) Y1 D" U/ U. F% C$ L$ S  Y9 Q0 D                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
( R. j' D# B9 f/ Y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: v0 q' L- T; y) r
4 w! F! T* ^9 H; R) ?  S5 N                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ f6 q+ [4 R5 l' q
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 m# t+ V$ G0 J3 ~9 x; w! W
0 n* ~' T6 b5 f) q9 e
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" e5 K5 z' m2 X# I; s" B; Cand add under
2 n4 o6 B0 U; {* i9 s
6 ~- u9 E1 Q# p3 t+ |& ACode:  O# B/ @) R: T3 y7 r# g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 h' [5 K# l. ^( S" z& K- x
                        {
' ?; r0 m/ G( P* I% C                                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 );
+ |3 Q5 P/ m: A: _" a+ G# ?, Y                        }this5 z& b6 G2 X, E) n
& _3 e7 x( R+ t5 N* O( K1 Z
Code:
3 h' `% n9 A9 M' w# b#ifdef __QUGET_SWAP_FIX; }% k  x) k1 l. v
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
  d$ t  ?* M: y6 x                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 C% `$ W; ^5 t, L7 ]! [# J7 N% q8 ~9 ?
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )  q2 k  q. n3 [* `0 O
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: Y, M6 L+ K) M' `) L
1 |2 t! t% X+ ?( S; {1 K
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
$ O- d$ N# D/ S% s9 z" A                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
9 f9 d( k& u/ `2 ]3 t6 V
& F, T: _+ t0 K' K" q( B#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 L  C& I4 H! B9 ^' a& H1 O3 P
, t+ W' v0 |& S& J: L( v! Q
" q" d4 t: F& Y2 w) J

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-10 14:34 , Processed in 0.136903 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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