飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1058

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1058
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 + f1 a9 S4 m% A
I posted this because someone kinda posted a youtube thingy about it :O.' a& f% [" G1 g4 P% B1 e6 k
8 @! ]; t$ ?+ o" H2 X0 Y9 v
Find this in DPSrv.cpp @ worldserver
7 y% s( G1 v$ Q
7 F9 G! I2 W3 h: N: ACode:
1 h+ b( E- V. i# g$ O$ uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- E/ E& S- o7 r" m, R
{
, D0 M( O: Z1 ~, \8 W; @3 h" ^        DWORD nId;4 N# A, p. v/ s+ f) ^& M6 w- Y
        int nPart;
9 A6 C$ J  T9 ~; o: y0 I; y3 m: M5 N5 g; \
        ar >> nId;5 F, e& f7 y7 a8 z8 v
        ar >> nPart;                $ Y9 H: T7 g" C3 y1 n8 Z. e" i/ O
        : D8 u* H) \! W  y* G5 m
        if( nPart >= MAX_HUMAN_PARTS )       
) p) Z0 V8 c  N" B( R0 W                return;4 @; ?; Y9 @) X% A  U
$ K" h2 ~" n$ }/ E' \; r1 t3 y
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, Z* S4 d4 C6 T! T: B2 R' T: P! L+ N) b) l8 K' V3 d7 \) ^

. ~- i9 d+ y, f! Z' A# g% a+ gCode:
" D7 I* |3 A( L, ^4 d8 `#ifdef __QUGET_SWAP_FIX
" x) {' a/ G; K) Q( A0 K
5 E) p- ?# z! M, v5 ]' o+ K                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
2 d. Y% Z3 M+ {7 J1 T0 X7 \  x! B8 m                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
' a0 f1 _, R& C- G9 V3 r! \6 V: Q( [% d$ X0 U! D  E
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )$ i5 J0 T, a! J$ n" W8 D: Z! Y
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );, `4 [- \0 s, I2 d
! N/ Q) o+ f7 W3 H! n
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ d7 [4 v! b. t5 Q' T# c
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 J, J. U! B  D% X8 A
5 H* h4 \) X. p#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 B# F+ E1 x" X; tand add under
9 r: N4 n8 s3 H4 b4 x: Z- T0 I. Y4 K- M4 F' C
Code:
- L' P' l2 Z0 F3 f* f5 y6 \+ `if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )! T3 Q( `/ c. I. v, H2 n0 `7 C
                        {
! T7 Y9 Q6 o7 T# `) 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 );
, g, J* f! y# D) m9 _                        }this
1 c5 h/ I  M' i' h9 q( o/ d$ m, ?3 m0 x3 o% ?
Code:
+ ~5 M( W8 c$ q#ifdef __QUGET_SWAP_FIX- Q; r0 `3 N0 m
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
- t8 V* x( U7 P8 R/ w3 l" j+ |: w                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, _0 s0 H( ?0 w/ ^! A+ E* Y6 t

9 L% t  ]5 g6 c; V7 o* s, {) J                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )+ A2 S9 ?6 m/ u4 N/ \  r* ~6 q! }- u
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 k3 y& }9 W6 o% V/ V
6 s# b6 B0 ?5 Y) j; ~6 A6 x
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )& t7 Y) ^/ g% K& s# k7 J9 x
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ U/ s" Y. s6 M; K. B, k, H* g  [! w
& y7 M1 N8 N3 ~" Z  J6 e9 ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
! E0 V  F0 _5 q% ~* _3 S4 ]' w) }$ l
1 r' \  z) A( Y3 P+ s' E
1 T8 T) h" k* R8 ?, t; \! L5 L

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-3 06:49 , Processed in 0.061479 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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