飞飞世界论坛

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

作者: 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 ; u' c7 G6 ~2 Z7 a2 v5 _
I posted this because someone kinda posted a youtube thingy about it :O.: H: R) T  D* }) ~
9 G0 O4 G0 v/ g! R8 Y/ _# w
Find this in DPSrv.cpp @ worldserver9 X6 b/ [$ [- o" p" R( c3 w1 B/ {# ?
! s3 g6 L7 T6 `! B7 D& R# h
Code:
& E- F: d/ ~, z$ x- Evoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: X. f" W& Q% |; T: w. p5 t) B{7 b7 w. C  G- @- `
        DWORD nId;1 o' Z9 @2 ?6 K" T' X# j8 @
        int nPart;
- k6 D" P' A; h: M$ s9 b$ F
0 q: B6 G7 Q0 ]& ~4 J: o% G. g        ar >> nId;8 x: U" A. s# r4 F5 [& e1 n& y
        ar >> nPart;                * ~. C" D/ C( d+ W
       
3 F: W. L; k- q$ c6 x: n4 `5 g6 L        if( nPart >= MAX_HUMAN_PARTS )        8 Q$ U0 D; B1 m6 E! ]
                return;
8 O3 B8 y7 ]6 h5 `/ ]+ n2 J) `1 s- ~
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 l; s: _1 e- N
- E) L3 X9 e2 d+ U6 G* @. [' }
8 r/ Y4 S( P; _6 w- }3 U  a
Code:
" R5 C; K7 B9 O3 s& ^#ifdef __QUGET_SWAP_FIX3 k5 ?- A! r, s0 h" [6 e

% c0 C- D: l4 L5 m% [) Q3 V: Q& @                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
, e0 K+ X; ~- \. }* \1 f+ |                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());( ~' B2 z) E- F* h) f* @

3 @6 g9 R) q. e                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )& ?* A- c3 z: Z) |
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 v% f3 @8 d2 H6 z# |6 H5 i: k8 \6 l2 j
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )
2 ]# \" s& I' P0 J1 Y7 A+ I4 ~                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 N# M9 S% @% U# a$ f% L/ i% g- W
$ {! {! A* K0 k/ j( {$ x
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; N. m9 C4 x* }$ C5 K/ Y* g. ]3 xand add under
7 w$ j& d+ n& U& N
' W% O# X# Q% o: Y, m0 ^3 ]  N# zCode:
( @3 c/ x  \- }& [if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' W* O& Y9 v2 r6 f. {
                        {& T: V1 p2 I$ L: y" ~2 z4 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 );
) f8 f# M" }7 e1 e2 {0 ~                        }this
0 y6 c( q  |3 p9 A# g3 j! J/ Z  k  D+ G& m3 W8 j. e1 R, s1 g
Code:% c# q2 k1 f7 }( \9 W# f$ y
#ifdef __QUGET_SWAP_FIX
' G! c3 a, t# Q) }5 e! T                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
8 {) P$ T7 X  v0 n2 s2 o                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 q7 H* ^! B" I1 P. `
2 O9 S# |  Z9 o  n5 h9 `9 `" D                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
# Y$ Y' a' q9 }) x' s                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );9 G" H+ E$ {7 I+ O3 |
' K. ?, f! l0 h. s1 f
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
- Y7 E; t" w% S- q3 a+ C                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( Q" h* ^7 l# @1 Y3 \
$ [  u2 X0 w9 |5 w$ D6 m2 {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* m; u. j0 L9 T( q1 i# P
. U" t' o5 V) W  g; \' |! c
( k* o( r: \' X0 B- W4 ]- H% m




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