飞飞世界论坛

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

作者: 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
; q0 G! h, d6 mI posted this because someone kinda posted a youtube thingy about it :O.% x2 C+ N9 l. ?0 W2 {

, C: d! w; b; T/ o% h0 p% C& WFind this in DPSrv.cpp @ worldserver: Y; e2 c, K3 b3 j# |* {. p5 |

6 f- U, f; c5 |! bCode:
& @9 E; F- v3 M. h; {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( M# ?9 o% G5 O2 S
{3 K! c) j/ q! }" J$ ]% @' W
        DWORD nId;! u3 {. @$ M$ D. ?
        int nPart;+ }  D. i8 m7 j, Y: z4 g/ _
5 Q  F: [/ C0 X
        ar >> nId;
7 {' h3 l0 J' _, ]3 G- K        ar >> nPart;               
+ t- O5 z0 g; e: R8 s        # C; Y" y8 e  m  N. R" d4 R
        if( nPart >= MAX_HUMAN_PARTS )       
" }2 K3 ^5 M& ^0 X& K% Y" \, t                return;
" D" l# J. r- H( O: w& c) `: }5 Y7 |( t, k* E2 a
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; S' A, k! G- s7 ]
! R. @9 v8 D" d  J2 [- R& L6 u

( |/ T5 r& s, PCode:) I( X+ m5 ]; X) R! e
#ifdef __QUGET_SWAP_FIX
, e7 O* p! X. \0 T6 S' Y9 y: f+ h; k/ Z
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
( L: w& V! p4 V+ {                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
% e& H5 b$ m! a. a6 n; e- M
/ C/ j: f. `, _- ?# u                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
2 {  }2 p4 T  q9 t& E5 ]" f' Y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' i7 H! G3 k! |9 s& l
) Q9 W0 ]4 i# b2 c0 c+ z1 q3 x                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )+ J! Q9 q1 E+ H4 {; @( }" k1 p
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* ^- i6 z! O& J
6 j; {+ v+ j% _( Q( C/ {; v  N#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ x2 w5 P9 [+ \$ }/ |- S3 U# ~
and add under
; p; `! B# y4 a/ D4 ^9 h* Z
) y$ g  v% `& n0 N% \Code:; x/ K3 Z, C/ j* a0 e* Y6 q, y! ^
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, }4 _) J6 |; o, Y4 g                        {
3 h) G/ B3 @) }7 [8 T2 |1 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 );! K7 Y  N" T% T1 J; |/ R* o$ Z
                        }this
& V/ D9 C) I0 @  a) m; e
3 R# I* t! z! |" |0 P( l1 NCode:7 U) y, i5 @" }8 I
#ifdef __QUGET_SWAP_FIX, J+ W6 L; a0 ?. H
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() ). ?/ j, @' k, J9 n2 t5 b
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! H# g+ y* v# J" u6 r2 d$ W. e  a! a1 e0 ?% ^2 _& V
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
8 z1 ?3 E0 i. h( ^$ N0 x" L& b: S                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ U. R' O* e  R
7 g/ c/ e2 s0 N
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )& j9 ^9 u! ]: ]' x5 `
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. h6 }5 }7 F7 T; T2 v9 U8 c) r% ~/ t' ?  k5 J4 O, ~
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. r& W( q/ I8 i( k7 o
- L' Z- J, l6 Y. t0 [9 v
6 H1 d  |. W  u- ^  u5 ^% G" Y* K




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