|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . h1 L- v5 k* Y) g
I posted this because someone kinda posted a youtube thingy about it :O.- S2 M9 { g: x- i0 m2 r/ E
' i% \! D" y0 l2 K
Find this in DPSrv.cpp @ worldserver5 z( q! I6 r( V/ u5 m; Z
# b% s. z: }8 y
Code:" H. o1 ?! @6 r0 c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )* x% Q0 ^3 ~0 f
{
( I6 {% e3 A0 s3 n2 H# {. P DWORD nId;
. q1 k- Z1 Z ~5 m: a- G int nPart;
$ s& ~3 W: B; l( I2 G( Z) o* v* ^" |1 ^' j9 A5 ~9 t H1 S
ar >> nId;! |* t& F% T6 S' r9 g h
ar >> nPart; 8 Y6 s2 G( E+ D/ B
8 {! A' b$ Y6 B3 s: T
if( nPart >= MAX_HUMAN_PARTS ) 9 B- p& i) \5 q9 t
return;
1 P& p6 r' A3 W% Y( {. a
2 U9 _5 V# u! {7 ? W8 L# Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it/ W/ A ]/ J2 K8 t) a
6 K: {! A* q/ Y' B, M+ ?$ Z# k1 C1 _
; q( m- h& V/ z3 U( j3 G9 ~
Code:4 [' I/ z7 J' |1 [6 J
#ifdef __QUGET_SWAP_FIX0 E/ V; i" N; M# t# L' ^ _, M
+ S+ w6 M! n6 Y) f8 H+ G
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# V8 ?9 o+ x. @5 |" Z6 `! s pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 `- c' k+ b* i# [! f0 |8 Z* _
0 w. ]+ I4 H& p2 z5 A, _: ^* Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ {7 f% l. n8 Z4 Z6 B
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ r/ b( I( _! F, {% w# I; J6 J2 r+ W" h( y. V* {
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- v6 m4 p8 [' {+ z& B
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* d% v$ s! o5 _
$ N K/ `7 x u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( c) n" n0 [* aand add under, p' J: t" C8 ^: z7 Z6 C" j& c% W) E
) L. m: f9 O3 M; p: y/ K$ F% x) vCode:5 l; j$ A0 Q" J6 S3 P" u: ]# h
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
]/ e2 q1 L( O( R* v$ H; _ {
' w. F! a6 F; B- ^& f 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 );+ G9 e' c5 s2 P7 k. @) z; y6 S
}this
7 E" O& V2 Z, h4 f" e( C
7 b( a" W* y7 q* v6 D G( w. xCode:
! h t U8 S: l' l#ifdef __QUGET_SWAP_FIX. s$ |+ S3 i! |1 y; |2 w
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )" h4 F! V) H5 `% H7 I
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( Y# x2 F# P- q
2 U) m% W. c& Z2 G. h
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 x& X7 o0 \; q7 O V5 i8 a: \: c pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );7 l) C/ X4 b. e* y0 G5 [: h3 l1 B C
! I3 D' N3 P. }- p( m) o3 }$ ]- y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )# q- G5 l! j6 N6 n7 `
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& A$ D `& `1 `7 n; L4 K# d
! p+ H* e7 F) E- u; n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 O3 I) ?6 a2 M" J6 ^9 _
$ q0 Y" J% D2 N5 S" }* a/ G; P: z+ w9 g/ p4 B
|
|