飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16149|回复: 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
7 e7 L7 U1 J* k1 X5 u+ _; Z% s! [6 O7 zI posted this because someone kinda posted a youtube thingy about it :O.
' F  D  A7 |4 e; K. K9 {( |2 K9 b- O. C
Find this in DPSrv.cpp @ worldserver
2 O4 p, z5 V0 {$ N' j3 o( P- U  m* q0 `
& d5 L; S5 B+ q  D/ C! GCode:/ |) r1 H2 I+ C0 W! d, J
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* n# \6 |$ I/ ~" m" h1 J{: ^1 s2 U9 X8 X$ c8 a- A
        DWORD nId;
9 v) @0 n- |9 A+ v* H' K        int nPart;0 ^3 B: O2 T$ l7 d$ B4 J. I
( @& j# e8 I! f" M$ Q
        ar >> nId;* K, Y. @- |! r' F- d  `
        ar >> nPart;                ' o( X. v; _3 [& _) H
        1 c8 o* Y/ F9 C
        if( nPart >= MAX_HUMAN_PARTS )        0 r3 k6 ~2 ~- B8 y. q$ R; x
                return;# C$ _; }+ k% `1 c* b, w
( P7 Y/ C9 s6 {8 Q
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  h8 `5 P& [' s: y

9 s+ P" J7 \% ?6 G5 t7 _
7 a5 N0 l; f& S; h; d, J$ hCode:
  l& O5 h2 P6 h, m5 `. |#ifdef __QUGET_SWAP_FIX" d7 A1 `6 Q/ r5 q3 R
/ J) S# K$ [% G$ s- ^1 i$ O# s( e! ^* [
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
4 Y" Z' |* J9 J8 S                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());6 |5 j$ M' h4 z
) I5 |( m3 F* H2 s. ]) d
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
6 n: @# f4 O9 U# D$ ~$ K2 N& [                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 {# T8 o0 u( `! n* I# R) j3 d. j
, ^# G. _0 h: L! \
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )& P3 e/ n9 \1 E- J' [2 V! _0 d' C, e
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 l) }: C7 B9 e+ D, R
% g; c3 E1 H5 o9 X- x+ W#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, [) Q2 ]0 ]9 C5 h+ gand add under
' @9 R1 a9 L+ q- R7 N- L$ E: V( n3 x$ V$ N" m& r& g
Code:
. m8 u- l0 N& ~$ tif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 l3 G+ s; ~4 ^$ f5 W+ o
                        {
% X: Z7 j1 S4 u  t; L8 a                                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 );
% A; F1 S1 o( r* E                        }this
$ @3 O) d  |5 z6 S
7 l5 V8 Q! ]1 @' \" j& C8 nCode:
3 E% M* F0 y( B#ifdef __QUGET_SWAP_FIX0 [% l& G" {, o0 I8 O$ D' S1 D: G9 U
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )  ]1 o6 c+ O" a1 D. `; A# C
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. L+ y7 a. N; j& \0 ]
6 P; E+ N5 k6 k
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
9 P2 y, m- D* u5 @: u. l5 {                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; }/ |7 d; }, U. g
4 _( d( W/ F4 z8 r                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
! {/ H- e0 Q) [. G0 c' b                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" d) e! w4 K. A$ D, f, \

! y0 V/ @7 j# U  T7 G3 X! J) g#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . ^7 t5 |4 [. n; Y1 ]: d* W5 o
' j; D/ _, |5 @, z5 s* w4 Z! I# ^
4 r9 Q  ?- o2 b' N: Y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-21 06:52 , Processed in 0.069590 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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