飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17187|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1088

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1088
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 " {; J# D, `& W* i- z
I posted this because someone kinda posted a youtube thingy about it :O.$ ]7 P/ |0 y; j: A/ v3 G4 e
7 P% M0 s$ g5 r5 L
Find this in DPSrv.cpp @ worldserver
1 q4 o0 f3 U) v" T1 u* j& L' F
2 Y5 \9 J! }. ^" ?Code:
: M. |' L! [. Mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 W# x$ C- o. Q7 n3 h0 g- O
{- Z* k9 L5 x/ n0 h
        DWORD nId;5 S& j, o/ {0 _& r9 F# P
        int nPart;
& ~' `! ^- o' `" n* l3 z1 j2 K1 Q3 @
        ar >> nId;
8 `" c7 B  }8 R4 S9 U) \        ar >> nPart;               
9 Z* i( {1 o" \* ~" }+ U) N        / {* x! J0 V& S7 _+ C# n5 j: H
        if( nPart >= MAX_HUMAN_PARTS )        9 j! _- e3 f! c4 o  z8 d
                return;
& T* h' u" V8 e) U0 b" e
! j. m5 m* s* D- s        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' J! n; b: s4 X% c  s3 `! c2 d8 G4 F8 u

2 E$ Y+ W, \, r0 v/ A  y9 iCode:
$ V0 d; f! e  B. z8 M" K8 h% {#ifdef __QUGET_SWAP_FIX
1 I$ y9 w. z: A; y) s; _
3 \! ^8 ~# e8 s) x1 _  ~- ^& ?                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
' j  W: V' P" O" M                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
" @7 E9 G: D* ~6 m6 T4 b) X; z% P7 I2 I0 {
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() ). N6 K! n: s6 y% @6 k* B, b2 @% g3 U, }
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 M+ }  [+ e% L$ I$ I5 H3 N2 l* ]% j# d/ u. m2 K- Z. L
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
4 b' j* r; s8 P/ Z                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
& T! r* B% `' @( R4 j" |6 _- I( l% G1 C9 `5 V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ E" M6 u( M% y3 C( Dand add under; V0 H9 Q3 o. ]  a2 Z
3 L( b6 j! [6 w5 K2 g
Code:+ `, |5 M6 O( R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
8 j% Z/ Z- ~% C/ `8 Q) ^                        {
$ b; R' R. S+ d0 i( 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 );, x+ \: n$ ?9 i7 K) X
                        }this
7 T* p  Q( |  w7 J( U
! b! H* {1 }3 rCode:8 W4 R* g9 O. b( o- I! M
#ifdef __QUGET_SWAP_FIX0 g# [6 ]1 x. I, S- q8 ]5 M- J
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; ?- A) n$ k" S1 T% F                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 o* J' _& z8 W0 ?0 ^9 w7 Z
; j; Y4 [* a2 d2 Y
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )1 [9 G6 ^( q% D' h+ X, y6 ?
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% z+ H& _4 g8 y8 ?' c* J4 m; Q6 h4 E9 ]1 ~% a0 n
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 S' E, V0 f$ X
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! c  ~% ?( ^; e1 O3 I& Z

- u; n: ]2 y" J3 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) ]! H. `7 V0 k, ]& f
! W6 `* l, s/ z" r- b6 G
: E& ?4 H# |/ ]( r0 j- A

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-24 05:15 , Processed in 0.109497 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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