飞飞世界论坛

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

作者: 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
3 n; I* H+ K) W5 XI posted this because someone kinda posted a youtube thingy about it :O.
' V  D, y2 ~% U% Q3 D8 A9 ?6 q8 g; ?
Find this in DPSrv.cpp @ worldserver
6 c. B. H; R! j' L8 H( D# n9 J, Z  X! i/ W, F& U$ l$ V
Code:
1 F) W8 v/ F+ y. f3 tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )2 t! ~! l" @1 Z$ s$ S4 l" ]! y
{
5 w& n3 \- Q8 ~5 ]        DWORD nId;$ [( J3 z2 v% @, l
        int nPart;
; A8 m: A( u. w6 I/ I: p  w! L8 t7 L( h1 Z0 a9 o
        ar >> nId;5 E' M7 Q+ w# P" ?8 Z) A
        ar >> nPart;                ( \1 z$ J) L: ~
        - Y0 z7 Y) {, t/ _" T% M
        if( nPart >= MAX_HUMAN_PARTS )        2 R9 U5 `$ D7 ?! Z( i% J# B
                return;. I/ G3 h0 [  |. g
( n- Y" @8 Q4 N0 r. d
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
3 ~" u# ]! `& R/ O/ n9 Y7 A' a! a  t/ E( P, t" C9 ^
" @, q0 }$ L" }: B$ N( ~, L5 M
Code:
7 }! I3 A6 Z) V! x! P' V; s5 `#ifdef __QUGET_SWAP_FIX" h$ P" G* q  v% }* p0 [
, I; [# q+ m" N: C8 u
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
( p2 u/ g( G3 Q9 }" {) R                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());0 \1 F) C. ~0 N! U( W- _; Q
1 W) e  {0 _3 U9 E! _( ?% z
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )" h5 z+ \1 S& L. S" H
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );6 s* J8 \. I3 j
4 w+ G* U; B& Q
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
" I+ V) h% x6 X5 @' d, m5 T                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; n; m* ^, t+ |( Y2 q2 ~- M$ @- [$ C- b/ s  t
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
7 A5 i% Z+ s3 {. wand add under$ a7 X: @5 l- {* e  o" a
' C# }8 A5 [) [( ~- j) h
Code:
) I9 R) u3 y1 F" Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 Z- a. U' B  r2 a                        {0 V0 t+ N! B* U% `
                                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 );
/ Q$ ~/ W2 G; p) j. E                        }this
6 k) A) j( i8 H1 Y# b6 T
7 v$ k3 O$ I7 t9 k$ z1 ~4 RCode:
! M9 J' v& g( K+ t. p#ifdef __QUGET_SWAP_FIX
( j0 B: h( a7 u3 B/ g                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )+ u  S7 u! X7 G' n6 H
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. r0 f/ ~& K# R2 @. X
4 f' b% d1 Z3 X$ k
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
. d* d# s7 d0 ^; f5 P1 L                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ l; _- M# W2 X9 S1 Y8 r2 t) W- C" r5 s# N6 c3 K  L; c/ l
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 H1 `2 h1 e$ a+ p/ b7 i/ h3 N
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ J( c1 v( p& W: g' h5 U9 w9 D4 L+ g& G& _3 L: S
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : v) r$ d" t* o+ U

# d4 }2 b1 I2 W0 v8 D8 J# e4 c! O$ U4 p" A/ v! Z0 l6 Y6 b' m9 \





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