飞飞世界论坛

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

作者: 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 ( v3 a0 A! x) L! p0 o( T3 g
I posted this because someone kinda posted a youtube thingy about it :O.
; |% y, f8 ^3 Y7 m' Q" h/ ^0 o* v" l. |
Find this in DPSrv.cpp @ worldserver" v1 l1 n2 z8 p  H6 p  [' C) N$ m

& d% x4 V# g' QCode:
2 R7 {; ~0 P# v! Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* m* G8 g+ t+ r2 w3 C
{' a, q  Y: D! K3 d$ @
        DWORD nId;
: `  y4 I0 d2 g2 {# p# P; _0 e: U( A        int nPart;
8 W# s$ H1 X: _% c/ o$ ?. A5 F) E* @
        ar >> nId;' v% N0 h7 N' f1 P
        ar >> nPart;                + Q% l: z' k! q$ K& R5 x  w, ]
        % ^8 c' ?$ ^5 b4 n" V
        if( nPart >= MAX_HUMAN_PARTS )        ; ?1 o5 V" J# l
                return;! q$ e& I4 L0 h0 _0 Z8 J6 U, ]
5 g/ ^5 l9 c, Z; H! f2 N0 }( r
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; A, j2 |9 ~3 g+ B+ Q

8 w2 ~. A& ~# _/ p: e2 |& ~
; ^5 s4 W+ B3 w9 w4 O9 ~5 {Code:
" X! q% I1 k: G9 g#ifdef __QUGET_SWAP_FIX
5 |7 D! ?, \& ?) g) Q
& N- V/ C, Z! z4 i- E( N; }! B; S6 J' I                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )& I  b' C3 ]8 q7 w% W6 Y
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());$ I! i0 X- Y5 ]: l0 Z' W
1 J$ N7 v" c2 z/ v' w7 V
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
. C0 V8 E6 e1 E                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );  @) I; `( |& I2 D* u

6 D6 T* p7 |; b" N  O                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
. s- ^. \1 r8 l! }: l                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ I) N2 \: ?, @) `2 p0 C% i* ?5 v% e3 x. L* {+ j) b
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( p: `7 \# P8 y# ?3 {$ X- uand add under, b+ @  Q" e7 G- L3 U8 X

! R! P/ W% e$ j* LCode:
! d6 U* b0 A8 {2 Q) i9 mif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ x& o, a7 y) [& W
                        {5 S" o% x' N. X+ s/ k
                                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 );
) H2 }: ?1 [6 D; y* h' K5 p                        }this! ?* h2 W* j# x, L
0 F4 g) c/ Z6 a
Code:+ K7 i9 ~0 r% Y6 u0 I6 h) X
#ifdef __QUGET_SWAP_FIX
- Z) T' L$ ~% F$ J                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
8 g2 e% W( t1 F6 `5 C0 I/ c$ [                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 h9 h" |2 I8 a$ q. |# ^
. B1 Y' ?8 x" X( S4 T/ W
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )* H* d# o' e3 i1 l3 [* `! x9 a
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
5 k" m# Z. }' m; t) h6 M5 o- z# K8 w; H, O% J
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
& s3 s; ?2 Z. I4 C, t' Q7 x                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 N- Y+ R& I6 }" ]
# @4 }. `# ?4 @3 A3 Y3 e#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver # x/ L; Q7 G; D+ L) x& Q' W

6 C% W+ q9 a( Z" ]4 L0 E3 i, |* [0 o. P* U6 d





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