飞飞世界论坛

标题: 修复交换错误 [打印本页]

作者: admin    时间: 2016-1-10 03:43
标题: 修复交换错误
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 Y& C$ V9 i0 }5 x$ J$ H
I posted this because someone kinda posted a youtube thingy about it :O.! V$ v4 w! Z$ B* f. O
% K) O/ \! j2 j, I. A6 O, ~$ O
Find this in DPSrv.cpp @ worldserver
% A/ a6 U+ @, [8 D
0 g3 z: M% T' j8 PCode:
: j9 r* S' J: A. Z) tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
2 _' a+ I  O0 R0 g  X{
4 I- _/ k. o' N& v; `, b, R% \8 |        DWORD nId;, i: {' W* f+ l, d
        int nPart;
) R' L) M1 n+ `2 g$ I
. x4 |3 D; ?8 @" _* f5 f        ar >> nId;
: s4 z2 t* Q' }$ A        ar >> nPart;                : ]* N, L4 b$ w4 l- U
        & ]! ^' b/ l" ?9 w7 _
        if( nPart >= MAX_HUMAN_PARTS )        . `9 c1 l1 s. M$ e7 C4 K1 }' r
                return;( b2 O5 ]8 w# M" m8 l
+ F* `: V' G3 O  }. H
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ \) Q0 \- r5 B6 R: v# D/ w# ]! F6 ]( M4 x6 R. |
' c( `/ I& {3 R9 A3 v
Code:
3 J" U7 ~; x8 d, i#ifdef __QUGET_SWAP_FIX, `7 s7 ]7 {3 o

3 J: U5 K. i' }3 v7 r6 ~                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
& K: o3 `: m$ Z, @  D                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());0 z% k( Z- {0 Z3 N- a& H
4 l5 T1 S" Q1 t- A! F
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )/ ]* S0 I4 m4 }: @/ v5 t* v- d4 t
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 M& u5 ]. w; L% P: B

) m. [- q  T% r$ r! x" m+ C' o2 h                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )9 e3 ?. n8 W4 L- ^
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
  s& @3 s/ L" r! O
9 o7 N6 W' d% ~* O* Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 V: D- M  d* ~2 `# V6 }) D4 R* A. q7 j
and add under
2 L" W+ ^. N0 L  ^% C' z! R  Z5 v2 _. p; P& E4 {  A. R7 O  ]1 j: Y* J
Code:
$ \! ~: M- x; c+ ?  r& t+ W* nif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ x1 ?, K$ L( }5 }
                        {7 z* I* j4 r( D6 Y  V4 r6 J
                                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 );2 z# @4 ~0 h3 d- e
                        }this9 s7 ~" c8 P+ _5 D" \
3 R6 D0 t9 w0 o# r, X# i
Code:
$ M8 ^2 X3 c% v' h+ E7 f' T% r#ifdef __QUGET_SWAP_FIX5 H& J: N9 a: s; Y- y
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )" A) `2 `; Z* Z# g
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 P( }6 ~0 S3 A
. u0 Y, y3 E; l+ h) C                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )- _2 w- f/ \4 W
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# P9 \0 l5 A; V( L$ m4 x

9 k% ?6 ?7 d6 i% i                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
& D/ h  p6 {! N- R                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% d9 N6 I& Q: M" P: @# b2 c2 M
4 N3 o2 I6 v. o% Z#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
1 v) ]- G- O2 R  p2 t
. y4 d2 Y2 b& J, x9 {
( Z' r5 \7 a0 y  B8 X5 D3 ~




欢迎光临 飞飞世界论坛 (http://www.ffwold.com/) Powered by Discuz! X3.2