飞飞世界论坛

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

作者: 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 8 h# B! S" g1 H  e: s9 |9 d
I posted this because someone kinda posted a youtube thingy about it :O.
9 B  c( U/ f5 p2 |* I- a2 J5 Y) ~; N
Find this in DPSrv.cpp @ worldserver
3 m  f5 A5 O( \* G9 I. \1 d# {" D3 v7 Z' h5 v
Code:
% S% z( G' m! g2 F" ]void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
  K6 j& n7 a6 m* m! ~: G1 H5 u{  M& p9 B: y" r2 g& R: k
        DWORD nId;# r  W/ X3 y! P6 d' C% R, t
        int nPart;
8 m2 f  R- K# L2 t( J
% f( A. x8 B9 P1 O8 c        ar >> nId;
# P5 A. I1 z% E        ar >> nPart;               
) K& v! h6 Y$ v* ^; m/ ~       
! @/ U( }/ ]# U1 t; a$ c0 O0 f! C/ E        if( nPart >= MAX_HUMAN_PARTS )       
# \+ _! u! }  d  \- p                return;
! [% n( u5 d: q1 U& X7 I, Y' [  G' G; \! W( @
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ W' V3 {2 o+ T0 N4 q; u' c  t( q1 G1 k+ g

; H5 z$ L- f; K& g, U+ pCode:: }) n, _3 L! j- w( k5 i, j/ F- |
#ifdef __QUGET_SWAP_FIX" G. j  [# ?- C" A+ M! s
4 ^, U; B6 X9 ~! ~9 ?9 L6 w8 }( j
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
& q  v. ~' @% P) N1 R1 z0 r                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
, d' V9 N2 b5 Z# P6 X  w% j4 N' n/ i' x, K" P7 |
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
: ]1 f8 N' W" B                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ l2 g4 Z' q0 q  _
/ D4 r4 z7 l- t7 D& Y
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! X, q7 C# Y1 v0 s
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) z8 x; z7 O) V! {' s. k4 o. \- q$ ?% `. @
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, ?: [+ f9 L) ~, Land add under) d: _: {# {1 g& @/ I' ^
  f8 g& v& [- n! ~+ A
Code:/ u! q3 X# e) f( F1 q
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! b) @, r% L+ C3 j# r                        {" t8 m  j* o4 D2 c0 x3 z- d$ a7 X
                                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 );  R3 s/ C$ c' `# f
                        }this
) }, A  P( `# @# a
1 G2 c$ f8 k# M# _" l5 PCode:
# I' N- F6 d& b. p#ifdef __QUGET_SWAP_FIX! K3 w" R& X% U0 x3 _% ~
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
; N; J9 m& I5 C3 B, j! x& Q! T                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
) Y5 c3 S4 U( R
- |+ _. n. G. e6 N, C2 G, H, R                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
9 V0 Z  b& o) ?7 B- R9 p, ]% P2 z9 q" {. }                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
1 Y) c% J7 C, Y0 s3 m& `
7 ?3 ^8 Y; X- {  m2 ]                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )2 `% S* [* z6 H! D5 j
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ d2 V! i  |$ I3 \4 L3 _* [: I3 n- Y% `+ P, \. J: ~
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% w: b  C& T* [( p" f0 L" A' Z' g. b* {' c

- X, ^' A  Q7 E- L, j8 t! |6 g. r7 k




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