标题: 修复交换错误 [打印本页] 作者: 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 + e4 G5 r5 n( l4 R( |. e
I posted this because someone kinda posted a youtube thingy about it :O. 5 W8 ], O$ g% g2 B ) S6 w4 |) c Q' w6 v: y$ cFind this in DPSrv.cpp @ worldserver ; U. {; Z" W# s7 n5 N+ W4 V! l9 I3 h E6 i$ j( M
Code: . l* e! V) @/ [+ V) g% ^( _: {void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), l; Z8 n' k1 c% Y
{ $ _- E% Q# D' E" U+ M DWORD nId; * M. y7 x- l9 r' f, y" ~1 S int nPart; ! ?3 T) _" X8 y" v% j' O5 b% A! \5 G8 R9 v( J
ar >> nId;( f9 G5 L8 ^4 {
ar >> nPart; - T$ \; o' ~9 ]
8 H" t7 Q: _& Q2 r& W: R% N: h+ S if( nPart >= MAX_HUMAN_PARTS ) 3 j- X7 m8 P' W# z, x& x% G5 v: v return; 5 {( z7 q3 z8 Y S$ B0 L , N; s. F3 Y+ J CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it . c3 |: y h' V# h9 t : z, g) V1 W! S8 j3 S8 u7 S1 K2 v8 z, q
Code:9 r9 a) X0 M" A8 j; ]3 H
#ifdef __QUGET_SWAP_FIX # Z3 f0 n" ^' l" q/ q) Y" ? . B) U/ V+ S2 ?# b4 q" F if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ) - i: x2 ?; j4 V' ^7 i" r q pUser->SetHitPoint( pUser->GetMaxHitPoint()); 8 y! U7 G+ T! {- R9 M' e3 `* f" o ' E6 W( Y1 J7 i/ O if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 x7 t& {+ Q$ c" e5 E, @0 g1 z
pUser->SetManaPoint( pUser->GetMaxManaPoint() ); * L! i/ S5 I$ R# h/ d* x 6 Z) ~4 c& @7 G" x) d2 \ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 |8 d/ W4 q% T+ d" F" M
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 L3 t7 l( W! Z# u' m
$ o W/ H0 p2 R#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp : M/ G5 L4 H# T2 q1 o. [* dand add under + H& ^# b1 O2 e4 t& f : K0 j- `7 r1 [% K: H PCode:9 [+ Y- b# h: V
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) " j3 V4 c9 F3 t, @4 g* L { + o8 `/ z& P1 S8 U1 q1 E$ w S 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 );2 ~' z1 f* ]0 P. ]) n+ @, ~
}this 4 U5 t/ R' q* w9 U0 l* @, S& p P# Z; c4 [
Code:, p+ z7 o& e. P
#ifdef __QUGET_SWAP_FIX+ t! ]3 Q3 C3 t$ a: ?
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) ; s7 \, P- I7 D/ r pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); 2 R' I) b: B1 e6 c % I& T/ X/ n- K5 L0 i if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): b( C/ y" H" k
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );, s% ~: w, | f" |