|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 |, r! W# D; B. ]# ]! C; q
I posted this because someone kinda posted a youtube thingy about it :O.
! L+ Z8 h9 z3 L5 h' [7 \
/ c0 D0 l% m! S5 B0 _! fFind this in DPSrv.cpp @ worldserver
' Z4 [* A! h e( |* \2 t0 m, A" b8 b; a$ m8 k: @
Code:% Z1 \7 Z- A: l$ L- }" b
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( E8 L J B) l0 s; g
{ r$ w0 e7 l- R0 \% A2 R4 |8 b
DWORD nId;
) g; a4 Q$ I* F9 p int nPart;
! ]3 D3 m8 V, J: I) a, T
. J. B* a+ c. U$ O( } ar >> nId;) A1 X. v/ C: J+ E/ V+ M
ar >> nPart;
7 E3 c2 y! K; g; T7 B. U ) P2 I `3 {- K( ]( d! J. \
if( nPart >= MAX_HUMAN_PARTS )
: t. ?, N1 }- X! c return;
" A, p5 ~: H9 a" ]: q/ b# n
& `0 o6 [, O5 Q7 b0 x! ^4 l CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it+ E3 h. Q: B1 w" y
* u' b' d0 `( {5 A' d1 Z( d
8 M/ O( o% w5 P2 V0 ?. sCode:* m% w O/ ^+ d6 `( S' P8 e
#ifdef __QUGET_SWAP_FIX
, L" G. S1 t: y& t3 C" q1 N0 ~! B0 O% x+ I; D) C% y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 n; x# m- N% W/ P
pUser->SetHitPoint( pUser->GetMaxHitPoint());* R7 U4 Y1 [- H1 g! r1 O8 l0 W- B
% q4 H0 b) T- k8 u) T2 Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% R8 R) w# C( V# h
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 u( r9 }- H# f4 R; R
& N$ }, A; D- \0 } if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# K2 m3 N: t$ U6 ]5 ]" U8 ^ pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* f! t: Y% Q& ~( U* x
& ^" M: U: n8 W8 ]" X#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# g& E( D9 x4 c0 i9 u
and add under
5 s5 d' l+ X% l) U8 k _0 C' ], s. q6 F- h: ^: Q- A" B+ E2 b
Code:
5 l6 t7 J# a. G( R0 u, Lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! B ^/ h* L7 }) L; ~ {8 T8 ^, [8 i9 L9 b
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 );8 A9 f9 R" U$ O" z; m ]
}this8 U8 W2 G8 T. c0 R' [
4 N) o+ ]* m$ J. h& W
Code:
' C# Z3 T( x H#ifdef __QUGET_SWAP_FIX0 L, |& B; Y5 M1 Y
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" S1 _8 n7 H$ s& e, u! X8 S- S- U
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 M" v4 G9 {9 u% ]( }" `# Q
3 ]. z" n4 Q9 W if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ), _5 x: C$ T- \- {0 Y X! [
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" K1 M% p" @1 n8 V) j1 `
! _- d- I9 v! m6 U9 Y& e- M if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# e! ?3 f5 B4 U- c pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );* S' `- r o4 ^
/ R1 |7 o& S8 T
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ( e" w! C6 \. v! ]" C) {
1 r5 }" f, [9 U: ?' A Q% u7 \) h$ L
|
|