|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked & I1 N. m- b+ C6 ^" ~( ~4 ^
I posted this because someone kinda posted a youtube thingy about it :O.
1 y( m: a2 Q/ H! ]* ~( E- Q& \: N' H5 T1 f
Find this in DPSrv.cpp @ worldserver
7 x* y& q4 y% C2 u) s3 m1 _( c
2 ]" b- y' w; n5 D5 @2 c8 @$ r, pCode:8 u# L* E$ Z1 B9 a8 i2 [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 _6 y s3 ^: F) p9 t& \! X
{
3 d+ w2 t, }" U/ z) ?1 c* j# N DWORD nId;! P$ ^* l$ b$ Q+ ~4 f2 X
int nPart;
* ?' i, I5 K" o/ t9 K! L7 M6 y* S1 `3 o/ L$ k
ar >> nId;
, W1 S0 {& c! M* C- J) A ar >> nPart;
* v' v$ c0 M, j8 m/ h - N+ l3 e: `+ O
if( nPart >= MAX_HUMAN_PARTS ) 1 T' r" D- ]0 v$ P" l7 G6 i# P
return;
+ q8 p; @+ C7 \# n: A/ X! I! R* u3 @# P: J" [8 X
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it, B# e1 _9 P4 w7 b( d" k
) Q/ F/ R! F7 ]" O; G/ F+ x% z
" ^# J: m& ~1 T" Y! a$ s0 m: ~+ W3 TCode:
( l& W. r y" r#ifdef __QUGET_SWAP_FIX
, N p, D0 w+ h6 |5 [$ h
/ V# t8 a" ?1 }: L* K if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 h" a1 b) z& {. D5 d
pUser->SetHitPoint( pUser->GetMaxHitPoint());* d" V) s0 N' i: N, a6 J) Q4 U
; P) U& }, M; A1 n d# X | if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) R- q: Q" J& l) v
pUser->SetManaPoint( pUser->GetMaxManaPoint() );; v7 w; o/ I( u9 [
" k9 N6 ]+ S) X, g O9 ]7 V
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): d) H% G8 E0 ^4 E" P1 h
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 ]1 J9 h! ^4 `3 i& f! r
+ L! X9 p* g, f: ?) E* c. l- d, _#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 Y& a. r- S5 C' n
and add under
4 U1 s, F' Q9 I
C- m6 W* Z* v9 T3 kCode:
{1 O4 ]' J6 _# [6 ?if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 G6 f4 ^+ K+ B5 C r
{
' M1 a4 P9 _1 f/ O0 y 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 );: y( S" k; y3 o
}this
/ P7 a j) c( K: s/ P" B$ L! F$ c/ ^1 o0 Q0 Q4 i5 S/ j
Code:
2 [: a0 c4 ~9 i9 R9 c, p7 B: y( e. V#ifdef __QUGET_SWAP_FIX6 ?; Y/ x: y0 ^/ c: j
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' p2 `% u% \8 E @0 T: c/ r" x pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' Z. D. b& L6 P1 {( g- l+ K; }/ [% c
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ T' _. H, x! x* ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' K( q/ M! e) G. D( E/ C _, Z- t3 Y
5 D* i" e& k+ l# S l4 O, h4 _. B( Y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
( V5 G( z7 }( N5 I pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );2 t( w) H* i% s9 F% `1 A3 ]
( l% D* r2 z4 X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 @5 r0 ]3 g& q6 r3 W
) \( \6 y6 K* s4 n
( H! w# N' k7 P$ S: c/ q
|
|