飞飞世界论坛

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

作者: 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 . J6 B8 o- r$ D8 Y& U# Q
I posted this because someone kinda posted a youtube thingy about it :O., w) G, v8 S3 s
! {9 i, W. E3 R& a
Find this in DPSrv.cpp @ worldserver
0 J) [1 _' P* j9 o+ e* s+ k  M& @$ C: c9 R
Code:
" n; T( u1 K7 Y& }7 w" _void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& |6 w6 ^+ r& H7 K. A{; o& e- h. q# j1 N0 S8 h: \5 A
        DWORD nId;
5 \- c- W* j; ?  c        int nPart;
: y: G. ?6 [; x
% |; |, S8 \  o/ a6 P/ `' I        ar >> nId;* n' g1 q; q9 O
        ar >> nPart;               
2 V' k% M' s. Q) {% ]       
% H2 y- u* I: B7 r5 O9 }        if( nPart >= MAX_HUMAN_PARTS )       
& s0 M. }* O, n$ N6 f                return;
* b. q! g9 t4 B/ ]& g" ^0 d/ Y" y5 e8 H7 \
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
5 M, U- |0 p2 b  J
) ]) j: U( T# t; B8 n6 n! Y! N/ H* |+ U3 M2 F' {
Code:! n3 _9 G  q9 z6 S) `
#ifdef __QUGET_SWAP_FIX: ~1 d# K! ^8 h/ S
( E& B# N& M1 d3 G( s5 U
                                if( pUser->GetHitPoint() >  pUser->GetMaxHitPoint() )
0 \: X7 g1 c+ j9 }; h                                         pUser->SetHitPoint( pUser->GetMaxHitPoint());
& A2 v6 ^6 R3 {  a: b2 o) U6 b, p- p' C0 j8 `/ ?
                                if( pUser->GetManaPoint() >  pUser->GetMaxManaPoint() )/ K4 j- a$ W" s8 L- X( }2 _
                                         pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 X9 A0 m3 X9 f: J+ n1 d5 |+ Y8 e- w4 K3 w* ~/ w
                                if( pUser->GetFatiguePoint() >  pUser->GetMaxFatiguePoint() )! Q5 O  G: `4 U" v1 `. u: o
                                         pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) p$ ]8 d# L( V' U# A0 z

! C# x: x/ |. y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* s+ O  U  P& V  y; n# c5 G! w
and add under
+ B1 p# X% ~7 Q; R% w$ Q" e; y: z) I
* L! v6 t( f6 y6 K, }; gCode:
4 }0 Y3 r. y  ~( F! G5 Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )+ d# N/ t- F$ W9 d5 |. \2 x
                        {6 Z, n% K0 k# F3 u2 c% q4 k* N
                                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 );# c: N. t$ d* }2 h" J8 L) @) i
                        }this1 Z; i# Y5 ]. [& P# D+ F* c+ t

. V+ p1 v' h' f/ a, hCode:
7 W3 @. {% I  B$ R, u' h  l+ _+ Y0 K#ifdef __QUGET_SWAP_FIX- `& p# N: O! h8 L  S
                                if( pPlayer->GetHitPoint() >  pPlayer->GetMaxHitPoint() )
" A2 u; V5 f$ E1 T                                         pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
3 E' M/ O8 l  G9 ^" ?. |. e2 Y# F6 ^3 y+ I! ~
                                if( pPlayer->GetManaPoint() >  pPlayer->GetMaxManaPoint() )- p9 N' d' s# i. G
                                         pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
  d$ p! E3 a# u4 U5 u+ r/ |: B- e- k( g: [5 i
                                if( pPlayer->GetFatiguePoint() >  pPlayer->GetMaxFatiguePoint() ). {  j7 k7 a9 V! U
                                         pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# l1 L# ^6 j4 T/ Y3 U; T1 w& S
; {* P9 F" w* q3 \/ ]6 t6 e#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 `3 ]: Y* B, X! Q

0 [5 Y' P1 C2 a8 a
: q1 X# T% p% @/ V




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