飞飞世界论坛

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

作者: 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
- ?, V4 I; E( o, R7 xI posted this because someone kinda posted a youtube thingy about it :O.( C% Y, p+ V7 p8 {9 ^9 I
( M9 o% G5 x' ~. B0 B2 o
Find this in DPSrv.cpp @ worldserver5 @. B# U0 H6 E2 t  p

* p  p6 {, ?+ }! u$ }( SCode:! x0 {7 A% @. d' {/ ~: G6 a
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; K# h4 \9 L5 ?  ^/ K{5 p; y5 r9 T: ]* }& z" ]6 s
        DWORD nId;
% N7 Q, U" x% e        int nPart;; f" M4 K) x7 V/ c2 x

0 f' m! v9 }  X) T, {" c/ b        ar >> nId;& {' f  n: ~# i$ y
        ar >> nPart;                3 t7 ?9 r2 Y6 h9 v4 g
        ( n$ f& b6 v0 m" ~
        if( nPart >= MAX_HUMAN_PARTS )        4 h- S7 A; c. E  x
                return;
+ x, v4 Y7 x  r6 K! \  X
7 j# ^1 K! R% J) @/ Z2 p# I        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
6 k$ A4 b3 R9 t
5 \; r4 u+ _$ L# \& x# R$ T. P, |2 j
Code:6 r- ]/ P6 Q' t6 z. f  G( d
#ifdef __QUGET_SWAP_FIX6 A' I0 R8 B7 b7 U8 o& x* D. K, P

5 }. M) [3 S; u+ L# {                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )! N5 Y/ r  s$ Z5 F) |
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 H0 e& @' D  g7 {/ h
, X; o* m  N6 Q                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
8 b  b9 E7 R  \6 Z8 Q+ y                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! t" ]2 e3 W  M5 ~/ }; j
# i# ]  V. L# Q3 U                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )8 b' l! y3 C+ h, N+ y' b  S
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) b1 V6 e/ U% M* u; w5 [
9 \; h, r- u+ G6 B" k#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* o; a+ |  F& R7 o
and add under
) Y/ d8 O/ y' j/ b0 c! n( t% r( \& T& M3 ?
Code:; z/ X( l2 T# h0 [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
9 P0 i# [  m. W                        {/ ?/ c& @+ o- }8 v
                                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 );0 e' i9 n. G- N0 o
                        }this
' \0 M# z2 K8 v4 o2 v' S
% P: t  M9 D' R3 h; U% _Code:
+ s7 C; K0 {& ]/ Z#ifdef __QUGET_SWAP_FIX
! c1 L. ^8 F! s  w, r  b                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )4 \5 {# n! L' v5 V2 n
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. U& V- h6 t, ^: I- N: M" r" W( m8 {. z& ]
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )" J% `' H7 V$ G- f, n! L2 d. m
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );0 v6 j8 E$ V+ z/ ?0 v
8 h  Y0 }0 H8 q
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
4 E( I- B6 r( x2 m7 h% m                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 Y* |% u* H5 M1 H
5 \( y8 D6 M* b. O/ r/ t
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 Y; K/ z- e6 D: I1 r( F& z$ z
0 P' M  ?4 v8 q0 s9 {2 X. k9 `0 e
# q* j) m: V3 V! P




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