飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16254|回复: 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 + M5 C8 y' S( ~( I* e5 W; ^" \4 e, n
I posted this because someone kinda posted a youtube thingy about it :O.
2 Z* P6 L/ k3 x( p0 c5 l% U0 k8 |% R- y$ V1 c
Find this in DPSrv.cpp @ worldserver7 \5 P0 Z' o: b' ?
" J2 H# K0 ~3 a# Y
Code:
! v' H, E3 E( d5 |$ rvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
  Z6 I) j; s: O8 G  k" e& `: ^{' r: q& o/ J3 }" k9 |, [; n4 |
        DWORD nId;5 p, N: [0 L7 D9 _5 t! [1 L0 \& T* F
        int nPart;
! J3 X( F+ Y( n! M
* B2 z) A* _# w( d9 n2 j  \. @        ar >> nId;
$ @2 I! ~1 c" m% l        ar >> nPart;               
/ N. \7 \) R2 E! J        ( s" p4 C! I, Z* g3 j
        if( nPart >= MAX_HUMAN_PARTS )       
( M# r- G  l; D2 h) h1 t                return;
: e% `1 m! ^+ Y' e( {6 e1 H
$ h4 o& E2 P% k$ F7 |! j7 f, v, K9 ?0 I        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 h9 g" Q  H- s, u
, |8 q8 l% h' C8 J2 Z6 c, ?& m
Code:
! C+ s5 j5 j2 ?  e#ifdef __QUGET_SWAP_FIX
$ R" F6 n4 i6 d; @9 ?
. d# l" G+ \9 p3 ?) Y                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
" a& k: v# u& ^! N, y  `4 L5 ?! i                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, ?& y  V9 r! b1 R7 p- n& w; V& [9 c, K
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
, a; W* s2 l- o* c                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 _& T+ L8 K0 s# K. k/ t6 b

; s( v  r- m. z5 }6 x- o                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
6 e% H6 ?5 T3 Q" t$ O/ F, {                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' X! ^  @  R% {: m; ]' P5 v# ?! s" v% G6 W) E7 l6 @* e
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* t- p  ?7 t; |' F; I" n1 W. n; g: nand add under# C6 `) y: J6 Z, z0 q: x

/ o; [( Z/ N9 s3 Y6 }' J- z* ICode:: j" k3 J1 D6 \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' l+ G2 k' z: p1 |( U2 l$ \
                        {, f: p5 E  _( F  `# g
                                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 );* G. ^* t# O# w& `6 \; ?1 `. A- I
                        }this& ]/ n/ p, k& P! \" m4 N

# P; @! l% E$ [Code:. M" z9 S4 Q& D8 n8 n
#ifdef __QUGET_SWAP_FIX
% ?: g2 m: L. R; v                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )1 A' D" \/ X7 q! x7 c7 p, n- t
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) z! A0 p  t; |1 O+ E1 n8 G4 U* ^! @; Q) T
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
" ^( W; q3 J6 f. q$ u  c                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ F: I$ E% r, ?  K- A; [  R

! ?! R/ s, R7 U- i: n                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
# O7 {5 n3 Y+ [7 {' p5 D                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 s3 U& I0 l, r0 |- _, U, i) i- O6 m
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- S) c) R& w2 B) q# o4 c: `" E/ v% Y3 I$ D4 `1 n1 W
) _. x+ g% m* R$ j/ i+ y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-30 23:58 , Processed in 0.063058 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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