|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # M1 q5 t6 O2 x" l' T
I posted this because someone kinda posted a youtube thingy about it :O.
* @" v6 ^/ s' j5 O1 c, b7 n- A3 I
% `" L: J3 O1 b0 D+ y( _Find this in DPSrv.cpp @ worldserver
# j9 i1 \ z p; Y$ p, R
/ E" I3 {2 o9 w- X2 |6 U* N) ]. P- PCode:6 r" y5 ]5 u9 s4 ]1 U3 n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )# k. @* f+ x; K9 n6 O4 C
{
$ t% l( W1 b | DWORD nId;" X f9 A% Z' B+ G% G
int nPart;
* u) t1 f# B: d/ I: K+ L! z* l0 H
ar >> nId;' g) p+ ~: C; P4 k5 _
ar >> nPart; , F3 c6 G" z) t! @+ D
- X7 k/ T2 P( ^# E% _
if( nPart >= MAX_HUMAN_PARTS )
" A3 V, E* J- W8 N! N% C return;& c8 A! K2 f# T/ S! |5 U
2 f. e, L7 M* s6 `5 v) s ^6 W
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ i: B2 i0 ?- z9 k
8 l' V) D9 ]) ?: U5 S1 m+ v m, i! k8 I8 E- M
Code:
. X+ k# ?6 F! k z. H* d4 l7 C- M#ifdef __QUGET_SWAP_FIX
" N1 v2 E7 P5 j! `# N' i% I9 ]. c4 j
4 {8 [2 t* v4 v7 s( N if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); _. j8 i5 v3 l* `! V: c
pUser->SetHitPoint( pUser->GetMaxHitPoint());, v5 W B& z8 {
6 j2 Z# V5 N& A( q& D if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ ~5 O. E( c- _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
% `) O, S Z: v8 }0 ?, W- _2 g) l& c; {3 o* H' I! `- P6 Q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( Y( W- f8 Q. u) a, U9 {5 { pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) K6 C# y$ u9 ^2 W% x
% e" i7 p6 |& e8 U* A
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" [& I. r0 U% ~2 X
and add under
. O* l2 i# d" \( t2 l, Q8 }$ S7 c* Q" e/ S5 \( Y$ J2 O* e
Code:
8 v( ]8 |2 m0 a5 D! P9 l( f5 jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )0 C* C5 }# W* _, ^! z Q( D. y% B5 {" ?
{3 _. h v+ }. k6 \1 R0 j$ I
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 );
! }; T6 `) V, N( Z1 U; @ }this- r8 I* g1 L0 |$ @5 _6 z; B
6 y+ h( p0 r) _2 x0 j* M
Code:
1 F) X F/ B8 _3 F, o#ifdef __QUGET_SWAP_FIX
( ~* V/ k, G, F+ _ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): g6 v" G# m$ l e, F! W: l
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- J$ v! }6 ~1 H& |9 D' \( x2 c' d) j4 ]( T4 H+ U- P
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) Q2 b! \# w& p8 k& A
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ B; s1 O: g. M' \2 e
0 }0 t0 y2 V. K% S if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), V1 o# {* X4 U
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
* Q9 m% }; a* \5 O; _* I
/ A/ w) c. W& M5 P. x3 d#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ! T+ R* s) z; J9 ^
1 a( c3 n* ?% f R' p
) e5 i+ _ y/ i) w# W1 b
|
|