|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ) A {" n/ w8 I5 x; y2 S
I posted this because someone kinda posted a youtube thingy about it :O.1 t& [9 X. p% n4 v, E% P" N
' \: U9 M6 V j X2 X9 h8 P
Find this in DPSrv.cpp @ worldserver
6 ]0 ?0 `/ j. ?# w H6 r f4 }# i# G& ]! D6 p
Code:5 E$ f; V9 {' @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 n1 U8 u U! B& M9 X{
: Z3 `2 A- [# B DWORD nId;
* w- P3 l! w# d4 [! F1 {. } int nPart;
+ }; P( W' W5 E* S1 i9 `
) d+ s, s. W+ k2 g2 t ar >> nId;' j/ x; P4 h4 v+ ?# Y. _/ ]3 ]
ar >> nPart;
3 h A3 e8 l4 |) f8 O * S; j A t4 t# G$ g/ b7 {
if( nPart >= MAX_HUMAN_PARTS ) - C; n6 o9 z6 |& a' b
return;
7 f% o% |- N+ G S
- {! G- E3 z8 C- k. x CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
T% M& ?3 k/ C4 c- M+ N* ?! ^* S# e' }; G
! i" S3 b" R& J' }3 {
Code:
2 w/ Z+ s) [& h#ifdef __QUGET_SWAP_FIX3 `% i& z& F) H9 H" e/ L
. s7 v" j* b( O" l8 k) l2 J; S
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 Q, l; a* r9 m6 _" v6 W% m* w+ o
pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 l' d4 m, X, |' K" q' e2 J# e5 ?+ r k" \6 q# [( v( m! c' z# M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ o3 u' S! b( Q. M" ~ pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 U. l9 \1 `( d9 C
9 r, @" @5 T+ i! ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% s6 @5 d" X9 v
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! E2 p. ?0 ~; O+ Z+ H
# U# M; D9 ^! K" H. u% m
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& f: L/ D; F7 a# N0 O Q
and add under
8 g7 H1 U9 B. Z$ `. y
% L5 p, V* ^! ICode:' W& n; m8 s$ v" V% D& J
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ W- ^) N+ P7 }; \$ j4 U6 L' N/ ] {* v2 C+ ^. ?( ?$ M4 P4 P
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 M& n% c' _/ A' f" u/ B0 ? }this
7 u8 q4 P" o+ W1 T, `2 K, a* n. Y+ ]
Code:3 T) K8 N$ h( `
#ifdef __QUGET_SWAP_FIX% A4 L3 D/ [7 b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ F- r& W' `. h% T f! \ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, N& u/ |9 W/ W
% D7 n' m" C( ?7 R0 P8 z# M if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) r! Q& O6 ?% S! u% k pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
4 i/ W/ W9 I9 K
% {% o* {' B' }) i5 }9 L if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )+ z# ~4 d9 ~# C8 Q: {0 j) m8 I
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. z. d* f! ~' m) d8 ^. o: |) i. J2 ]4 B' j H
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 {; }: [. w& k( W! ?
0 P/ E5 P6 T0 L
: m4 r! b# L1 p8 |4 D8 F8 x2 `
|
|