飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16246|回复: 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 * B, O; _" _$ Z' }( m) r9 x
I posted this because someone kinda posted a youtube thingy about it :O.; D! G( P& b  Q0 c# T

. g. X6 a2 i& [7 T0 hFind this in DPSrv.cpp @ worldserver
- ~- J' Q# f. a" h+ N" n: m! I
4 m+ `3 I3 ?8 a  j/ NCode:6 U4 ]3 g8 V/ z3 t
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); ]6 D: j) z( M7 r2 b
{% P5 m! g* E  ^2 G5 Z
        DWORD nId;9 r+ J: N! _' `/ s+ [
        int nPart;
+ y% S, Z+ J- f, b1 T2 o  A$ P  B" V) e: V9 B. V
        ar >> nId;
$ x( ^3 R7 y& l; ]; F        ar >> nPart;                + o* T3 Y( P$ ^3 a! e8 @. L: H
       
. A& W, `0 F/ s! m  H7 S        if( nPart >= MAX_HUMAN_PARTS )        # K) q/ z$ v1 }4 C0 n9 M2 }+ F1 f+ p
                return;
# |& h( V5 ?4 \7 T0 e% D+ r1 r' g9 S2 M3 L
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; R$ r( w/ W0 x1 T0 j: V% U2 v

  _) H& e6 [8 p' H7 K. q" A1 I/ s. v$ d
Code:
4 v- ~% d+ r) E$ @#ifdef __QUGET_SWAP_FIX
; Z# j3 \  X5 b: a
1 x: i' Q5 d7 c                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )9 `; @9 V* {1 R0 F
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
: q* o* a) r: l5 a8 v" H1 F5 r6 m2 _9 S# U) b
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
9 d/ c8 R$ z6 k) Z3 I5 `7 [                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );' p$ X6 K& _1 k8 |

. J( a9 h( R: b. B                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )" V8 s, `; w& B6 q6 B
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. U4 _- E0 n0 T5 [. @5 V. Y8 k3 f7 X
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ a6 g- }4 o* f8 {* D3 f
and add under6 E' u  X% u4 O* n3 k8 D- m( P

' z. n$ d- P3 c! m$ \' s- KCode:3 N3 L5 ]% _8 e" a4 D
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
4 p8 K3 O1 x" {                        {
) Y) F# `2 k1 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 );! W, {4 ^7 B" j, K& b9 F* a) ~
                        }this
8 R7 _5 O, y, W6 w& u& w& c7 E% R7 H5 S6 H
Code:
+ d9 e( w  C5 p- T#ifdef __QUGET_SWAP_FIX# W# o* N( V' S3 N' z9 i# z
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
! @9 l8 M( ?) C- i: s( p                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ z1 Q1 t7 F' I+ ]2 ?$ d5 I9 F1 X0 H  s. c' j& K4 I
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )% P7 v. W  a; b5 T
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );- j2 R4 o. [, r) c3 F
& M. r% }3 M: a7 b6 \" \
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
9 R1 T! ]5 K1 S8 t( r" h! |2 b                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 t9 I( \  E2 i* P5 B' ^4 y- j
- Z  w: k1 X# A# b: k$ H
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ r- k, X( s6 [6 g/ `9 A' }/ {- P4 y! [# U& i( F% _  Q
9 d' ~9 ~7 e9 c6 D. N5 w! W

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-30 00:27 , Processed in 0.063258 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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