飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16411|回复: 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 5 ]" @6 N+ ?) i+ Q, K; x4 _
I posted this because someone kinda posted a youtube thingy about it :O.
( @0 q; |# Z, g3 R- {1 @; t: ?6 J) G5 T+ K
Find this in DPSrv.cpp @ worldserver2 o5 a2 K. z! |( m. O3 [# Z
- H% o& A8 V) w8 {$ j
Code:
8 t0 ]5 D! T1 \" d7 ?! dvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 w; T9 g, F! ?" D
{/ Q) H6 l' D) e' y: E
        DWORD nId;7 R* Z  \& w& c5 U! r: C
        int nPart;' j8 k2 w. X. ^' G6 g  y: J
' B5 ?$ a1 S$ E$ K9 M
        ar >> nId;
: m1 W8 `. A$ `5 E. r        ar >> nPart;               
) x+ s8 H& n! O- j' r8 s! A! Z' L* `( p          B" p. [4 R/ W+ B% X+ P6 G
        if( nPart >= MAX_HUMAN_PARTS )        ) x: C6 |& ^# t% R. Y
                return;
% s4 R8 c9 O+ y# \' M) O- X( p  k- d: O
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: c7 D' g; K1 T  |% H+ K

1 a, C, W( F) G- C2 m8 I$ ]( h* C# g! Q
Code:- K, U' ]2 a* I& T3 o
#ifdef __QUGET_SWAP_FIX
/ ?8 M/ ^/ e! U5 e
8 m8 g2 k' r# }% w5 C                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )$ J9 L8 e( g) D2 K% O) a/ L2 M
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
$ l- _/ ]& S4 [9 v8 M: q4 q# a  w
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )$ i* |( s  a" \. |. S; P; p0 W
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );( P3 A, ?0 A4 e+ L; O; A% c- ?; u

, B8 u- ~' ~' u8 e7 j) l                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" L$ J. }/ Y/ M  f) P; b# N
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 v# M5 }/ P8 Z9 @

1 D. W7 V# R$ V7 m( H8 j#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 H& R& b+ F5 S, J9 O/ p: m3 X
and add under+ T) ^/ x: Y# k& ^
. P! X; c$ {6 l4 F" z
Code:
9 D+ @/ g' V- Q' Kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 B* B" c5 `* [- ~* x4 T; Y: I                        {
% @4 z: H& p  Y                                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 );* x; n3 G* Y$ B. L% f) H2 i1 h; u' m% K
                        }this3 C+ q2 G: `3 V* M3 b: u7 e, D, C
; n  t, z, G( H! z! V3 s* D% P
Code:: Z% I! [. ?# N+ S% i, d' E
#ifdef __QUGET_SWAP_FIX' O5 F9 i+ u8 G0 l
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ): d/ `6 h: a4 x1 K# M
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# U4 c, s3 h0 k7 x

' b6 e. X9 |5 l6 h4 Y                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )2 J8 L' `) w# \
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 M$ v+ \# |3 t3 z& z: j; Q

6 o- Z3 M0 C- U$ }; j                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
; W  G3 Z6 n/ C% T; u7 \1 B                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 R9 [5 p: v/ e2 C
8 \' U; {5 p" q  x$ W' Z6 V* g  z0 f
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 r7 J4 [$ ?9 P) Q% ~

: V( Y' z. Z7 e! ^& @- ]2 d" M; }" g  y+ Z$ Z; Z, [$ i) a1 [7 F. E, s

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-10 02:33 , Processed in 0.064583 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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