飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16784|回复: 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
; f8 o4 b  o% tI posted this because someone kinda posted a youtube thingy about it :O.) ]! N" P: |! i3 H. h5 T$ l0 B
' Y" |( N5 Z) x) @
Find this in DPSrv.cpp @ worldserver3 w+ B" ]3 p2 N6 ^8 P

/ Q1 I5 k; p' S0 f1 O) \- zCode:
) A: m2 O( ?8 d# S! \' j- \3 G/ U: ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 ?. l% U* C2 C# w, @+ F
{6 [  S# h7 I+ s
        DWORD nId;, k0 b/ k+ Z! _2 s
        int nPart;
: ?. Y  Y! \; U" K% H. s, i9 e7 e# L1 L
        ar >> nId;( M* C9 {+ j5 |
        ar >> nPart;                # g9 T9 e4 ~- c6 Q5 d6 R
        ) S) ?/ Z, `: L& _
        if( nPart >= MAX_HUMAN_PARTS )       
5 _1 N: m9 e2 A: t/ e5 ]                return;
& ^  z, f# J' D2 g  x; m, k. n/ G& I+ ^1 B- Y  _6 ~
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it7 S; @  ?& ?* Y2 s8 p2 e
% V3 L4 r, f- h3 r

" Q7 U7 F' N7 c; a. E. OCode:
6 y3 R8 t/ L3 D/ F. @#ifdef __QUGET_SWAP_FIX
, W: x7 n; p% T( q/ ~& ^9 c3 t+ E- ]7 o' j; p) U! ~
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 B/ _5 q$ x* b  O) x0 Q+ h
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());# U" ]3 w! e# J6 }( V: m' r' \' t
; K) _- b9 U4 z$ H. Y$ L/ a
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& ]# U+ P2 K% ?) O5 v: B
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
) F2 F% x5 _/ c7 M6 z  V- i& u7 L% @$ e1 A1 s7 K# E; o
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ): h) C! P  b! x5 E
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 |$ q- E. W4 \; X- t  g
7 j9 Q( U& t: D9 X& b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 L* X: h7 W  w' a
and add under% q' I9 E0 W7 H( ]' y+ [' p

8 R0 {% {5 c* ?: QCode:
. z. Z+ j( K7 t. ?* N& a; Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ [) t, z" t. Q9 b' p
                        {0 q# V* N6 X5 \- m
                                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% L# X# d8 J' _* ~0 J                        }this
. b  z; M/ k* g- U8 v$ j
; L7 e; }- D2 V# z$ NCode:
6 H! x0 k0 Q8 j9 S7 n! J6 ~; w#ifdef __QUGET_SWAP_FIX  A! k# A% s) B+ S0 ]/ a$ L
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
3 z. q9 Y3 Y6 t0 a5 q: e                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& y5 r) [3 ?; R/ p

: N: T) V: o  I$ [9 m, q4 p9 Q                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )2 ]6 h! L7 ~6 C* E
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 Y( ?$ k1 l# c4 x$ w7 L
# L- o1 p0 Q& O' @4 {
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
/ T' C# L3 s4 c* v/ Q$ o7 |                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 Q  z1 s/ k. O2 s; G( l
# ?! y  W1 e' E5 F9 q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" U! q/ \1 m( s' p8 O
: x' L, s* H7 j/ X" v, }% b' V& O# w8 C. X) i) V

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-30 20:23 , Processed in 0.063619 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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