飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16269|回复: 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 i7 B5 t( y) CI posted this because someone kinda posted a youtube thingy about it :O.3 p& z  _: i7 |( A
& @9 l! `# Y7 e6 @
Find this in DPSrv.cpp @ worldserver
7 Y2 U% K8 b: K: x
; W2 X2 S  }: g1 m0 y! vCode:
+ w" z1 r2 C" \( @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& K! }+ M% @* M% r' p% k: u/ m% F/ s
{
  f* ~7 l: D3 L- {6 V! k, U1 p        DWORD nId;
$ O/ X6 ~5 O; B5 N4 W        int nPart;
/ z3 t* t: o/ [" {" R2 B( \& b) w, A; L# u6 g7 u
        ar >> nId;
$ A+ y" t3 r3 z# e. D        ar >> nPart;                9 l3 K) Q2 ~% y! t
       
1 ^8 c( e# |: C( Z* e' c        if( nPart >= MAX_HUMAN_PARTS )        ) _+ ]5 @' v/ Z
                return;: a0 c: t) _5 ~& E6 S
, v# Q0 W% y1 G9 P3 y% q
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
. G* ~: S2 E" Q8 e
- x, b7 w) L  X7 t  L7 k
8 }/ G7 C+ f. H) YCode:
4 b, J7 q5 s2 O7 T5 U& y2 R; z#ifdef __QUGET_SWAP_FIX
9 T% A; S& y+ i6 v) a' N6 g! t
! H. c2 t7 V1 g8 p/ R) A/ ^$ `, f                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 Q- M) }' p# x/ h# G! h! P, }                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, V- R6 M2 j( c$ e' W2 g2 a$ P: l3 `
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. s/ J% Z9 q3 X' b                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 i! k* q; m* V  x  W  L4 l% {1 g
  U) v6 F: G! r6 k
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
- h9 p  u/ ^5 t                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% N+ H' x3 E; A' J( A. U8 w- [+ i; r6 w
1 |. @) u( Q0 }0 L4 U* H#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# q4 d# h! h! `" i, ?and add under6 y3 `. X+ v+ `
1 Q: N: u& O/ G6 H3 B2 B8 I8 b7 m0 T
Code:
2 k! w/ ]! u$ q- _if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 [6 t& `3 Q" a1 H  Z' |
                        {; ]3 i" \+ i7 s
                                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 );2 R. ?8 C4 ?+ e4 H/ d% t
                        }this
2 Z+ N8 l$ R/ V' i% w: m9 D1 Z
( O+ R1 H  @$ ~  N! w# I, @Code:
$ u7 _$ k& [; R3 R#ifdef __QUGET_SWAP_FIX+ N+ h8 p4 Y. b3 X
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )# L( E- q  h5 J4 m9 b: n
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% T3 p/ s) V+ L) m
' M7 X8 c- m8 h! X/ P( |- o0 s$ ~
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
5 P+ Q) C! L, G2 V, b: C/ n                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 \. U) k2 g( R$ x+ T

% ]1 c/ }- I+ v' |: Q                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )/ X; z" f. v7 @* }
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 c3 m3 `. q! K. A: V
- H& e  V7 J/ I% L* p) b! Q1 J
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) m! B9 n4 S( a% J: n. ~

5 H5 U/ i" s8 q  s8 ^- ^( ~6 ?9 F8 B. U9 N+ b! h

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-1 21:15 , Processed in 0.062684 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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