飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 17396|回复: 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
  ]3 j4 s, \7 g' `I posted this because someone kinda posted a youtube thingy about it :O.+ ~& Y: `( P3 V% W* n, t) N

9 [& q1 c, Z  S( wFind this in DPSrv.cpp @ worldserver
3 Q9 T+ b& j  {5 _% Y, c0 A. d! T3 H8 w0 l
Code:
( d8 a' [- [. _9 ~4 \void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 u9 L. V6 S9 B1 C5 o1 d1 ~1 U
{
7 D, X, I/ ?0 h  c" q" q        DWORD nId;
% E5 A  w2 P1 m  g* K5 A" |  e        int nPart;
6 u, y9 M) ^2 j! T1 x5 N1 a6 J, m6 D( h+ }! e6 U& v
        ar >> nId;5 g) P1 I. n0 q8 d; ]
        ar >> nPart;               
  D' v6 W# j+ X( m        5 a2 p' t9 l3 K. h& U" d
        if( nPart >= MAX_HUMAN_PARTS )        ) [7 ~8 P: S0 L
                return;( S# ?  c' f& O# }4 D) ]3 J6 v) ]

& U4 s# V6 X" H1 t+ z- M6 t9 _        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ b; V0 D: q& o$ f, v) b0 O; E
$ ]4 }2 g6 g4 j9 G0 O6 }2 k& ~% v% r
1 h" ~9 _# I1 v- f+ c9 M( ^Code:# J$ {: |4 r% i7 j) w# ]( p
#ifdef __QUGET_SWAP_FIX
4 B: g% H* l# q' ^4 l
$ O/ Z! T$ C. h                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )7 P# N) J+ [4 z# m/ Q! U
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 p2 O, R& [( F' y/ f/ s5 m  j1 B4 J3 M, O; o1 k& Y
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
/ c3 E, a/ s: Y+ P3 ^2 g                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );/ J5 c( T( l  q* ?0 T( }" E

5 u' m; y( |! V8 k* Q" d+ b3 g/ I                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )% S" m( j' ~& u8 t' D% B) p
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; e3 w5 Z' T1 H4 s7 `1 J4 X
/ m) _/ ]1 K& g. z/ ?- q, L$ e% k#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp- ]' _  L  S5 h* A6 l) y
and add under; ?2 l( @5 J# @" R5 |
4 ?; r" A+ j3 G: a
Code:
5 T% M5 l6 R" h- L: Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
' Z" Q1 g5 y  ], Y                        {
$ B0 h5 r' b4 I. u" `' }3 S                                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 );
( p( ]- t4 V" Z2 O, I; P$ S                        }this" A, s( |$ D/ y6 P4 a7 b3 i

6 N; O/ J/ P( _& P2 n& A2 C' |Code:
1 {$ n: a% J" B. A& c7 N, Q7 c; {5 ^& \#ifdef __QUGET_SWAP_FIX
* f% t- a# v& U1 k* i0 y& A. V( u                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )8 _: N/ Z' l7 d4 G0 F
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) _* \* Z9 l+ ]2 p! Z9 h) m
& p5 o# ?& I9 x. f; x                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )/ l6 ~8 `+ \+ i( ^7 i
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: n5 g5 ?$ _8 Q6 P7 N# s

  C# S' W* V1 e; S6 f/ H2 ^                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). m- b2 x) Y8 O- z- k
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. I* \2 x! t; f. m& n# N; T/ H+ Q% a7 `8 j# Y% Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . [' {: n$ t, w3 `( e

3 F- V$ |# G% P3 D4 a
# H) ~$ M- J0 |; |4 u7 J

相关帖子

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-1-31 07:27 , Processed in 0.076758 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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