|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 T; Z: W( d9 E
I posted this because someone kinda posted a youtube thingy about it :O.' ]/ i* G% Z! ?8 \
k( T) `; F+ r3 m; x6 F1 r0 W2 WFind this in DPSrv.cpp @ worldserver
4 Z3 w ^: f$ S
& g. A$ i* H/ g( E. z8 e; K% gCode:# a' C8 |3 g* C- K
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 l3 P: f8 Z- t# a( { K{
4 {- K& ?# _1 _! o+ y DWORD nId;
7 W6 u7 v1 `, K! K) k0 t int nPart;
( K% c; P$ A6 p& W. U) B
$ s% H2 c: I% O$ [' ~8 z) q ar >> nId;# n$ S- |4 s, Z s I
ar >> nPart;
8 d. L! G9 g' p. o4 n( X 7 H" ]& y( D; A0 e1 y
if( nPart >= MAX_HUMAN_PARTS ) ; |0 R% x2 w4 a
return;6 o9 q. U t' ^2 c& m& A# z- Y
$ F5 ^" ?" e5 O6 n
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 [2 k- X# C$ X% C6 J6 k9 o! V
6 M) d8 o2 K0 {0 P
- z C, D9 R/ R* `( {Code:/ X, ]* @2 ~5 `. q
#ifdef __QUGET_SWAP_FIX
9 N2 r7 k3 T* C! q% T% C
# Z( K5 p, i B9 q) p4 Q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' r. Y+ s- O& u( Y
pUser->SetHitPoint( pUser->GetMaxHitPoint());% c5 W$ B2 ^! t( }6 W0 }" W
w& P" r+ f4 a$ v4 c5 |* f
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 @, T) h) ?( q8 |+ J/ r* _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );* h0 I/ x) |+ i# _' a
4 c& X4 @2 h! i& u: q6 Y4 s8 m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
* }0 l+ Z' V. m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
. H i# |1 f* L, `3 O/ T# p
4 ~# I) P: L8 E$ y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 r" h% ]9 E/ z$ ?0 q5 D2 c
and add under
$ ?' i$ T( z. n# ?* [. D4 B O
8 |5 w6 i# N: V. W0 s# Z$ X! u0 eCode:
( s6 G, m8 P. Gif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 R4 D6 a% M* z. @$ [' m
{4 l3 G0 q8 R. I2 e7 O& q1 W3 p, i C
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 );
) [' S5 G1 j) g% c0 d }this
/ f8 h% |! c, g3 ^
' X1 b' r0 \! L5 bCode:
$ L2 C7 y Y& j9 Y2 M% A#ifdef __QUGET_SWAP_FIX
8 ]1 b M' S+ V0 u- [ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" t7 \. j' k3 ^9 u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ u; p# Q8 U: J1 d" ~9 _; t
" S% h; w6 ~4 O8 ]4 }' H if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 r9 R5 q8 J. `' W e pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ @ u* ?/ ?' C& C
! H4 {6 I: r5 @ q) ~$ R: J" y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )" ^ M1 [- i$ U0 H5 O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, o7 A& s- X9 x" w4 o- M+ h/ p6 W2 y& U6 }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: d! B0 ^! V! ~7 j+ ?4 F6 {: r) V
( Y: B2 E# ?% a2 v" w2 t% y
( M j- I o. Z5 j# p! x |
|