飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17154|回复: 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
/ z$ {% K6 k9 m6 F) ^# vI posted this because someone kinda posted a youtube thingy about it :O.
- B( ~+ W. V( T+ n
# q/ Q( S5 \" q4 r$ M- h+ SFind this in DPSrv.cpp @ worldserver
. N2 N: F) h1 N& {' I7 o& {
& W6 S0 W- G' z7 Y! NCode:
3 U2 d7 `9 \; {7 q5 h# Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# ^1 L$ c9 X* ]& j{
; @7 Q( [( N, I        DWORD nId;
4 @7 `3 \1 t* x2 @" {; x        int nPart;
2 _' u% z  h9 G% w, S! E  k+ R* s( V- n
        ar >> nId;+ V) A$ p9 g: B( K+ _. G
        ar >> nPart;               
  g4 N' B, u/ X; m0 K8 P8 B        3 O5 }6 X5 x, S5 H; Z7 b6 c8 Q
        if( nPart >= MAX_HUMAN_PARTS )       
# K1 V* _$ ^' S, L                return;
8 {' Y6 u+ [6 B3 P3 F7 E0 ]
- Y" b4 v, l) e1 f. v; a: l        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 z- r( X6 e5 H0 e/ r) l
9 D2 }! }9 o* e( G' l$ M& d. b- Z
Code:
/ r: S6 Q1 B" C- l* d7 ?  |#ifdef __QUGET_SWAP_FIX" b( P6 s: p# U- B# |0 f1 I

; U/ F' t' U+ D/ [8 j8 [$ I                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )! O1 s9 ~; |2 l: I  |4 U3 s
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());* g- l7 [( j6 U0 k, h2 }

! Q5 h0 l% g  @1 `. f                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )3 U# E/ k4 ?  @! M5 T. D9 U0 Y9 x
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );, ]# A. }  B0 G
/ M' }, W8 B% ~/ v5 B% n- H
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )$ M& E; _) b4 D. ~4 t
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ J- g  \1 D. K" s% t

) q/ {; W1 }7 B& z# ?# ~#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 j7 K, @. l! p) n7 b1 jand add under
2 z7 O$ |" K0 e3 m
, ?, }1 ^# Z6 c' n* P/ N: QCode:7 A; z- O" u$ H7 Y1 S5 A- b! h0 [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% \( S$ o* ^; r, j$ J( h
                        {
2 @! l6 k! I6 [1 V, @                                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 );
! o) ~7 _6 K( m9 J4 Z  e6 e                        }this* T6 O& `  S' u, @9 h, U

0 s! `/ A1 i0 v) yCode:8 y6 x* y: t* D( f
#ifdef __QUGET_SWAP_FIX# B! |$ E3 o( `2 A
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
9 E/ O8 u& \1 V                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 E/ \( h+ ~$ J
, G. [8 W( g- X6 a; ?2 R# Z
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )" r3 \0 F. k5 w: e8 ]0 S1 P6 P
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ j, p4 [- [3 j+ o

1 X4 ]5 u8 r7 B' \                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
- t! c5 P3 ?5 |                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );, \8 |, @1 n+ A
2 }/ O% V5 O" r2 `( p* W. m0 f( s
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 @" i) T+ U4 w) A, ?+ d
$ |9 o3 T. a6 c) @' o4 g% e1 r" k$ [( ?- y) h

相关帖子

回复

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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