飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16781|回复: 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   m) v8 |, a3 l5 Z
I posted this because someone kinda posted a youtube thingy about it :O.
( [, w/ Q5 c% U/ {
+ t9 u+ s! V. ^" P9 S7 VFind this in DPSrv.cpp @ worldserver$ |8 n: p- U' M1 V4 p, s3 T+ q0 R
- N9 h% N+ @3 G! O" p5 A8 t
Code:
9 T' H, \, S1 r- gvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' h5 q  O2 b& y  s{
/ m; u$ k+ x& G/ b        DWORD nId;/ \. b' |. ?. @2 K
        int nPart;
0 q/ W: w* V' @" |6 C
% j' t" T: b. {2 r  N( d1 [        ar >> nId;8 J3 L4 t' T6 ]8 L0 Z
        ar >> nPart;                " Q; `: R/ O. U; K2 s# x2 \* W
        1 y0 k+ K4 Y- f! q+ \
        if( nPart >= MAX_HUMAN_PARTS )       
% @% H4 j: f3 m, s4 K7 t                return;
& W; Z+ a1 f* m4 p; W) L4 O4 J2 X0 j/ e/ }9 \3 c
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: E) _/ h0 x; O. G) Q# e+ s
, T0 F% L* x9 R, ?+ D2 n/ I
- E  h1 k+ P4 g' }4 WCode:
% t" x$ O  |/ g#ifdef __QUGET_SWAP_FIX; @2 [: x6 v* T: v
" Y$ V( g- u1 s/ H
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )0 u& `2 f; D1 y2 A5 s$ i
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());! z# X4 {0 x  \3 N/ M4 Z+ ~* J

+ L3 v$ W2 G/ G                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
# l  c  v) e0 \8 {                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );4 ^' p7 ~. a0 S7 x5 ~) ^
" ?/ w0 u* F3 {3 Z. f9 M  {
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() ): c" H# Q& g: K( V: H' A" ~1 G
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 g# @; S, [9 f! ?3 y+ {0 G
* `& a0 O& ]% s8 y) x; T8 @* f
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp+ ?! a0 r, X9 U$ h# [- b
and add under
& e; T* x6 J1 B2 W3 r
8 d1 [/ y5 {* LCode:# W5 {1 O! S5 c8 U: T. _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 l3 e7 {+ U0 D' C7 s                        {
  N) A* J: f4 ~( J6 F                                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 );
9 j0 \! L( o* |3 \/ z                        }this! C# Q% r" X. r0 R/ S
; k2 h2 _0 j7 M& s& ~7 t" v8 A1 o
Code:# Q: k$ D( O# W% U8 \5 b
#ifdef __QUGET_SWAP_FIX
3 A9 G5 [5 d2 l" \1 a/ ~                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
% G& u* O& F/ E                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ C1 f0 G2 O5 D1 T5 t, ^
. ^( {& Q1 ?* g" \                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
7 o1 Q, l1 ~* h/ B6 ~; T                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 e# H/ i  J1 p' n
8 H- G1 W" H% |$ Z( M# ^
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
+ E8 A" Q: f; V1 a" r: m                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( F5 T; M/ ]" n( ?5 r7 l* f! M

8 j+ i. z4 f0 K+ w' Y' [4 \8 h5 M' Q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + b9 [! u2 v/ x- L7 Y# `+ k$ s. E
" [+ g9 {; a! t+ H) }5 z( O
3 t! G3 L% S% x* C

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-30 16:06 , Processed in 0.063382 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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