飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16313|回复: 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
, _) s+ t  V0 I1 H3 ?/ `" RI posted this because someone kinda posted a youtube thingy about it :O.
* H, |9 ~6 s8 C* G, y  j  a
6 {! N3 j7 s8 x/ T% dFind this in DPSrv.cpp @ worldserver
7 @6 j# _: T' |# p8 j: F8 V$ [5 J
: m+ \9 z* n0 G# u! tCode:
; ?0 W2 u8 z, s# k7 z) n; O% Mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )+ t( J! L- D( a. [
{( ~) ]9 r* _/ ]& c
        DWORD nId;
5 `2 C% u: k1 T! ]& R% h        int nPart;+ X9 ?9 b1 R+ @# F; H
7 g( Z" [7 o+ b9 f. B3 v' F- G
        ar >> nId;
- |' ~3 ?) w. Z1 r. S* N+ E        ar >> nPart;                ( H/ L$ {3 o8 N$ l8 {
        $ `' K" N: {. ~: U! X2 `* m) q# I+ x
        if( nPart >= MAX_HUMAN_PARTS )       
8 N  E2 L) L$ d& R. e                return;0 `0 o( M7 \$ g' h0 q
9 G5 [0 U' T1 o! I8 b' ?( Y
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 Q0 J" k, z: }7 s. p5 H1 I! h

+ k2 w/ x1 z- W2 F# H
+ T1 X. z7 \. `/ G! }( b. mCode:, e# f5 }9 c9 }8 [9 D- W
#ifdef __QUGET_SWAP_FIX
. f6 _7 a0 ^4 {8 a) \; T3 S5 v& ]
$ o& l5 R: b4 K! y+ @* i1 c( n1 B9 ~                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )3 t4 F8 ]* \. W6 {$ U, u1 ^
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
" {3 S$ X" I1 l6 J) \
' y+ z; v. o# I                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )5 O5 R) _5 F/ t9 s
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( ?; Z) c- y4 d7 p# ?# M
* }% [& h9 B( C! U                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )# U. i& x& _8 T, J
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 A2 T2 n: O% ?- j8 y
. O$ v9 @+ H' u% R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
  b  ~$ Z- L0 pand add under4 C3 k, D# _" m" N2 M( ]! V
% k  |' K" R" H# A! D# B
Code:
  `) l2 t: S! oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 j2 K  Z+ Y" A6 j
                        {. o1 Y4 d/ V3 v7 V- k3 W4 D3 e2 m
                                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 );! Y0 B4 R3 x- X9 C) G1 j
                        }this4 T0 w: k5 `% Z% G
' z7 r: G; k; @5 }, I1 m2 q
Code:
( @' P9 h/ o' B#ifdef __QUGET_SWAP_FIX
1 t9 Q- W% ]  J9 u                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
' l) Z- ~. W' o/ A                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- C8 z2 o0 B, ]' P. O/ r8 O
3 h0 _5 q3 v! {
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )1 p$ D4 q- H' X! ~5 l
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ y  Y* p3 u7 e& h, x" F9 {+ y
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
# i9 s0 a; N/ d5 U5 g. X                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' ]0 U7 y$ e9 ?7 k

. ?0 p2 Z; b( @9 n) S8 d4 J4 Z3 C6 b#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 o/ V" N4 S, W3 N+ z
' T0 p( }7 a3 c2 Z, E
3 D* G3 y. g  @* Z) K

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-4 13:15 , Processed in 0.059406 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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