飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1068

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1068
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
, E8 X  ?1 ^, _8 P5 jI posted this because someone kinda posted a youtube thingy about it :O., @4 `( F( B6 @1 i# z! K

2 e% _  Z; k8 r) t9 Z! p  aFind this in DPSrv.cpp @ worldserver
5 Y4 Q0 f  ?% c/ O/ t  o: D7 E7 V
4 j8 m8 }9 g/ X' f. nCode:
0 C7 x3 b& {: {0 N( I- b4 bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 L1 {. Y+ {) x8 a- X; M# v
{( l2 ^; o+ r) S0 v# }6 Q9 D( _% E- _
        DWORD nId;$ `( ^- O2 A0 U) A
        int nPart;$ J; k! p4 o. v  `

9 f; m' z0 Q0 v' q0 G( F& D        ar >> nId;
# N( b' k6 \& V; g$ v        ar >> nPart;                ! u- I" h9 s: P* _2 T% V
       
# _) d# y( C# n6 i; p& j7 T+ q0 ?        if( nPart >= MAX_HUMAN_PARTS )        # q) w- Z; f  g0 E4 j7 f
                return;
9 S3 B( c5 D" L( [* a/ S) \
2 p1 O2 l& h; X% M        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" A/ ]" @5 d5 D$ f* s/ S$ Z/ g4 k/ b9 K
! ~: ^+ @8 n6 k( N: g3 Q3 r
Code:; v# Q2 {* i) }" x* I3 r
#ifdef __QUGET_SWAP_FIX
# U7 v* W& k. I# ]  |& b( b: W
. B( m% U7 e! R1 ]                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
* O5 b- L1 U& J% q3 m$ `! s4 C                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());/ j  X/ X- e6 _
% Z3 z6 q- M- S3 V( A
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
5 i/ l- i$ ?1 r& O+ s) f                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ d. e) {/ y, c  k5 }( y
- f" g9 T, o3 B& r4 H4 d
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" d# ^! W0 _' @2 f$ I; |3 ?9 A6 Q                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 @" v& ?7 S; j3 q& o

7 H0 Z$ s! |3 O, f) }( ?  Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
) ~" m2 ^0 [7 J) Vand add under
' A( h( e- ^4 K/ j) E. I
* L; o( X; g6 }! _& h: PCode:8 q8 y) L, k2 R5 F
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ C' d0 n# }7 y4 b+ |
                        {6 O" Y( Q* d5 y2 w: R9 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 );
% p$ i  g6 g/ S! A, U! g                        }this  P+ D$ i8 [( l( g- i+ G; M% j
5 V# ]# N2 x/ Y' u8 q9 \! Q3 o4 u
Code:; z2 N5 m4 e' D' Z3 Y" G! D
#ifdef __QUGET_SWAP_FIX& b4 J. z: T& y. s. L
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
7 A; e: v9 ]/ a2 h" T) S& |2 Q3 `                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# x6 g& G& E5 J6 M$ o5 @6 a6 W$ h# Q2 R' O
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )  [$ H# M& G0 {; L+ L
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 [! P  k9 U9 \2 `' Z# |- e  w
6 F2 B5 Y- F. b, R2 H3 S% `. D                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
/ z- }6 B% O$ i* [                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& I" X* _8 C2 K% x6 T. Y

! e4 x2 R& _% ?+ ?, X8 O+ C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* t' c" M+ e+ J" C
2 u# k! ]7 n5 b3 _5 A/ s; G
( J/ m) k9 x  d

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-28 09:20 , Processed in 0.113792 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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