飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16824|回复: 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 3 S, l4 P3 c/ T* p6 y$ h
I posted this because someone kinda posted a youtube thingy about it :O.
& A" {  j4 o8 m" ]# a
! u& t0 b( U0 b" q/ O  l" `. dFind this in DPSrv.cpp @ worldserver. f; P' _. m8 A1 o, m

) v1 M7 S# A6 P8 B2 JCode:
7 s% B& [# p4 {4 y) j' yvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 l. r+ R& @3 q) ~( A{3 u! D* c" l6 b6 i6 F
        DWORD nId;, h) [+ a! W2 A. }5 ]) V
        int nPart;4 r  q; K: z8 _" c) T. N0 a& i  Z" h1 n# N

: @( H) Z, i) H7 }) o5 ]: v        ar >> nId;
' _( s* b9 E3 _( o" J( e4 X' `& G        ar >> nPart;               
" g& `- y5 a$ e6 ]0 r! e       
9 N% Z" A3 W& g8 Z5 Q        if( nPart >= MAX_HUMAN_PARTS )        & _9 a9 }9 U5 m  N( ]3 _
                return;' V0 @4 g# v) H9 j$ i6 V$ w
2 |8 R, ]3 h. R3 }
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it) [# s& G4 }9 c4 J1 [2 G+ z
  Z( @' |2 }0 V

: S& N" S# w: gCode:2 o, u* y9 x% k
#ifdef __QUGET_SWAP_FIX
6 a" |. [8 g8 o" A$ h
* Z  Q1 U2 v6 B, Z' P$ H' i                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
: J% `/ Y: D8 j9 B2 f- q                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());. n& B1 a: ?0 ^

# C" x8 X/ ~5 X/ {5 m" ^                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )( u2 ?7 {/ n: V; u3 S# ^. m: n
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& ?# ?; m, D* o: s; v5 V1 M- ]
2 A" j/ p0 }7 P                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )1 X' H! }/ x; I0 \' z
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 m$ M" p) e, A; \2 t+ {0 g
- `- ~% [6 A6 ^; q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: t4 A, I8 Y; T4 C  L" r3 N
and add under
# a5 c! h5 S6 j0 {6 X9 a+ y6 W, ~# X8 D) N9 z& S3 q! v
Code:
/ m; e/ a2 j+ {. v& M; rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& x- a# q3 e! M% [
                        {1 L1 Q" F# f3 o) @$ m' ~
                                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 );
. ?, I0 `$ S: m; }" m! B' ?; l                        }this
9 j' y$ w) x- f) z
2 f9 T  p' R' X( J8 @8 CCode:5 j% z3 ^8 w' O6 \& P! I
#ifdef __QUGET_SWAP_FIX
5 [& N' ~  R9 [  ^& S) A" \                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )( X4 x6 x% Q$ A+ I& E$ n3 J
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 w$ O' r. z. V: q& b# M) r  v5 h

6 a; T. c5 d: N  y                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
% }" W/ J1 c! S; g7 Q! S0 H                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# h2 i9 [, r( N1 Y+ C
7 G# N2 ]6 t: _; z/ \; V                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )7 T6 \* G' z+ v# h: u9 t! W5 m
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
- [  a6 {" F- b8 W: a* `4 _7 ?  d2 X" n" Y) \; O+ l- X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
; d3 k0 A9 l; N8 H! ~$ V! g1 R
, T7 w: [* {5 `$ f
8 [% r. h) a% j5 u8 s) J8 D& m& u

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-3 02:20 , Processed in 0.075137 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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