|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
- O, M# d" m% T$ g& i- lI posted this because someone kinda posted a youtube thingy about it :O., B/ t j9 J) B/ Q
: Y S1 e# i! n% }' L( C+ |1 n EFind this in DPSrv.cpp @ worldserver' w0 y1 d9 Y! H( C9 {$ }
3 x) b1 |/ @- k9 i1 U1 RCode:
; S7 F5 i9 s: s# Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ), M0 O! g3 O2 n* W. g4 T a* i
{
' r. e2 ]# h0 ]4 C DWORD nId;
" w8 n' t# p5 t int nPart;
5 p a7 j, t0 v3 s& M; I O' N" t$ d, g1 b! A4 i3 T1 M9 w8 H: L- p
ar >> nId;6 t4 F* d Y, X# T$ n
ar >> nPart;
4 U5 V7 _4 ~7 `8 K * b. V/ t' p) v, A
if( nPart >= MAX_HUMAN_PARTS )
+ i4 _3 w( m" v9 m; ~' p return;
8 I7 _4 s+ m: x2 ~( L/ W. p* t: C8 }/ ?; @
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 k4 L& q* A( B: X1 y9 z* L b
. U# j( p6 j+ c! ~7 m% e- V" D" O
Code:
$ r v! x! u% l& g#ifdef __QUGET_SWAP_FIX% h2 B6 I/ e5 E) ~5 S
% Z0 {; }+ {# n8 S3 }6 H, l
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )5 O% x1 E( B& x
pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 S" \ v$ s6 H3 k* b8 J8 b. z
) k9 S( `6 E- M8 V if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
" r9 Q8 Q( I7 ^8 O3 D, s1 t& z pUser->SetManaPoint( pUser->GetMaxManaPoint() );2 o+ S1 ~* e0 a' B. H; M- h
9 z1 b! z: |9 A& \; r8 A$ R! ^ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 c9 I' ]1 M u' M' W pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );0 {: a, W4 @4 l% {$ q7 f
5 \9 C+ [/ ]0 x* ~/ p2 w
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% B- G$ i/ L" n8 T
and add under
e" k) r2 x4 K7 t4 A% q$ ?
" J: T, t- @4 h/ N' [Code:& y* H0 f, h$ w* ?& O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
0 I a5 a) _8 G# g' ]6 N1 y {4 N, e% ~3 z1 j9 |; E
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 );9 ]: L# M" ?; X& L) l
}this
% X3 ?1 c9 {5 \9 g* ~5 I1 a/ f
" o6 I. J( f t! hCode:) t) f" @# k( c, ?
#ifdef __QUGET_SWAP_FIX
; \+ r- ^% I' \2 d if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, w" }. r0 U6 g pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());; C& n3 u0 d, I4 y; J2 _
! V/ X4 w" d( C if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 S R! C+ L8 ^5 t6 L
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );1 u( n1 Z1 w# l4 {# Y
! I3 f h0 a1 N, o8 C
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% J0 @! t1 \4 Q; l- S9 y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );! z5 I: Z0 Y, p0 K
/ Y5 a N {9 j0 M, k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 m. V+ o+ l; M* V! x7 X$ c# J5 S
6 h% C8 c( y- H0 n3 c) I& U' `. |( w s$ W" Y$ ?' u
|
|