飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16440|回复: 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
/ H' A/ n. N8 W9 k" iI posted this because someone kinda posted a youtube thingy about it :O.( q# w) j; W- o5 ?% A5 ]$ N& G3 n
/ a7 M  v3 ~/ q" J% Y% j/ G  `8 S
Find this in DPSrv.cpp @ worldserver
) _( E3 n7 X! a. H! V) R8 z
) Z4 E  i5 ]. U9 Z# {Code:
9 o, M- x, Y0 hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 `% {9 ~$ E7 `
{) _/ c  ~, V) q/ ?6 i0 _
        DWORD nId;
# d- Y+ B: }0 B# ^. G. b        int nPart;' G( V6 R* b) I* ?7 }

5 W( ]2 G; |7 ^' k" |" G        ar >> nId;& \0 F/ b% ]4 ?
        ar >> nPart;                7 g1 ]$ {( H6 g! _/ i0 M3 X
        ( v' l/ j* q$ w$ T
        if( nPart >= MAX_HUMAN_PARTS )        3 p4 n6 @% e  H) o
                return;
& K$ g. m# P0 f( h$ l# F$ R) k9 I1 l+ ^5 E. Q' C9 s' n& s* V
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
8 `& s( K% h9 D/ ?8 Z4 k, H! \
4 [. i, f( W' C5 c
9 [8 n; y8 M. |3 z7 `. g/ ^Code:
8 S( E* x) K- L9 }9 F#ifdef __QUGET_SWAP_FIX9 F6 |! S; z3 F  Q& T/ X

# _( D" K% [, e% g                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
+ b2 n! X2 n6 t                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, B* g1 \3 f8 {# `3 R
3 r3 B; r: `/ j5 E$ P% \6 e" C; F                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& O. Z! S1 W  u, Q! [8 A
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' A$ U9 _& N9 c0 B7 I
& R5 n! ~% B  [6 O, t                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
* K; x# j' p" J- i6 t                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( l4 D7 @, E' [1 p' l, n* ^4 b$ f2 b- }0 b0 ^6 I
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 S- M9 {4 w# q3 M3 J
and add under( A+ m9 {5 H- s7 }1 S3 H
6 p$ z' R1 F# w. g+ x1 {: S: G
Code:
8 J4 d; e7 Z% y# ]- @5 K3 Sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ A# ?0 y+ {! P' O% S! j2 ]* r, R                        {5 p: _* p9 W* w$ E- `" _) S- q
                                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 );
; N( F5 \1 b: e5 f4 I                        }this& H3 V5 D& g: V  `
: \% _- L) H2 ]7 _$ d# u2 s* H; Z
Code:
7 M7 a) F3 N: ^#ifdef __QUGET_SWAP_FIX
/ D5 e: O" Y; t2 y0 w- q: B+ c' l                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )) D+ n8 {) T; h# I% Q
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 b6 I6 [) _/ Z( z$ o
2 ]- Q8 s, F" v$ b  i
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
6 z5 ^: m2 Z$ p- }. Y  h( R0 K                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! ^2 D8 a2 M& V( p" Z

5 ^& e# |0 R( C. ~0 l2 b/ n                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )8 f5 [4 a; [4 {! A9 [( p
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' ~- c4 [; o  o% l" v0 o
$ o: s# H1 n& l4 ~$ M" b
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ s% N- r' f& n
7 I( {0 ]6 P+ O9 b4 T4 I3 y) j1 j8 y

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-11 20:12 , Processed in 0.060296 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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