飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16841|回复: 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
8 y# Q# j4 q! q1 fI posted this because someone kinda posted a youtube thingy about it :O.
% J+ X  e, @" t& {+ v. I/ w: M, L" @0 S
Find this in DPSrv.cpp @ worldserver
9 w3 V5 N7 ?! s/ n
6 D1 @# r: \; q7 {Code:
& @0 L. d( Q& J6 S4 w1 s% J. [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; U, a+ a  S6 r: ~5 t4 @{: q8 K- b% ~# j7 N
        DWORD nId;
. a) f0 E: H) A. l        int nPart;1 T& p/ A8 S# D2 \
$ V+ y8 U9 W; @( `
        ar >> nId;9 Z& V/ T, {7 M" b( M$ D! c
        ar >> nPart;                / |% S4 f- I0 g5 B& b
       
7 I' O, f8 j; S& N! l4 k# z- X( ~        if( nPart >= MAX_HUMAN_PARTS )        % [, m- W# K6 t# P  C0 u
                return;
- N" [; U& v0 p6 A: W9 _0 y: T
1 f0 v) q/ q, E% D! Z( W# {        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' o5 u4 v2 P" C7 B" M3 O6 g+ z0 V+ |

. t5 F, n, V- }: A& V' A+ CCode:: A! r: r1 m0 m' W) m
#ifdef __QUGET_SWAP_FIX
6 @5 h' t0 `/ k  O0 D; v0 h( D$ D% F: S9 y8 g3 g, M
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )5 f( k1 ^: K& a9 I) v3 ~
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ `" }0 c& D% _, Q/ x5 h2 H& S9 A2 C
, r8 l' d3 v- k0 U( C                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )1 I- z" c9 e3 C: A
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
  O1 X; A4 J1 @. X8 y. a, O( R: _5 n( m, v/ b
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
  ?+ H% J9 f4 A- F* H! H                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, M9 e! h5 ^5 V5 Y$ V/ m% X; ?, j9 d
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
9 d( z5 {6 n. P6 {+ Dand add under6 h* D- T4 K0 R# a3 a0 Q

- f; c+ N* B# N( Q* yCode:
. X, B' [" p( n  J3 \if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )  }+ e" T) s4 I0 V! w. H
                        {/ v# B9 r. N8 z* ?4 B) T$ e
                                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 );
* `$ f7 Q! ?4 R; K! \3 [+ O! Z                        }this! H+ X9 t0 K) Y" ^" C- U# O1 T

0 R1 w! ]* v- R) mCode:+ ]! K" a- T' w, g, r, a- K( b& {5 J" i$ E. y
#ifdef __QUGET_SWAP_FIX
$ m1 A  e0 D; D  s                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )- ]6 \  ]8 r% \4 m, u5 O3 \  I
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' a7 r' O, X; y4 r1 k4 S  x4 S

2 V$ X. I7 [+ m                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
) [$ T) v. D! c- X                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 i3 D! O; J6 o% T6 U: _- F9 c/ D% h7 d
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 h: F: p  U: j- @% u. q
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 o5 ]5 ~; e0 q4 m
) D0 ^8 [- f+ g- \#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver   S( t7 M' o. a7 Y

+ U; z. C2 i/ H8 H2 k, K# [6 e$ P# w& O) L

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-5 16:30 , Processed in 0.117748 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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