飞飞世界论坛

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

作者: 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 ' G7 I4 M- f  ?- ^( ]% i
I posted this because someone kinda posted a youtube thingy about it :O.
, k5 z4 Y. i% l# j7 F( P2 g, s
" A/ ^2 H1 o# M+ g* rFind this in DPSrv.cpp @ worldserver
' L1 z7 U* l9 d/ q1 N! t
- z$ U) R+ v4 }4 i, ]3 R, ?" YCode:
7 y$ d7 b& Q1 D2 x  O2 ]$ v0 Q8 tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
, l8 j6 y. j4 U+ w' `7 e' j5 O{) v5 ^) h, [/ W
        DWORD nId;0 g7 n% x' z/ z) g$ n
        int nPart;  ?' B2 S7 o1 ?% s
- T$ t+ x& P  s1 O$ g; n4 c
        ar >> nId;" {, Z. d+ h6 l- [" P, r5 V
        ar >> nPart;                3 {/ u' B0 n! O3 c+ O
       
* p" H6 F6 s) f+ b        if( nPart >= MAX_HUMAN_PARTS )        / c1 N+ e; L: X2 {$ I% X
                return;
+ V4 e; B, Z' P( f1 C9 G5 ^( y
5 l3 Z" q7 d* w5 B        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( v: u$ K( }. [
+ u8 Y; m( Z8 ^2 G0 }1 a
+ L/ P! F  G) K5 L& ]9 y5 T  cCode:
/ d5 i0 P7 [# q1 a1 C: R9 m8 B" ~/ c7 P#ifdef __QUGET_SWAP_FIX4 c  u( D9 O( l# o) H" ?2 O

6 d3 X6 X4 V$ d9 R6 ?                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )" g/ \8 m- u2 v! N8 a
                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
; ?8 x1 P0 F/ w  @0 N$ H9 D0 ~& ^. R6 n" G. t
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )
" u% b' }) u9 L+ R8 n+ {$ y7 ~, j                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! }/ |  _9 Q0 A( r' {1 r9 X6 ]
; t% c0 X. {" ]7 k- a- c  K                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )0 `3 E; W" j+ n# A
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) T: j7 }5 O3 c3 o# E- `* D, ^

0 `; }% K8 D4 a# [1 K) d#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
1 A& Q/ \5 e) @2 }* V$ Tand add under
( S7 e" I' Z0 z  G4 t3 |- u  a! I* }) N2 P# }) Z
Code:
5 [. _) N6 b$ [9 b, I8 Wif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 ?2 [4 a/ o  i! w                        {
1 W9 @$ e. v1 }* e1 q) r! V8 Z                                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 );. E2 l! c! g( n  O
                        }this. V: d6 l1 j& s1 P
, x2 L5 z* ?+ H5 a! v
Code:) T8 ?6 v2 C2 x8 o5 F, e) A+ ~8 J
#ifdef __QUGET_SWAP_FIX0 \' `& }6 b7 [) ^# t. m
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )7 y9 `# Y2 Z7 k) @" _4 }
                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());" I' m1 K! T# y1 G& o
$ c5 L' P; Z; w% _2 M
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )
! S! `# Y" l6 I3 o! J# {( m                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
; h- h  |$ Y8 l+ G% i6 @' a" j1 X0 V7 ^- f  m
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() )
) I. b2 Q$ g* U. o% w$ e                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
( @' v; V1 [" p9 o& S/ x0 w
! G! |" T1 S  Z8 A#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % `9 l/ c. b  Z* U2 M9 ?
- D0 z  D3 a9 a% \4 Z9 ]6 F

: G6 G9 i: \  `* V




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