飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16812|回复: 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 . P' A$ ^( D8 I. [7 ~/ y) H
I posted this because someone kinda posted a youtube thingy about it :O.
1 n1 V: W8 W6 G. c" F; N+ Z- t4 o7 y; x
Find this in DPSrv.cpp @ worldserver  Z* x% p5 m. [% ?5 X% `' M& {2 Y$ r

; L- T+ n; o; WCode:3 ?  o) }4 _4 P% r( T9 S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, s+ @( @( A" @) @, u7 X{2 A: g8 C9 E+ f6 u
        DWORD nId;6 i1 F; }. j% y' S9 w4 ^
        int nPart;, h+ k2 C$ W4 j9 u$ e0 B: c
5 \3 ~( J, `) U6 |% D9 p
        ar >> nId;
! `' C0 q6 Y3 S" p0 J6 `6 I6 ]- H! U        ar >> nPart;                8 [5 m1 D+ N3 t# r: U8 [. {$ z
       
6 s) }5 m' f5 d) {* C4 [2 ~        if( nPart >= MAX_HUMAN_PARTS )       
, Y5 f" v* H' v) ]% p1 C6 ?; b                return;
7 e4 M4 ^" r  N6 z& B; j- k9 j9 W' c& z3 z( }
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it  l/ i' ?+ O# n. B) o7 N

- x" e! s3 s" E7 _6 V. y2 U, u, N6 V
Code:- j6 f( M) |$ u, \& a0 t8 B: v
#ifdef __QUGET_SWAP_FIX3 |8 a1 E: ^3 ^
3 e8 M. l! \" T
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
/ ]. m& I' @: w) e4 m. H                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
6 J2 A( ^+ G  R( o' h5 ^& o
$ {. ~; n0 U; g* ]1 i                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )! F( w# }, H3 Z
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ c. @  H4 }( c, l/ b
; W- C3 Y+ r/ Z. _/ u2 V+ z
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )2 H9 \7 g6 T& L! C+ Z2 [
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# v  a6 b! {+ X+ }: H5 F/ O7 r  n5 t/ ^! B
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 i( W% W9 u0 r: R$ E) C5 j
and add under+ }; [2 G) j2 F3 |& R6 ~9 r4 B

; L4 s  b, A# B+ ^* t+ |1 x( u% PCode:! y# E9 e' o! k' p1 O5 C
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& m9 q! L' \# S0 [" U+ ^
                        {
9 f# n1 x! A! R' _7 y+ 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 );8 ?/ n& Z: i7 D8 H' q/ ]8 Y
                        }this/ W; R: u" p0 E$ B8 ~, S& |, k
7 u. \& s: d) Q9 N; Y$ y7 z& L9 |
Code:2 e/ s& {5 X+ d& W! F
#ifdef __QUGET_SWAP_FIX
' N/ l2 g" X; l0 M( G0 h                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )0 \2 x0 s4 ^2 R
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# |" }8 l# B0 G( y* @/ Z
" q; h* p* h9 N4 b                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )& [* N) w% N, G5 g" ]) I# w# U
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. ^4 h% f& y; X; H  y) p
7 n" X* P, W9 Q; Q5 O. E. i
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )7 ?7 `% o- o8 }9 d; D- L& }4 K
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 J2 {3 v% b* w2 ?8 a* @
' {2 a& [; D  O' P6 z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
( Z9 q/ w) q- d" J2 k6 R
/ Z5 t' F5 T2 x. P
7 }& _5 I; {3 x' o  L

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-2 02:44 , Processed in 0.066401 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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