|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* |$ Q/ N: U+ }# G& e# j. iI posted this because someone kinda posted a youtube thingy about it :O.
5 C! l7 r6 v, P8 K8 n: y8 V; z' T& I# _# y1 U# O
Find this in DPSrv.cpp @ worldserver
9 s, Q2 l0 M; R" l% r
. X2 W( z1 C/ ]$ _Code:' u. G5 z) i! v6 ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) `* L; Z& f& n) p
{# t) B y5 V9 e7 N; P
DWORD nId;
* Z+ m. ]% Y. V, S% S3 c int nPart;
5 u' I$ F' w/ B( T
% z$ [' [1 E9 A% U, p ar >> nId;
2 ]0 D: `# Y) P+ s: y% e0 L ar >> nPart; ; Y+ A j+ ^* F
. p' D }) \' @0 u
if( nPart >= MAX_HUMAN_PARTS ) 7 I V y/ g/ J
return;
" p6 [; r% A, Q9 w! Q D# R7 r+ R" Q5 w7 z3 }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" V0 Y6 m; J: q( f1 U+ y3 o% d6 z, M; [5 ~8 \
! ~- } k7 ?& Q3 ^( p
Code:9 F" f6 ?' @) y1 g# u1 `
#ifdef __QUGET_SWAP_FIX
9 J4 {4 z" b" H1 g( t8 A/ `% Y# o1 l5 o/ d1 T. d! p$ c
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) G X1 G/ z) {( C, p& d w pUser->SetHitPoint( pUser->GetMaxHitPoint());
1 n0 Q! {; K9 G* @/ b/ S7 f! [2 F0 e% @) J) a
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )7 X/ j* Z8 C- |! s. _1 L$ ]
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ e. t9 V& V( m6 W! F' s4 U# l/ Y
# Z+ p% o @( ^1 b# E+ B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
3 K2 S. _5 C; N* G+ i$ y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );: z$ o. P7 e& i# |" g3 D
1 m& E, M H5 q0 k
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& Z- r! @; P$ F' ~; i0 R% T0 i
and add under
3 D, {, T: F. G/ B% n I) @. C" S8 K7 j
Code:
# X0 U4 U* C& W9 y, k' [if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 [& ~$ {' c1 s {8 w Z# {/ |' S, Q1 W
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 );/ p% C O |: p% m
}this
* U6 l( W8 i3 R7 Z# d$ y* L
9 n1 U; s* |5 FCode:! s! h6 c9 D2 H, K0 H" K+ x! I8 q
#ifdef __QUGET_SWAP_FIX0 N3 ~ y" ~8 q
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 x* c; y; \' I, P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
J/ Y6 O/ }+ b0 x* B) u. C Z8 S8 P& m6 J- G
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
- v" l0 U- E& } pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );8 f7 p9 x$ w6 I5 H# K
1 a g" H& R9 n) T7 ? if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). U% _& {% }/ `" x- x* q
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 }3 j5 s0 E( w
: m/ D0 x9 `! [: @9 N# V2 v#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 d+ D* S% P' h" T! K
4 u2 }) z) c$ C1 T6 D4 }6 e N
2 q% U. O- H0 i |
|