|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 R# |$ s# h0 V' a$ Y& U/ mI posted this because someone kinda posted a youtube thingy about it :O.7 z( L+ J& ]0 H& x5 |* ?
$ M* @* |$ E% \
Find this in DPSrv.cpp @ worldserver2 N9 b2 Q9 Q7 Q1 G2 J( t3 R
" }0 ]8 C" D+ [ c- {Code:1 @% D6 ^) l5 f' Y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
4 P% B7 T2 Y4 Y{1 g; ?1 V0 d( M6 P R( G
DWORD nId;
2 d1 c0 k, j7 f/ J) w/ N int nPart;( F0 |$ k& G5 T" Y3 K7 I7 }" r% {
% r$ B* H8 {) `5 ^ ar >> nId;0 o; O* t% A6 w3 d
ar >> nPart;
- u T6 ?/ v; h/ U8 q! u% x5 `
( n% K1 e. ?: J6 }" D0 ] if( nPart >= MAX_HUMAN_PARTS ) $ R: T# x& U& E$ E3 U
return;
% ?: S& W0 A/ C7 J+ Z( l
* m9 F) x. ^% Z1 I) ~ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
$ H/ r- c) a j3 Q5 W
6 F! i8 C; y/ i9 _' F
( a3 C9 m' ]# \Code:
" Q! ?1 q+ D h; s+ [) @#ifdef __QUGET_SWAP_FIX" `2 b8 P( R T7 z4 _ B
4 h# U6 ?" `0 [5 c$ s, \( \/ L if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 A( A8 A Y2 x; i- `
pUser->SetHitPoint( pUser->GetMaxHitPoint());% S2 J1 q1 V6 c8 p* f
7 {$ e5 L5 h# ]1 X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )2 p- [* t+ N+ r0 q" Y9 w
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
V1 A8 A- e p0 p! E3 {8 ]% {
6 g1 i* A: Y& Q: M' u if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )0 ^8 O+ d4 e/ c
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );8 w# S, r5 i7 U# V3 [( E
. l Z% t2 J- Q1 x2 ~
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* x9 ?" I/ W% J5 d1 a8 V/ h
and add under
) \- \+ n7 n" x4 n g+ T3 j- Q9 f$ D* U' x5 H
Code:
, f& D9 C# x, ^/ H0 qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )3 N: V2 n3 G/ o0 P5 O n: v0 I9 `
{ _3 R$ T% I/ ?; n) 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 );4 A" d5 J+ W7 \
}this
! E5 T' e/ G) ^# C a4 C" N( h0 v, |+ [# |. o& ]6 ]' S
Code:* T0 d9 U# f( C4 a' \
#ifdef __QUGET_SWAP_FIX6 s) }0 J0 R+ w( A1 q. W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) D, o' r- L/ I7 s pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ |1 Q3 c( f% B# O6 ^ V! R. f# j' o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' g3 K8 C; a8 I# \# \2 w9 M6 s
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
! @) r7 I, ~" l( [) p% b- ?2 _* }' x0 S
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 A; L. p. u$ b% }
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
/ m% H2 L* `9 n" W% H. h0 p! |
! Z$ W0 B% C; w# B2 @0 `9 _, {#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' D% {( }9 w# H5 z, T- r
7 j6 v' ~5 l$ S7 Q! \/ V$ r( W3 N/ d+ K, y# p+ ~3 j/ ~) d* |7 N
|
|