飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 15647|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1070

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1070
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 g1 Y% F& g4 y. W* x1 EI posted this because someone kinda posted a youtube thingy about it :O.
' }8 H; }, J2 p8 E0 X/ b' T- i, u" `4 w  X( \
Find this in DPSrv.cpp @ worldserver
  s1 m6 u: Q; W6 u* Q5 b2 A" g( W* @5 q, b, h5 r* B
Code:
+ \( D: A5 ]. {: Y5 A3 B- nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' T+ Z1 e9 j3 W" \. x' L: J
{8 q  S/ f: y8 I, z% k) T
        DWORD nId;7 O- H9 Q8 N. B
        int nPart;
; A9 b0 k+ c6 S0 O& [5 c5 V1 O5 Y. [
        ar >> nId;
; u  M2 f! n4 B& D% t! M        ar >> nPart;               
7 I) t: t4 e( b        / R8 z* u- e5 R- |0 v7 X
        if( nPart >= MAX_HUMAN_PARTS )       
& a* i9 m% h& Q" B! u& H: A' F                return;
: W1 X1 X/ n: V- ^. H/ l( Z/ E, Q+ }# o. M2 U
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ x% X  `( M+ I  ]1 W2 P; s3 V" u) H' A7 B$ y6 p

# }( b9 \9 k0 l( ACode:
  l: @0 D+ O; w8 J#ifdef __QUGET_SWAP_FIX
. ?8 q8 V2 g$ D! T' c. M+ h. v0 r5 P* y( W. p: d- C
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 I2 V( q$ }+ }/ f3 H& _" W) g
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());: I: O) ?: d6 _5 {; c

2 x3 q+ V5 ~0 Z8 D) p; W                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )  }0 y5 |  y* B: E) }) ?9 z5 t
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );: {& B  I- p1 a- g7 W
  K  P2 n; E/ I- M& i
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
4 |) F" R7 G. J- O                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 e/ j4 E  m$ A; D+ _8 N5 m" y) s. h6 p) ^8 z6 m8 c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 [- ^  v% h6 F) D" v; Wand add under
! f; E0 H( @. x0 o; s  c: I2 t% v
! ^" T/ n4 a0 K( Y' A* R0 T- ]9 MCode:. c+ y4 T' x0 {" L( q, @
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
) k! M" b7 {- Z5 [* S" Z$ k9 v, C1 B                        {- e3 G' [  x. a6 a. p' F! i
                                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 );
' R) t6 g) H6 R; ]& e0 u                        }this0 M$ j5 o9 W. i5 J/ m4 P
! ^# C& i7 s0 r7 C* p4 z, Y9 b& ]0 X
Code:
6 A! _+ n; T  b) t) t#ifdef __QUGET_SWAP_FIX
4 d) r# e6 x/ N6 W4 f                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )! u0 J& ~( z6 k4 ~4 m4 k
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ C* f; [3 [: D# R' l
, }9 ?- l$ v3 k, g. J- ^* l
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )( j, l# D' w, X1 e
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );  x+ c$ K+ ]/ h. ]4 I

  j8 C  l. c/ n; e                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
) q" N& n4 Y, {0 L* d6 `: b                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ B2 o( v! v6 Z$ ^( o8 ]
5 x. A/ q6 C8 @/ Z  Q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 Y# H+ f7 H5 ?
, u& r9 A" Q% E& A  Q2 q
. u0 J7 \8 W; b2 L

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-18 21:06 , Processed in 0.077521 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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