飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16425|回复: 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 & B3 W) F) C0 ^% F3 A1 h, h, y
I posted this because someone kinda posted a youtube thingy about it :O.! [) Y  N7 j1 s1 N

# V" e7 P/ k" D. j! T3 }% FFind this in DPSrv.cpp @ worldserver
8 _) a" s  o+ ~' @) Y! ^4 W: f' f1 u9 \$ S8 n7 m( r
Code:! Y. Y# J) p( P: A& A, f& R
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( S) q/ H) Y& f' X1 t2 h( k
{# O3 P" L. M# |0 @+ o0 U6 r) X
        DWORD nId;' Y+ h$ O  a% D: c/ o3 @9 t
        int nPart;* [8 b1 O2 n* b8 ?6 V

+ Y6 }/ m# G* s6 \        ar >> nId;
" L2 W: j3 `7 m" {1 k4 \. }        ar >> nPart;                7 k% V3 B! b% @- p' _2 D
        ! P% p0 u6 y: |7 I
        if( nPart >= MAX_HUMAN_PARTS )       
- M" M, g" H6 \! D8 f( `6 s5 {) h                return;
5 Q" U& Y$ ?1 G& l- p, [5 L* G5 U! ?; b* d/ z6 N: ^) k. v
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! m% k( _% u8 e9 a. l! [6 Z, D6 X* h  }/ L) m8 G; [
  \8 d4 ]- G% e4 g" ?
Code:
+ g. u0 N% E, }0 a#ifdef __QUGET_SWAP_FIX
, I) `: G. p9 K0 c& q
. n/ z* n( R( |" y: a                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). `/ L4 W7 q. T  W+ K0 _8 \
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());& `) t, M% m. @1 V
- H  o' p7 Z) m
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )5 A. V) x! B, ^1 M; d- M
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 y- v: }+ _& d1 F3 H
1 x9 `' w6 i- k* Y! O; ?                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )- n6 \2 k' }, @* K7 C9 h
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' h8 r" W; j! W( R4 ~2 B2 N' x
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: a' U6 o% m' A( F2 ~and add under
6 L+ z( ]4 x% c0 \% q+ P  h8 I
% _' ~) a# l0 ~) v6 M  o: O5 RCode:
' u: C: _$ w$ K! S7 H) Kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ E) \6 f+ g7 d( _, S; H
                        {$ d0 t9 R' w  o
                                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 );
( b5 w8 r) h9 ~( {/ c                        }this
; o+ r$ I% @. `0 g- e/ B( ]) e1 \* E5 s: z
Code:& Y$ F$ |( b& e# R1 l' M: H
#ifdef __QUGET_SWAP_FIX
' t6 R# r6 ?+ _8 B2 M# w; M, M: G                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )# f' ~4 \" C4 c" i) b* z* \7 `8 y+ _
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, `; C: S5 n' q/ C1 c6 e0 T7 p

- ?1 G6 }) D  `7 M                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
3 S( D2 x! q  c4 G& V' @) [" `, e                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 j# G+ B; W) q! W8 {
3 I+ y, h# v- L6 Z+ P5 [
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )- G  n4 y+ U0 m9 c
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
4 W& R5 _: `0 O9 g: B( I4 ?$ p/ ^0 J. n: h; Q8 g2 _
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- e* b% ]  [; A& e: o: N/ x  Q
  J; H& i# Z1 f$ \0 J4 j. u1 {/ d4 N

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-10 22:15 , Processed in 0.060135 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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