飞飞世界论坛

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

作者: 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
1 F6 A* b5 W1 U( V& I( bI posted this because someone kinda posted a youtube thingy about it :O.
; z" |! K& _1 A3 e6 h4 V" R/ s
& M4 ^" d' s( GFind this in DPSrv.cpp @ worldserver
; A1 c# ?/ N3 n, @( Z, {2 V0 }0 l, V
# l8 w) z1 j/ S8 r' bCode:# H; j$ l2 c; l. c" M5 s% X
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )  Q) c& H3 a' Z( F, y
{+ D2 ?0 {7 H8 j. O1 e' a9 C6 i, Z
        DWORD nId;
: G0 G( i4 W( Q        int nPart;
1 a, i6 f1 d8 F- `
( l, B. w* ^+ |2 d        ar >> nId;, ^  @* x3 j& e$ z5 D
        ar >> nPart;               
" M" ~5 z& O9 H  U' P9 @! L       
( y) i" g! D& A1 m5 U        if( nPart >= MAX_HUMAN_PARTS )       
/ X5 r' u. ?8 ]" Q6 r3 u* k6 }                return;5 M6 T7 y5 I5 \9 `7 W
( H+ O# h' E' \5 l1 q4 D% n
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 c, A+ L: Z/ ?: r6 w
' _; i$ ~2 H# h) O/ a' |+ U
1 I$ f; ~% I& LCode:9 f- b) o: j( C' Y7 b% U
#ifdef __QUGET_SWAP_FIX
. y9 y+ P! _; F" A
6 z; X8 W0 S' t0 ?! Y" G                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )+ g$ f% B, z# V+ N/ R
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());% g: }; I0 x1 n6 l8 n) E3 T2 A8 \

8 H4 ?, t4 t+ K5 w8 f2 t                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
+ Z7 P# _( |9 ?+ L& @, I! i- `6 B4 H                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# E- Z! z+ F! m/ s6 D; J' x9 q) a- W) N6 A. s$ l
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
! O" M5 i- Q9 i* {+ p+ c/ h                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ K5 I6 @" g* O5 W0 k6 Z! V7 m# v4 X3 J" `
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
- o$ S$ k. j1 {' O% _/ Cand add under8 F" H; b5 r# n6 V% p0 ^- z( o

- I1 u, g. k+ Z- gCode:6 {! f9 N9 ]  [- Y. ~8 }2 o: c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- \- ]: X9 Q! e; n8 p                        {0 T6 T9 \9 e+ t1 g) D7 i* ^2 e
                                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 );
& ]8 B% D6 r1 Z2 p' |' j" h                        }this
$ a( Z& x1 N7 y8 r; L) x
& w+ U7 [. l  t7 F7 Q3 KCode:( o0 g9 A" \: ]9 Q
#ifdef __QUGET_SWAP_FIX
* b+ F: k" G1 T0 \& Q                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
# \# b5 V. d! a4 W* a0 j/ {                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ k$ \% j( @8 Y
0 I1 c8 j' `8 o                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
+ R  a2 x- d  @: j+ T                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 _! H$ p1 E- C, ~5 I* |0 z: S
9 Z( ~# `5 ^" @$ r2 o
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )9 O$ M3 e  m0 S& O0 A  A
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. Y9 W# f9 U3 P4 [" J; [$ P! a  C+ b  i! p# E, d% D- C
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ( Z( S5 f+ C# o( C+ }. }
1 M( g) S& A3 u7 I9 [; w5 E4 l

! {; C  z* ^: F2 }8 `$ c0 ~+ n0 }




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