飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16454|回复: 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 , h3 X: H5 F: }; \# M6 D! N/ \
I posted this because someone kinda posted a youtube thingy about it :O.: ^2 b1 a) R. i9 b+ n
( x( s; b3 q7 f* J
Find this in DPSrv.cpp @ worldserver! V; d- Y9 n  \4 k+ [9 }
9 C3 c, {$ }- ]
Code:, J' ?; B: L) I
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 K5 B0 Z+ Z4 y- A/ J( M( L, Z{0 C0 T$ r' \( E& i2 i1 b7 d
        DWORD nId;
' w. T7 [  n; h9 n5 `; [/ e        int nPart;) E+ _! b8 L' b: I& d, h
! M2 b  M/ K4 w. l' F+ w" a& k
        ar >> nId;) r% d+ k7 [  m/ \3 N
        ar >> nPart;                ( E, j: X, ~) k) |5 ^& z: L% y
          S1 ^7 X3 C* p% o& ?" e: I9 [
        if( nPart >= MAX_HUMAN_PARTS )        $ g# K5 _; I: S! P8 F3 r
                return;5 E8 G6 X: u5 A" h
, X0 \0 S9 R: V& N( Y, A8 D5 @
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 L% g7 ~. W7 Y+ u' t8 P6 b# ]# y
! C1 x4 Y4 k$ Y9 G5 W9 j/ U  b3 C8 \5 e' ]! j" T. G
Code:
) J- a  h. F* w) L#ifdef __QUGET_SWAP_FIX
+ d, f% @3 q8 W$ `* r2 {8 I  K+ c- E" ]' ]; ?' P
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )6 U( @: P, M9 L- q4 m) L5 g
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
" r& {' ?6 m- H/ R
3 `( x7 K+ d" Z+ L& c, O                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
; t* P+ P+ y( u4 O4 \                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ k3 i" H2 J% t3 n
. @  Z7 I- f* w  z. r9 M" n, c
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ), C1 s" n/ Z" p6 a/ G( n# w- l( @* `
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' S$ @: |8 {' E8 Y! O/ Y8 S
4 H! Z! ^1 L% n2 R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- F6 Z/ S& [( i1 q
and add under6 T- R7 T$ n. P! U

" U# r9 i0 H5 K& S( {( P# `Code:8 U7 R+ z2 z+ Y! u* P% u
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ v) a! n; u1 [/ J* r- ?                        {
2 L, [% W* Y- h" {# 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 );
/ I7 a% Q5 \: z! _+ n, O& e; v0 Y                        }this* D8 b, x& V+ A' Z

9 s! d: Q/ X; R! P! K& V1 S: v, ACode:
  N$ Z6 y/ p; J* \* k, ~9 R#ifdef __QUGET_SWAP_FIX
' n% j/ A7 Q! F' Q2 b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! `* _3 D+ E$ t& I& o                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 k  C% W/ r3 j% O6 S  L  e
7 }& |! f  ~" |2 w; y7 c                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
& s+ G$ c6 A( _2 ]  `                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
6 [: A# D! @( e7 ~$ e. e2 |
- U/ z4 Z' F7 E' e5 ~; u* M$ w                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )' u0 D$ K( J0 L4 I- K. d4 |
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );4 G  j4 H, d$ I" x" S: v

7 \* B$ o8 S' l/ d: t#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) D: B$ X. y) a* v: f+ u& |

# J! c4 [/ N" Z( J1 j% j1 K7 l# L5 o7 ^; l

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-12 12:20 , Processed in 0.064311 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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