飞飞世界论坛

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

作者: 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
( `& I+ ^9 m) E# k9 }& X* K; ~I posted this because someone kinda posted a youtube thingy about it :O.
2 Y, V2 c( z& l7 I) r: r6 @' V
Find this in DPSrv.cpp @ worldserver
: F9 p+ h1 }. H! q# a+ \( Z; @0 d# |2 q& T
Code:
5 O2 @2 B" K5 n' b+ Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! q) E& @/ P% C5 V; r) Z: b{  s9 A$ \4 [* X8 h4 T7 p1 a& ]
        DWORD nId;
' s6 v4 Q  {# U+ V        int nPart;% _4 E5 o1 s6 E, j

+ p+ f' v& u4 y( l0 M& J' b9 L        ar >> nId;. n6 n: I2 _' ?: N
        ar >> nPart;                ; ]/ R( [8 Y3 L0 V0 h
        7 K! D+ J0 w1 q6 |
        if( nPart >= MAX_HUMAN_PARTS )       
3 w4 F: ?& O0 f' \+ R                return;
( d# m1 b/ x' D$ |  e5 U) r( }" [# D. ^) z
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" o5 B) L- t" ?3 t1 j* ~, |7 U$ ~+ P$ |& D2 y7 H; U
8 O  t2 d( M9 \6 b0 X7 P3 q& P& L- a
Code:( v+ M& J9 u! l3 _  A
#ifdef __QUGET_SWAP_FIX
- F+ m# B' N( Q. C
9 I5 G! o! E- z- k# h7 t                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() ). q" h  Q. M: \, R3 Q  X3 \  w9 R
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ c; ~# `8 M" s6 ]3 J! R: Q4 d
% `* `  l6 t* j. E8 S* x0 u
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )7 x* N( K4 a" e8 t( h
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );* ]: M7 D; X$ k! P

7 a! V  @! X; v& c2 {# `# ~: w                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! N5 D  \9 u! O( ^7 r7 Z& E
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
/ J4 ^, I3 C  y  o' l& s( t- k$ F4 f1 A5 W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp  D) e3 C8 J; o; ?2 S# e- v5 Z( w
and add under
; [+ c: v& A% c# \9 l: F. N1 y: O1 E" P6 K2 w$ J  O9 v, P
Code:8 X& A) r( y0 J) u9 a$ c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, W# L3 S& ^0 ^                        {
6 k: `3 g4 l8 R& t0 o                                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 );
( ?; n3 T: r  q% ^& E, P                        }this* n/ z) [1 S& I

% b' m2 C' t% ]$ }% o# |  XCode:
* x, |4 U: ^( [" d7 c! s% Q#ifdef __QUGET_SWAP_FIX# p; v; H0 o$ S2 I
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )5 d5 M$ g0 I6 H! t9 H
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 p4 _6 c. q/ D3 |3 F9 [' S) E% P# o2 O( d
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
1 S/ |0 d7 S" o) G                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" l3 ?, A1 t8 R# s. Z
/ E! }# U; B' z5 v8 @                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
5 y- `4 ~7 H5 b7 q* v2 r                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; W; x  o& |, @7 B0 i7 V$ W
  V- m1 ?! G" f* d% e# ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& c$ A- q4 }6 ?( i- ^5 e/ D, B. I0 T' f! ?. _

. k( R. t# C3 M$ s! s% b0 ~6 C! r6 |! |. k




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