飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16769|回复: 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
! D, p3 O9 k& ?5 U8 R* G5 lI posted this because someone kinda posted a youtube thingy about it :O." w8 H! S9 l# C  u

! Y: e$ d" }+ L/ A: ^3 x; nFind this in DPSrv.cpp @ worldserver
4 ?) g. ~5 u0 ?! j& s1 f' W3 m1 a% s0 I) ?5 E4 \  |# f9 r
Code:  E' @4 X( T' V- H
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- G* n3 u- U* P# w{
" a9 C% F6 v- C        DWORD nId;1 u8 m. a7 J1 Z
        int nPart;6 W, w. u$ P) i' j. h0 o' v
$ U$ l" P' k4 Y! y( x: z
        ar >> nId;
7 p' A3 K, w  R5 N        ar >> nPart;                3 |4 l" B2 q. B! [6 o
       
6 Q) E; f. n* ~& ~& x/ F        if( nPart >= MAX_HUMAN_PARTS )          [6 V' G7 O! y  O' T
                return;7 E( s2 q; u3 A% z5 E/ t" O4 ~3 W
' ~3 n* S/ y, K1 _
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it! u1 @+ j& K  I" v
$ q* V7 I, F# l$ m. O1 \3 H
# o& J0 A) A5 V8 j8 H
Code:
6 m$ V9 G5 f; S' y1 A3 B$ _#ifdef __QUGET_SWAP_FIX
* p3 c$ f) U- L5 i& z3 I- k# A1 G0 H
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 e2 ?5 V: I" H
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! i% ^# x+ h, Q/ n2 }! {& z+ f8 R! t

+ m8 g" l7 x+ U- u                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
* M) D9 E. Z$ y; ^8 l' ~+ e                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
; F/ Q0 \4 ?9 Y& S$ S' u7 I9 ~0 |- l6 R" l
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 ^( R! P! N. `4 `& e2 C7 s$ h% i                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( u/ d  Y2 N# ?: G! E9 g/ g0 L: p
+ P# `, [9 i6 F; x" `. G
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  F5 n6 k6 [  D4 y" L! B
and add under+ `1 R. j' Q9 l2 k+ {8 J

$ a6 z/ A# c( I' `" I/ C# ^* T8 RCode:
  r1 k$ S: p# F1 V5 yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 X) t4 D* Q& ^/ l, E% G5 A* {                        {
, V" Y' M7 c5 T& l                                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 );& S% Y. q6 e& c  S6 A+ V. ~/ N
                        }this
$ {3 A$ H4 n) @0 g/ j7 L4 s9 s" d  d2 i9 ~# |
Code:
' K' W; [8 n/ Z! ?  M#ifdef __QUGET_SWAP_FIX% `7 V9 w1 o0 G& s8 x
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
7 Q* k& a$ E+ W+ P: {                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 `3 E( m& e, V1 u# ?
( }& U  X, D  y: a/ u. B& D
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% F. U7 A5 Y( ?- r& \
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 k. S) F; r* C  A! U7 q. o# O

  m( ~- w- _- k6 a) y! g4 q) V8 g                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )" q6 D+ R5 a0 x/ B3 l! S5 o2 k
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 r9 ^/ E+ P" }4 G! N- p8 H1 P* h- b3 v1 {$ Z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / k7 w4 L3 y1 j+ o

* `5 y1 ?( N- i0 ^3 C1 A" _
- ~6 ]# l! K+ k+ h" t

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-29 19:18 , Processed in 0.060844 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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