标题: 修复交换错误 [打印本页] 作者: 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 0 E1 g1 F5 ^! e: z1 I, xI posted this because someone kinda posted a youtube thingy about it :O.0 I+ }# s8 |( Z7 X0 p9 u
* f% u5 ?6 D1 g. K; x2 C& R* vFind this in DPSrv.cpp @ worldserver 4 K. Y: S( [) w+ g8 N! X3 ^+ D! ]2 o4 s1 w" ~: W6 c# M
Code: 0 U3 F, j# ?5 t. Nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 D$ O \4 f' p' J( E2 s" Z
{3 |3 f$ W8 }/ S# J
DWORD nId;. l; f1 Q( R$ o. s; ?. U, Y
int nPart; 5 z1 i+ Q2 j8 Y( ]* {! a) \. |/ V4 T. q7 k/ E
ar >> nId;2 r; R2 E8 J% L3 ]& l
ar >> nPart; $ Z" A, \2 Z/ R
3 C& ^7 ^ W0 _( u
if( nPart >= MAX_HUMAN_PARTS ) ' l0 s0 g2 t ^. o% x return; ' r# P+ v L7 b6 a ; L* o6 @) E3 q& M M CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it" Q! \) v( J' u( t" s+ A
/ O9 Q8 d/ G& e0 P5 v! T+ d3 b p: N& U! G
Code:# m! Z0 V; e u# U' U7 o
#ifdef __QUGET_SWAP_FIX2 R% Q! v; a9 N, B
U% W: ^4 W, W' K& e! s$ o- h
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )/ ~+ X1 p" x. e/ W/ ~: _( Z6 T* l
pUser->SetHitPoint( pUser->GetMaxHitPoint()); + v( c& Z6 R' t0 j 3 k& D' X, u6 ~3 } if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )* N0 ]: p$ h# G! s$ e% o
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# d* Z' { h( P: m, o l
5 F% z$ c5 y+ I) Q$ ?$ `( v if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )) N, z0 G9 f5 `/ `
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 L- I: @$ o& Q+ @+ B
: @2 j3 s/ G' v) r
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% t1 ~3 G) W; r7 l' q
and add under % p9 V$ O" G% K 5 G9 L" Z9 d6 G) y0 J7 V- r e: ]+ DCode: & @* G9 \; q) F, T: X, \if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* Y/ j; e+ F& s7 H& p8 N9 O
{ 4 p/ ?5 J5 ^3 S# O+ c/ w/ Q 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 ); 4 @5 s% N2 Q& V) Y. ^: G. t8 E3 X* e }this ) f# f. o5 ^7 L" \" N4 H W1 @- Q3 V4 s) f. B( S8 Q5 O
Code:" e0 K8 L4 N* g
#ifdef __QUGET_SWAP_FIX( D& B6 e; \- Z3 |; z; y
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) * P% c: k4 r9 T3 Y( |5 C5 p2 X! Z pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); ; {& \4 ]& f" z/ X 9 h Z# U6 E* X$ _4 E( A: t if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 T3 m( @( z3 V& r( u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 F3 q9 I9 z& U$ R, y: S
/ H% v3 V) m6 m+ T
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )0 p6 u( e2 f1 v; V" O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );) ?! }/ {; j+ i. W
1 a. u( t' N+ v' f; j
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver & v m. O5 a. y5 h 9 G7 p+ w$ [! p* x# e/ u& S. w9 P; Q+ T4 t; Q8 m+ p