飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17399|回复: 0
打印 上一主题 下一主题

修复交换错误

[复制链接]

197

主题

203

帖子

1094

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1094
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 ) d& C" C, q- A: e
I posted this because someone kinda posted a youtube thingy about it :O.3 q2 h8 ^4 \4 N

  x8 K1 e, N$ I: i8 IFind this in DPSrv.cpp @ worldserver
& V) M+ [) B! M# S  O2 f! [/ G+ F3 O4 g  l  `& m; _& K
Code:8 P. R- [6 i* j1 y; m
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )/ i6 T$ b8 d9 j2 T7 |0 a
{
7 Y' Z" f; {$ @6 t. Z8 }2 L; _: U        DWORD nId;
3 h4 X) p6 L! G% t: L        int nPart;
7 N7 t$ j* V9 b5 `0 h: p! ~
) V3 W" l( \. C- d6 z& W        ar >> nId;6 c: C9 s1 L; n) ]
        ar >> nPart;               
- h; C' u: x7 K! c- d" o% P0 G6 p        " F; y6 [$ e; q% y& Y
        if( nPart >= MAX_HUMAN_PARTS )        , x1 q- Y* W( |/ V* v/ Z; R
                return;1 [( D. p& n5 F" F, J

; D8 ?" ~" T0 H        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it8 l( \. L& U6 V' S1 N/ P

; }0 g6 x5 M1 ~. Z+ |+ e1 Z' B: Y2 k* G) o# A2 q" @
Code:% K- ^1 B3 \7 q% I0 w. }7 ?
#ifdef __QUGET_SWAP_FIX  |1 F/ k3 I" w

2 D2 G0 G/ q, D2 z: F; T5 f) w+ g                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )0 Y' r, Z" U( j* R+ h" D
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
& c. o" S" {# a" w7 ^9 B% J* _% `  P, t2 b
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: I5 a& L/ j. L* K                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! j2 V1 a+ W+ k' q- V+ g* o0 D! S. P+ I) h
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )4 I2 Q% C/ D) V& N7 ?0 P
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
7 n. n4 V/ b) o) Q7 K  ]5 r! A4 }% U  @, X7 k
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- v3 C; g* H; s/ Qand add under& o" `2 W$ _+ q; K2 l/ J& E8 H
1 a. g" d" P2 M+ j% }4 _0 e
Code:/ A: \+ X8 C! V0 P- J
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
  p9 e3 e% o# w* G/ [4 {                        {
* m$ g# L1 b, z! ]% u5 r2 F" G                                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 );& Q2 U" y( e* j2 @# p4 x& o2 g
                        }this% _* e2 V9 q/ e% N
& S7 h" M: y: d4 G! [- L* G+ g
Code:" P# t3 h+ M7 X5 }$ ^1 y4 H0 H
#ifdef __QUGET_SWAP_FIX
' S+ F* `4 X: n3 s7 Y* |; ?                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; v7 U+ t5 m+ r) y$ v                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ Q; H1 [# o3 F/ y5 l
  L3 b6 h9 u4 @( C                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )4 ]. i2 P" H5 _5 g. K8 Y- z
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" X* f0 a9 z9 b

0 ^+ f& d) }" |! F                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
6 S& [! [; s- q( S) v4 |, F, c                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# [* a7 l2 B" P+ [8 @; J3 J
4 Z- t1 `+ u5 n( y4 B#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& c# \5 E  A( o% L* T, Y( m% B
! ?0 X" m' H- V$ O% E! u! X9 v6 W/ v( b% B

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-31 10:49 , Processed in 0.077295 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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