飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16299|回复: 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
9 h3 \( k; w+ p* TI posted this because someone kinda posted a youtube thingy about it :O.
7 _, e7 p& s! {8 G1 t/ r0 b: s- u+ }& p( v
Find this in DPSrv.cpp @ worldserver- D. y  _+ j5 T7 W: G
! p. u: Z& B2 d' y
Code:
6 O/ q% T9 ^3 `. e( i0 h2 Fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 e4 ^+ b' o3 m" w/ O4 n{  t) S3 N' u) m$ R& h$ i4 z/ h7 U
        DWORD nId;
8 V# x$ T" _* X0 C( v! ~  r( \6 s        int nPart;
% s. V  i* i% H& |$ i1 {9 V/ G% Z' t" ?( g% y2 N
        ar >> nId;9 Q  a/ O/ \' C# T, h# A6 o
        ar >> nPart;               
& |( u& q$ q9 o+ k& H       
- z% g6 C3 y2 n4 N/ j9 }        if( nPart >= MAX_HUMAN_PARTS )        0 ^6 ?3 e% ~+ @+ H+ U% \( W
                return;! V6 P) x% q0 D3 i; @8 g9 U
' T3 b2 R8 y: {( D: E
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% P- @7 ^/ B' K9 l; h

# a4 V4 t; Z1 |7 A+ n3 F% A
2 J$ V$ D5 d  k! U4 MCode:
! h) V1 F/ H5 P" X0 j#ifdef __QUGET_SWAP_FIX) q; ^. `$ ^( a
1 U0 @4 n: r& S' t* n( S$ R
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
1 N0 x( P1 z( l, y" Y2 B                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());" A  L  O9 i# @9 f& Z* Q$ B- ?, I
$ H7 v0 S. `5 H, }% ^
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
- r! j3 Z4 K6 i) e% T                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );# p- b% i% z# ~7 e* }- z1 B

7 p$ c" p; q& V7 S+ Z                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ C( p5 F4 z( |" @
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 m' `2 e+ ?4 I" U6 A; S' v* ^, {; {$ A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' w6 H0 v% H6 C6 Xand add under
; O* Z7 e* K) t* ^
, G0 D* ~6 H6 t. B2 P  BCode:
0 O' ~6 `* r- n$ r; U- hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 M. ~1 E9 I4 z$ O# [# O
                        {+ j5 I2 P5 c* e. P/ 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 );
$ Q( |) o1 E2 Y  u9 g                        }this
9 Q' v  n1 }5 B
7 a- i* ]5 q* z  \" R7 aCode:. W2 Y2 l2 C3 U
#ifdef __QUGET_SWAP_FIX7 O, F$ y8 c8 P: x) w6 G
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )5 G5 g  t& C  y5 B2 R/ o
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# t% k3 @" s+ g1 _& }4 K; s
* a0 m4 J8 v" I* U7 F6 Q# H
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
% E9 ], n6 w0 ~. j                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* c# s/ e+ w2 b/ X' _
) @( E" w) [, R/ K
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )0 e6 l' s; v1 m5 K  c( Q
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 `+ l# e; @! L7 X) K9 p/ ~# u2 P% H0 z) R
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & p* X- o$ Z' @+ [, `( c
* @4 z; N% T- N, L8 m& P

: @, u* c* z. M1 F) D

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-3 15:42 , Processed in 0.061813 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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