|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% a2 e% ~' e; iI posted this because someone kinda posted a youtube thingy about it :O.
( Z6 M" y/ l3 f) v8 K1 j. ^/ l9 K, g" e
Find this in DPSrv.cpp @ worldserver) C V$ ~) i O# w
/ l# @/ E) w! h. {- P9 M
Code:
, T; H& J( {9 f& H/ w. d+ fvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 X* w V! I1 f1 T& U
{" |1 g+ T1 A: B( V9 Z
DWORD nId;
5 c' `. Y: T5 _, |1 S% f5 B int nPart;+ |; j7 D6 Z4 L
8 N9 f, }; d0 o' p( M, o9 Y ar >> nId;5 f+ ^5 H" r" H- {# H
ar >> nPart; ; _" B* j6 S% P. o& O- N
0 C. ^) r. v: r+ s# h, i
if( nPart >= MAX_HUMAN_PARTS ) # t* e6 ]0 T+ B. ~+ U
return;
" P$ Y: c5 }' f& q1 x3 Y5 i1 h5 w& I
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 q2 k) C- Q8 i& @0 Q* v7 D0 c% n) G" |1 A* v3 L
" s5 a- v, L" U( F4 I7 a2 ~Code:
% B" r9 H! t+ z' m* }5 a3 A( n8 H4 ~#ifdef __QUGET_SWAP_FIX b& ]+ o4 c% p5 p, T2 Q$ m; L) p
5 \ n; b' X7 T2 ?$ `8 c; H: O if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 M7 P. v" V! I pUser->SetHitPoint( pUser->GetMaxHitPoint());
7 |& Y+ Z; ?# o; m6 i# H! ^1 w0 H' i
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )! a- Y2 K! E# ^# B. z2 F9 q! e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
9 f1 L9 e0 J2 K& r' o* S
( m( L, a& }# r& a) y if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 H+ u' m- u1 W: `0 \$ m! m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 S6 d. U& L" Q3 {' b; `8 V
7 V) E7 k3 Y! _# ?- _1 ?0 P$ ^, o
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
/ g* _. S( D/ Tand add under+ t$ t# `# l2 u* ^( W
5 l) M5 D( B5 r7 @Code:
+ G1 H% A" t" s) |; Uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 e/ i$ T' g2 ` |, d
{
; i( H) H9 Y3 i8 G- g4 q 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 );. i3 C( H# H# [
}this
* I; T/ h1 M4 B5 |6 f" d. P
% ^. b" y4 q k OCode:
! F% `7 `' ~* v* V1 [#ifdef __QUGET_SWAP_FIX
' g/ h4 E9 x7 Y. k" b- S9 M) g$ o if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" r- M6 p5 y3 y% g- K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
6 ?4 y( o; y) G# x3 s l! L5 s
# u8 \' ?' }1 o if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
* C; J" h) m+ W) H+ ? pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( J) l8 ?( c0 ]/ u! I: A3 H0 f: `) a, r1 ^, W+ J+ l/ A5 O+ f* c
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: K" h- U" W- g x: ] pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 a1 o9 S% i3 W* v
$ u3 ?9 i4 @5 ?6 u4 z6 L2 V, Y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 P' \ _% H B* C
$ p$ s6 W2 X. H( U# e' r8 _, @7 J
& q9 D O" X4 s8 X. G, e5 u |
|