飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 16558|回复: 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
% K+ v9 O4 V( U$ U% O) k8 T9 Y  hI posted this because someone kinda posted a youtube thingy about it :O.$ V/ Q9 r- i* S2 F& O0 u$ k5 H* M

/ h* |* r; e! P' cFind this in DPSrv.cpp @ worldserver
% ^6 d( [4 p5 k8 u3 F6 W; u* [/ {3 o3 u+ {
Code:2 g. r1 N8 Q# `$ x' S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )6 V! ]1 o1 z: W4 J5 f9 c) k2 `
{9 o8 y! Z' b  h8 _  o
        DWORD nId;) z/ c3 y1 D" S. b
        int nPart;
6 \. y2 [$ m8 s" y
7 c! [- g) r0 g5 ^! M6 ]        ar >> nId;  T4 ]! w1 y  {* j3 @: V" {
        ar >> nPart;               
4 p! W- i1 c6 Y$ P/ o8 _6 ~7 Y        & k8 u2 c# F* B) Z7 C' g8 b
        if( nPart >= MAX_HUMAN_PARTS )        ) y; V% V* S; T
                return;
1 V1 j: I9 C: a6 \3 A
( o1 D, U+ S( X        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 L+ P* ~9 R& k
- w  B* |% x+ ]0 n" y. x0 Y2 l

) Y, ?; k+ Z# h0 r7 LCode:( e# @4 T& P) [& U! h% }5 ]; f
#ifdef __QUGET_SWAP_FIX: L4 o7 z- T+ m, z- i# }' X
0 f" q6 C, y1 W' q2 f3 h1 @
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
: L% c* W6 c0 a, B9 I! j# h. J                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 M9 E7 r: \! [' h" @. y4 W1 h/ M3 m: G. q. W$ F6 J1 [
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )5 l2 Z6 P- {# X; F0 i4 x+ y" n( `
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 h$ \# v/ \. Z% a% h0 J# {7 W- u/ F
! L; b5 Y; @2 ?9 q! G+ j  f                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )/ C& o, r4 Z6 X5 F
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ A" i" {1 y' K
0 n1 h/ E& f$ B5 {7 |2 l$ d
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
$ P4 q  x. Y) M& p4 }9 ]6 Tand add under
3 [0 g/ i1 r( e3 C
2 c7 [7 h2 m2 o- f0 V: RCode:$ c7 i# A+ I1 ?, V) m* R
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
/ u' Z  V4 i' y! I5 X$ D0 m+ P                        {0 I5 d6 Y5 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 );' M# F! Z% [+ e' @2 \
                        }this
1 T8 o* u5 K( |- e
' j- w4 s& P7 r. y* kCode:8 q, s! K* J/ V5 u+ T" }8 r4 Y
#ifdef __QUGET_SWAP_FIX
$ c* T0 ?1 ^4 M- x$ `( x                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
/ H! i: d- |$ l0 W; z9 J                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());# ^; W  S5 o: |' j

/ q% C  P4 Q6 U- K                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )' G( e2 T: x1 Z7 Q; H5 y2 m, e& J
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
, c) o- t) k1 T  Y' g9 l* ?% H% F; ^3 i+ M- o' e- J6 m
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
! {7 D3 S" W) G+ L0 f' u, @                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. L. D( ]7 w' H3 E1 b7 K
1 x# o5 G5 V! c9 P! S, @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 U* l1 l6 L: i: A
- H9 H- F1 W# Z# C. L+ {
9 B/ }# [3 P- R$ t

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-12-19 21:41 , Processed in 0.060755 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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