|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' V. N# ~+ a1 [& |7 b# \" W5 xI posted this because someone kinda posted a youtube thingy about it :O.5 a; a& ]$ W" }: x
1 w$ _( m( a& _, }* H) B* c0 t
Find this in DPSrv.cpp @ worldserver
! k x, k& `5 C# S; Q1 `7 i) i) z% ?! p- G. n# |$ z, Z
Code:
5 Q& w) E% f8 |0 W" Y Tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 h9 K1 f( |7 s3 X{
2 _- P" }$ b7 N( ^; g DWORD nId;
+ V6 ?0 B& s3 X7 k# e6 G7 w2 R int nPart;, P# ^/ X9 H( T$ V% D, |1 E
) } m" Q) ?- q7 y* V ar >> nId;
4 z( u4 e. [; a8 b5 S ar >> nPart; 1 \$ c0 n0 G9 i0 I7 s& g
1 H4 n/ N1 D' u# Y' T* E8 L; _7 A& F
if( nPart >= MAX_HUMAN_PARTS ) " X7 A( Z4 ]. K% g- L
return;
2 y' k/ F8 B6 y, k7 e
1 I% B2 }3 H, c/ j7 ]2 ~ F CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it3 `& Z9 l/ P1 ^, W) O5 [, f4 V* B& G
8 o* H* E/ A$ p! ?+ ]; A% A
# o q$ e7 J) X- G: @1 \$ w
Code:# @: |! O* P& r" ~3 c" f1 t
#ifdef __QUGET_SWAP_FIX
& j& H' o1 r+ w6 s) y3 j9 f7 ^/ {0 }! D0 W
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 [1 S3 F# o4 o
pUser->SetHitPoint( pUser->GetMaxHitPoint());
. g6 C; E9 [+ N
% f, u8 r$ x( b. x" S/ u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ f6 d/ @2 o# A; J1 ^
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 b% `) ^& A* @- \; m/ u, d+ f4 R
- g1 a# r: W' \6 Z8 N3 q! i if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) ]' r) o6 b, ]9 A: K& J3 `
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# B& D5 P% P9 J7 s, v5 O, @: j5 j( }0 L, x7 X# e, i F, K) ?
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp, u& b) H$ r( b+ m/ E; {
and add under/ K, S, P( F0 j3 T( o
1 M0 l& Q5 B4 `5 rCode:& N( W3 P8 {0 S6 a
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); V# k. V6 K" W y9 k* N6 |+ c+ y: A
{
9 G+ n; t# s& d7 N7 _5 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 );. t" e! p8 B4 f6 g3 W; Q. \
}this }+ e0 E! ~: g* Y
& @ d a; d5 gCode:0 t$ q8 o$ P: B% ^" W
#ifdef __QUGET_SWAP_FIX
: w9 \7 w3 @) H! p0 C if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* m0 I/ b& x8 C- p. m% F pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
! \2 b" s4 @# y3 V2 W7 u7 R4 S, U7 |* A, x0 s' ]
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )0 E7 q) b# F( f& `4 @) u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ X3 ^. {& y7 t: O: |6 b( U" f& y* h3 C' D: l% ]
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 R( O# w" m |8 V. d( m- J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' }- B, C6 R/ y/ P* h4 ?. ]3 A
5 g# I) p6 [: k8 v
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver / u# e) {- W9 W) b f) S
# ^+ ] O3 h6 g' f9 c# T
: G% \$ }) |3 b# E6 e# w( l
|
|