飞飞世界论坛

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

修复交换错误

[复制链接]

197

主题

203

帖子

1094

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1094
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
- O, M# d" m% T$ g& i- lI posted this because someone kinda posted a youtube thingy about it :O., B/ t  j9 J) B/ Q

: Y  S1 e# i! n% }' L( C+ |1 n  EFind this in DPSrv.cpp @ worldserver' w0 y1 d9 Y! H( C9 {$ }

3 x) b1 |/ @- k9 i1 U1 RCode:
; S7 F5 i9 s: s# Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), M0 O! g3 O2 n* W. g4 T  a* i
{
' r. e2 ]# h0 ]4 C        DWORD nId;
" w8 n' t# p5 t        int nPart;
5 p  a7 j, t0 v3 s& M; I  O' N" t$ d, g1 b! A4 i3 T1 M9 w8 H: L- p
        ar >> nId;6 t4 F* d  Y, X# T$ n
        ar >> nPart;               
4 U5 V7 _4 ~7 `8 K        * b. V/ t' p) v, A
        if( nPart >= MAX_HUMAN_PARTS )       
+ i4 _3 w( m" v9 m; ~' p                return;
8 I7 _4 s+ m: x2 ~( L/ W. p* t: C8 }/ ?; @
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 k4 L& q* A( B: X1 y9 z* L  b

. U# j( p6 j+ c! ~7 m% e- V" D" O
Code:
$ r  v! x! u% l& g#ifdef __QUGET_SWAP_FIX% h2 B6 I/ e5 E) ~5 S
% Z0 {; }+ {# n8 S3 }6 H, l
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )5 O% x1 E( B& x
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 S" \  v$ s6 H3 k* b8 J8 b. z
) k9 S( `6 E- M8 V                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
" r9 Q8 Q( I7 ^8 O3 D, s1 t& z                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 o+ S1 ~* e0 a' B. H; M- h

9 z1 b! z: |9 A& \; r8 A$ R! ^                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 c9 I' ]1 M  u' M' W                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 {: a, W4 @4 l% {$ q7 f
5 \9 C+ [/ ]0 x* ~/ p2 w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% B- G$ i/ L" n8 T
and add under
  e" k) r2 x4 K7 t4 A% q$ ?
" J: T, t- @4 h/ N' [Code:& y* H0 f, h$ w* ?& O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 I  a5 a) _8 G# g' ]6 N1 y                        {4 N, e% ~3 z1 j9 |; E
                                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 );9 ]: L# M" ?; X& L) l
                        }this
% X3 ?1 c9 {5 \9 g* ~5 I1 a/ f
" o6 I. J( f  t! hCode:) t) f" @# k( c, ?
#ifdef __QUGET_SWAP_FIX
; \+ r- ^% I' \2 d                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
, w" }. r0 U6 g                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; C& n3 u0 d, I4 y; J2 _

! V/ X4 w" d( C                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )2 S  R! C+ L8 ^5 t6 L
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 u( n1 Z1 w# l4 {# Y
! I3 f  h0 a1 N, o8 C
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )% J0 @! t1 \4 Q; l- S9 y
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! z5 I: Z0 Y, p0 K
/ Y5 a  N  {9 j0 M, k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 m. V+ o+ l; M* V! x7 X$ c# J5 S

6 h% C8 c( y- H0 n3 c) I& U' `. |( w  s$ W" Y$ ?' u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-31 23:42 , Processed in 0.073418 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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