飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16409|回复: 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 ! q* o, }) X3 p* @) X
I posted this because someone kinda posted a youtube thingy about it :O.% V- U& `+ o: h6 @+ O! t

9 U' W; O4 v6 g& J5 t, H; O  dFind this in DPSrv.cpp @ worldserver
, c& q% ^  ]2 s  l4 I8 r; C+ f- Q; R" y( B4 B
Code:; F: j2 P. `$ Q( S' L, c% L
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 Q" P+ Y$ D) V3 G  X{8 B7 E5 P" H0 I
        DWORD nId;$ R3 K9 b7 g! g+ k5 h: g: M
        int nPart;+ G- P4 i! S5 s+ K

: p& `# P( P. }        ar >> nId;
. E* _" R% {, J1 Y        ar >> nPart;                9 S+ g1 ]" B. K! b9 `0 z8 f' l
       
0 F" [% U2 L3 }9 x7 g        if( nPart >= MAX_HUMAN_PARTS )       
" Y5 g& H0 n' _& w' T& C+ Y0 n                return;" `- e* o& o$ g

$ J5 B& j% i4 E- d+ G$ l( \        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) Y! w+ I0 E3 F" J* c7 v6 ?) l
/ F  A; ?3 }4 T* o+ b( R5 o

* ~; q2 {. G6 P% a0 ~: aCode:
; |; ~/ c. W# z# b#ifdef __QUGET_SWAP_FIX. p: q2 G' x2 I" S
+ P/ N) n) l% V4 y, |" T- W
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
+ a$ E; E. `0 L& i9 u                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% Y/ F! c" d& j, ]0 b; w* D: z  j5 O: O/ S
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
) Z# U( t' ^1 N1 k' S/ S6 a& C                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
$ f, I1 \% S7 W. G( ]9 i3 d8 Z# m2 u* l: I7 |/ [
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )& x, o! {9 H( `: m
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 _; J- @2 ~9 b: D; A0 W
, `7 A) i7 L4 ]% c- h#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 `( }! j! ]/ f+ P; l+ @
and add under  x; D4 ]6 B1 E. k
" @# S7 r+ y1 ^9 _% V  i: G
Code:
# c0 P  a& _+ cif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 }: b; q2 P. Q& J" G. r
                        {" W0 e) ^/ S% {; N# E* x  e
                                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 );6 @- Y! h  @& d7 c+ j  M
                        }this* a% a9 l( n. f+ F, I8 f
5 p# F$ `1 Y" v) w% X) @
Code:' j  w6 q' X) R& N' s- y
#ifdef __QUGET_SWAP_FIX
! G2 U. V) g+ W  O" F                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )3 n/ M# Q$ _# X$ Y' i
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* c5 p% K7 l1 Z% U/ o: L! N$ A- |; \+ P# i* ~0 E* p) @5 p
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
6 k5 H0 @- \6 F' d                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
& U& h# z, J! }) u5 `1 s! R7 }9 v+ I7 Z" {2 H  v% b
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
, u) m7 t+ \$ v, g8 m& n                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 Z6 B3 X3 h6 t1 M. }$ C) _
. C& M9 u+ z0 N7 ]
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ }, @' {: j$ [/ z$ {6 |. r" ?2 `) O9 S3 ]! y) q( D
. ?+ I+ b8 x: w6 L5 Z

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-9 22:53 , Processed in 0.096121 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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