|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 2 \, w* p" d4 s0 j9 p5 R
I posted this because someone kinda posted a youtube thingy about it :O.
0 V; l [+ V3 l, H. T( n, `+ g9 i1 c0 s
Find this in DPSrv.cpp @ worldserver
) ?4 S" W, n! @) y6 ]+ P
3 o/ C5 x7 T4 q- vCode:
$ v- `2 ^8 T$ Q8 W4 E+ v2 l& Tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 j. a- N1 q; l/ J; m, f{& L5 g' t2 x! E- E
DWORD nId;
4 J9 I3 @1 f, n, m5 I int nPart;% g4 a0 d! R4 e$ _5 n- @7 N
7 R5 v0 e- n7 i+ o+ p# Y: G" z( j5 { ar >> nId;
v; C1 ]8 @, T( _! `+ y. F. @ ar >> nPart;
5 {- Y; T# |3 |2 q, h5 m 3 _5 w2 D& ^( `5 k
if( nPart >= MAX_HUMAN_PARTS )
, D/ l$ C% P7 y3 O) F2 n; M4 m return;
2 X" c9 M9 E7 }) S/ I& A# r. e* c1 t3 M& r% M" t0 r
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- Z ]# A; s( p# m# c* r! I
4 P/ B+ H: u: d) T( h0 l; v! J$ D. v: u0 N9 Q; N2 M
Code:% M' h2 V5 {; `
#ifdef __QUGET_SWAP_FIX ]0 U9 r# C$ c' n# t. J& C
& u/ X$ X* G/ V- g) M. `& v
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
h8 W {( C5 g# W% Y8 D: { pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 ~" r6 i8 ?; d1 a' a' Y( Q7 Z" F6 L
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 b2 ^. d6 w( S pUser->SetManaPoint( pUser->GetMaxManaPoint() );0 G: q! |$ K: h5 I1 ^
& \$ Y4 J3 {+ D; Y
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. p( F: _5 o; s pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' B6 F" B) L: X4 \. h8 j2 q
) ~& Y4 c9 ?* ?- a. G#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( G+ a8 N+ E/ a) y e/ M% Z# B
and add under
; U! I: v4 S, n, h v* ]( P( S3 I
9 `& B6 Z9 q; ^2 @, A7 e) FCode:' x: \; a% z5 k' C% d/ i5 f1 a( [
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
* }, ~/ z/ M# M {6 G1 X d. w& x) K- }" u
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 );$ S# s6 U- s1 o! `& N$ D+ k
}this
$ o. E: y# T- X3 A7 \( U
& u& T# _; a9 V0 Q& NCode:- Z, [6 y7 _) k" h
#ifdef __QUGET_SWAP_FIX
% V: V9 U2 K: g5 L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. O, U" \* r# t pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ |, S: O I. [; K
% J. X8 M9 x, J2 J6 m! k; `! B+ b if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); Y* M( I4 B. l: k0 n% }
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
+ H4 q, B! w& t5 p9 p$ y* N% b$ l& X) H. @ T
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 l0 E! R5 T ?1 J4 Z: I4 [7 o# a pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ s! r8 C5 V: J' e9 }3 K( {
# B4 V5 O. s5 X) Y- @2 \, V- D' N& o#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 ^" f* u! t* e5 z5 ~2 y( @1 J* R9 C5 J+ U% d2 |" h6 U* ^, a1 f
, q9 m% Z4 U9 }1 k! X; I |
|