飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16225|回复: 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 P. v8 O9 i- n# XI posted this because someone kinda posted a youtube thingy about it :O.- P) T' [/ H6 I/ {" Z1 K
& \9 r3 p. u( }# X% d9 I( g
Find this in DPSrv.cpp @ worldserver
/ T( R1 Z, o* ]; D( j2 L; p0 e: F: E/ z! e, j/ X! ?' m
Code:$ q! \! a( q4 u) r  }7 }- D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )% ]4 I8 P1 R) C1 P# t
{$ A+ ]/ l7 I* v) \1 H# A
        DWORD nId;
0 g' a( W2 o' E        int nPart;
) A. J0 y3 e" ?2 [0 B4 |  k5 D; U8 N
- ]+ R" e0 \% O4 t        ar >> nId;
/ e/ P5 ~6 d7 |/ }7 O        ar >> nPart;               
$ U2 }' D; F# F! k& E! @       
' f. L2 a6 x* V        if( nPart >= MAX_HUMAN_PARTS )        $ V0 B1 [. }3 @: w( }, p' c. s$ e
                return;' {% B( l3 P' s) P; X

1 r7 ?* m  S" ?/ @6 n; I5 D9 M( e; U        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! l2 \' m2 U. M: M4 @0 _' L' I& d
% M7 @" u! J8 _) J+ _9 U; q- i
( {/ z6 t# ~- v! p. @8 Q( S. c
Code:4 a# [5 H5 J/ p# z/ D/ ~; L2 L! i
#ifdef __QUGET_SWAP_FIX9 D; w) `: d2 m, ?

( d4 Z, H1 a/ H                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )! g1 b0 o( e9 A5 o7 |
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ {" Y; R: f: h/ [
" t' \% C  u$ I6 b0 k+ I
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. S- N. S' ~* E! i4 S4 S" @/ l                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 n5 e4 X  S+ i/ `& z" n. @" j

- f6 k& J4 s* V( |' M/ s% K                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 Q% `/ k( Y0 |: u& n2 P8 V
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& F. y2 y% N& w& K2 l4 R6 }6 B$ \; S1 @
- D1 M2 |8 I2 a3 h6 t: L0 G0 i
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 p4 t, B& Z- Oand add under1 `1 @- y$ `* l4 `6 V+ ]$ P; O
# z+ G* Q/ B) U/ Q" [) W2 i
Code:0 r% i; k+ l: Y: F5 i
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. g& T3 \. b6 z# s$ {- A                        {
4 [  n8 ^0 V, f$ @- i' H) x                                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 );" N! D% A& P4 u# w
                        }this/ i2 X2 q7 [/ O3 l4 R
  Q; g+ X) i, G- K
Code:9 j0 J* X6 ~$ d  ~) O- D: \6 J9 h
#ifdef __QUGET_SWAP_FIX
, |2 D: k* y' Z1 x3 Z5 ]1 \                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ); |4 [7 t: {* G* \1 l: D
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 q9 A. s0 B! C) Y9 U: T" f" J+ G5 o4 V2 t/ r
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
1 m. @, D" y3 D1 F  D6 ^, H) w                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 E' ^8 c: M8 c1 t* d4 P

" C: n; l* v% O' |7 }$ d5 Y% B* d                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )  h' ~4 s8 q; g* U9 T: p
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# D- @; l5 \5 [5 x& @# e0 l( a) ?

$ D7 |. v* O8 M" r$ S  K#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" c! S, |& z; e; x. I
& s% R! e" N$ X; T; M. w5 V: `8 ~
+ t' r7 ^( j9 E# F

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-27 20:51 , Processed in 0.058646 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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