标题: 修复交换错误 [打印本页] 作者: 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 7 b8 u* S, F# w5 C7 m. Y# c2 [I posted this because someone kinda posted a youtube thingy about it :O.; k3 ^* I7 A3 w, D! G
5 m& d; G* H# ^* ~! T* \! pFind this in DPSrv.cpp @ worldserver 0 Y' o1 B% o& \6 G% y, ?- t2 y; j& u
Code:. c4 ?2 h0 N) W% M- B( Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 w# Y; d1 _- M8 V
{ / a* I7 h2 E4 P* |5 G DWORD nId; _/ [3 o9 _) ^ int nPart;" U+ |8 m$ O, g, u) j' _
" V& O& z3 H8 p# S. M( _
ar >> nId;( [" K4 O7 R" u9 k
ar >> nPart; 3 ]1 f9 t2 `) b' z/ @9 q4 J
$ a; U% Q1 k: p1 s if( nPart >= MAX_HUMAN_PARTS ) & h/ [7 [* d4 P3 C8 X return; t+ @) T$ @* n$ ? 8 M7 H1 _' Y6 b/ |& b CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 d# j& v- k" D% L
) ~3 b) ^3 \$ R1 I8 p ! ^! A1 ~7 T; W" h. @Code:. P0 G8 V$ Z$ p1 Y1 i
#ifdef __QUGET_SWAP_FIX) k+ }7 ` t( \6 r+ m7 T8 H
" y/ Q1 t# W) i3 D
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) ( J( `! L: p8 a c+ j/ `- W pUser->SetHitPoint( pUser->GetMaxHitPoint());% L! D- a. S5 ] l* X
5 R& H/ k0 N8 F( d$ \ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )2 K2 g3 w1 c3 E; ^1 D6 _
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); $ f- q3 \, u2 I" _9 ` 7 O- a/ q/ G4 a2 Q1 I if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); ~* w; V. e$ f D; b5 t! V
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); 1 S5 P) F* H4 g) V 0 J3 @4 _9 \; O% {! ^+ C#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 p7 D; e: ?; k2 G( Y4 V2 ~& Y
and add under , h6 p# A/ P6 \' R6 T' N+ I" G4 @( U 7 x* I) K& ~4 |' z* k" ]% ~Code: ; u' B. k# ^# Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) 3 {% [ m& L) \' d2 y {8 J2 _- W8 @& e$ \( j3 H
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 );' Q: c% h9 D$ M% |) ~
}this : e& l1 e8 g- f) q7 ^ " U' _/ h+ D- e6 K' QCode:, N7 _! z" ~5 d( v3 T$ K
#ifdef __QUGET_SWAP_FIX 4 n, N" B) |; G- c3 \9 u if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 m7 n' p6 a$ e; g0 N# n) }
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ h0 W, s+ C; i7 Y
1 z: l5 L- d7 p4 x; `
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )6 Z0 s4 \0 g9 ]; I# N' C) z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 r1 e3 s& F+ }) H' p$ d$ v/ Y5 u
6 [/ u/ z4 c1 N! J- s8 T* l
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )+ i: V! h. j3 a4 l( I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );: X' S6 N# q1 y9 {# L" C" E
3 X3 u# D! Z- f6 C* {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 S+ |) B7 \& _. }- ?! _, G5 ^+ L( A; C5 f: D5 q y! n