飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16823|回复: 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 * ?8 {- @5 G6 k3 B( J2 s2 e1 w9 z7 D
I posted this because someone kinda posted a youtube thingy about it :O.
8 @3 ^4 D" a% J1 `! _6 J% f  Q( j" g* G
Find this in DPSrv.cpp @ worldserver
- @9 L+ F- o/ t0 B$ Q
; v: N8 ~- R( v- ^$ `Code:% m. {+ U9 m9 {: z. H
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) X6 A2 u( Y) c8 g3 R{
8 g, P1 D8 Q$ ^        DWORD nId;# O, K" ~" S1 U5 _4 A! Y/ Z
        int nPart;8 s' q# h& n4 a( {; D
  C7 |1 l+ k$ a1 ]
        ar >> nId;
1 ~# L+ k3 a5 O, C- p  x2 C0 f$ X2 T        ar >> nPart;                ) q, ~4 M4 j- [& g, J2 D+ ^
        % l  o, l, w6 A3 F4 \) Y- o6 B
        if( nPart >= MAX_HUMAN_PARTS )       
0 p8 Y/ f1 l9 T. a& ]7 i$ |                return;
$ I) y" [, [* _. b0 J; R
* b3 k0 l8 c4 _! ?& O( ]) S        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  X# ^( P: a4 O) I, C  h
3 o4 z4 v- {1 I' g7 k

% l' o* @, e$ c# X7 cCode:. [# {* Y) Z. q1 r+ ^
#ifdef __QUGET_SWAP_FIX
" G( J1 ~7 t! \1 x' W. Q2 j4 Z7 A- m  \* b  \
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
) K8 c0 T* y, R1 @                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
* v- H& d3 U- E& H
3 @& m& k' G! P/ ?5 f1 S                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )- q2 G/ }) C4 F8 v; S! e# B3 F
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, r. a* s5 x- v6 T% E1 n5 l2 h0 [' g! [1 m# w" c7 m9 z2 K
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ). a6 ~" {/ q0 ]. T. f# k" [
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ B0 k& q) h0 u7 |7 a# m9 x

( b2 x8 V# O+ {, b6 ~  S; o8 y; b#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 s1 i; C1 Y2 a* T4 p- B
and add under
8 u* c9 H$ R9 e1 Z4 h8 O1 n6 o0 y1 [) `6 `7 C, {0 g
Code:* }4 o$ f. A# W" x8 }$ Y
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 S( u+ \) s! C- `5 I5 I# R+ R0 b
                        {" t$ o' Z6 w! o9 f8 [" B
                                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 );% Y4 T2 ]2 s4 U9 w, M: h- f9 C
                        }this) R" ]1 h/ t0 H$ u- O/ K5 i8 U

8 h/ e1 n  E- K% Y( d; tCode:
* I# L- ~$ T$ `8 ]#ifdef __QUGET_SWAP_FIX
2 N, `9 y( Y' |3 B' K6 k" S' R                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )" B0 V$ x- F8 p  t
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
: f2 X& W* O, f3 d. Y  s4 A9 H/ ?1 j: A2 `' m! o
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )8 e! b. @  W" _7 w0 W0 q8 @, ?9 J
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 Z: z; i2 D9 i# L7 m+ b

! L/ V" D6 {" ~) x3 }9 ^                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )$ T5 `9 c3 W/ q, |4 Z# l  f8 P1 W
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) f* `7 K; d: Q8 Q! w
7 j' r, u+ v2 n7 M/ E  o3 A
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # t; o. j  O1 q0 E

' ^, \0 U9 h  ^# ?6 s8 m# e& }( q7 n% b

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-3 02:00 , Processed in 0.111662 second(s), 36 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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