飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16993|回复: 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 % O( B7 c7 W- I# Y* ^3 ^" z5 W
I posted this because someone kinda posted a youtube thingy about it :O.
( D$ W% j5 W- B9 c1 f- e0 B, @! }  O5 F
Find this in DPSrv.cpp @ worldserver/ y% G* p2 ~( Q0 u) o

2 L) S3 z5 [- c( s" C& TCode:
( q8 {5 U5 q2 Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 f4 I4 F1 b, ?% v/ E9 I{9 l; r& a2 q$ L% ]
        DWORD nId;
8 E- l+ `& }" S0 J# H1 t        int nPart;& Y' T- ?, ]* W% p/ C
2 B* W5 O. h4 \/ m. j- Z
        ar >> nId;
5 V1 D7 X! Q& f1 _1 u* r        ar >> nPart;               
) w1 `* r# ?8 n$ H( s# o( c. U+ G       
: f6 p3 l: G  M3 G0 Y( g$ P        if( nPart >= MAX_HUMAN_PARTS )        : \" z5 o. y7 x/ V- a: @' X6 C# m
                return;
! |/ _# J6 _; |% L, a7 u2 Y5 ^9 j/ f6 S( z5 y( W) U
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& d# d: g9 Z4 [8 a5 v- c* _1 U
* i. N/ T1 K/ F* o3 O- ?& i+ i0 C$ V/ z, G8 G# K& S0 z, N; F
Code:# D' s) d2 q1 o% G9 m! a
#ifdef __QUGET_SWAP_FIX2 b$ e  m3 V+ ~/ M
5 O1 t$ e/ c  I; W7 I* k& w# G
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
: o# y4 T1 B( _& v+ u' d+ H                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
; \" O  h  k6 s8 C+ A" P% ~7 Q6 G$ C: @1 o
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& Q! g" l2 m  [- b$ ^3 j6 @# ~
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 x2 x: F8 W. Q2 N. ^# m: O& O9 v, v: W& x' t1 |  v
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
3 P6 Z8 N6 c, `                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; d8 ?1 K0 H- U2 b6 ?% J" l/ C) D" d5 Z9 `  k! u9 Q% l8 B6 c' I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" m1 r, F7 m: D
and add under
' `/ i5 o$ p' d3 A* E0 X+ X4 L
: h& z$ ~, b& rCode:
4 d- r' X. c, H# D3 jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 {4 I. e+ Z4 A8 o0 L) m
                        {
( Z. {& q7 `2 r) d                                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 );& J0 Q0 B# R$ b
                        }this7 T% a6 }+ ^) k- b3 E* R3 L

4 I+ ~# V9 L; H/ hCode:
9 u& Y2 N4 a! Y6 H6 w#ifdef __QUGET_SWAP_FIX
0 q6 L5 L7 t- S  U6 o0 y                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )0 L+ |% L# X' S6 A5 O& v0 `
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 \, m% ]1 H8 u8 v4 a
0 v. |5 J9 r% Q$ w) T: o! E                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )1 b! E& ~6 k- o" K
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 n8 k9 R: Y. t& I; B9 a$ C6 X: Y" |1 Z. q& ~% e9 U
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )5 d; w; b1 A# M' K3 D+ n
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 `: T) ?* Z* w# z5 u& Y

/ L% f4 z8 a3 k' Y; ^#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) Q5 [/ n, Y0 R: b1 |- s2 Q- M
) Y7 I4 k* B# b9 y0 Q) E% T

! P9 y4 ?4 o" G7 S. g2 n  I3 \) I2 C" t

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-16 23:00 , Processed in 0.086725 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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