|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" W- t9 a' o, {+ [I posted this because someone kinda posted a youtube thingy about it :O.
/ M7 X0 I& N9 G& M8 c, ]4 Z1 _4 |9 W
Find this in DPSrv.cpp @ worldserver
4 \4 Y6 ~# R: Z" {% l: T
9 }) a6 o1 C( }% W ^+ ^! lCode:/ t& M g+ i" g- ]
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% D# N. M$ S7 z- M; p+ S% L{2 v7 f* t7 Z# V: d4 s; o. u
DWORD nId;- f+ y3 u6 ?5 y; U Z% o
int nPart;0 n. c& ~" V ?, B" z& K
5 f2 {/ h4 L! w+ q
ar >> nId;
1 }+ @6 B* ^+ x b$ k ar >> nPart;
3 _4 z+ J3 p6 x8 e0 m
8 a% l2 t" b) q if( nPart >= MAX_HUMAN_PARTS )
8 m- ]& w g; Q& f3 g- }- m return;" B9 }& V( T. z, b y
( o( K6 b/ h/ H: I
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 q2 p2 q: m5 w- S" G2 f" {0 ]2 L
I) \& k( m. l
4 }9 U! ^$ {+ ?: i5 H' qCode:
8 A) P( F$ `' n#ifdef __QUGET_SWAP_FIX2 E* U1 w) l9 c" n$ d- O1 b$ I: j
) q1 e7 m% |( {: |0 `# g: | if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
4 D. A! p; ?/ ?8 F! i* ?9 G pUser->SetHitPoint( pUser->GetMaxHitPoint());
. q" Y, R% m! f- W; T
: b& u3 C* ~5 K. c if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- h- W7 V+ J6 C' D: ^# [5 b$ B$ R; e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! w& K* ^# A( ^& {$ a" ^3 b' ^6 \+ l6 T0 g! X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 m! j! s/ f1 g4 ^5 t! a+ v
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 Y) x$ c. f4 E' Q" j! J
9 ~9 d4 G U. z' J& @; B#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' R8 I4 z* @2 K& ^and add under
/ ?5 N) U6 y) |' p# B
+ K) r( W. G6 \& JCode:
& s7 |3 C" c& ? J6 Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 p3 k* t5 {# ~
{, D; w$ [6 O. c' s* Y; u
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 );& r4 a5 ?- e+ _9 Z
}this
* }# Q% A7 j8 C/ \$ O, V1 o: r0 b. e5 e' @. d Q' d# x; E
Code:
( y: D; ]9 d. o8 l# |#ifdef __QUGET_SWAP_FIX" e& P" \. B) B. d. v. d, q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 p, L& S* c: Q) L) F pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! T0 `8 ?7 H4 X' n) y
. p+ l# l! p" x( J7 l3 M% K. S, w if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )& S/ I4 C! s3 L0 x- N6 f3 l' D
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
5 |# X) Y {/ K- U. O' T) ~8 K8 _9 c, N8 ?% z" U; j
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# B3 y: ]/ Z$ Q, S; [* L# i: l pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
# }& ]% x3 j8 @5 f" I- T1 i6 g* D: O; ~( }- C/ m9 o
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 Y4 o- ~1 W) J; S
0 J. ]. X5 Z+ L M& E. d" N8 H
0 A' w. V, f, j1 W1 l |
|