|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 t/ S, P. V9 O9 t
I posted this because someone kinda posted a youtube thingy about it :O.( `0 O( T9 c& ^+ B
. f; O8 ], c/ j L
Find this in DPSrv.cpp @ worldserver
6 G/ q+ p, e f, x8 h7 x0 S: `8 ]8 f G) O! b
Code:
' D6 C2 [+ P' ^! Y8 z2 s0 ~void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
( g; b2 ~. i4 [# ]4 l5 ~+ y{
4 F9 V6 Y# y; D$ ^ DWORD nId;
% v% o: K* o V3 w1 p0 k int nPart;3 a& o- c2 X F# g' z
0 M/ Y" K: d# `3 ^. K+ R! F. @
ar >> nId;3 r% k3 u7 R. B* N
ar >> nPart; % G4 J( g( u x, g9 }
( L: T8 |# ?$ z" m o/ Z if( nPart >= MAX_HUMAN_PARTS )
' U$ ^# x4 H( y: a# j return;! e: T( T& K! o: ?8 _) S
+ X4 K% O2 n9 b4 x7 Z# X% q
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. }0 C v$ ?2 [' c* V' c/ q
1 Z& p' u/ R+ z! l8 \) Q( E' Y0 V/ e% M* O7 S8 m: q1 a
Code:
' d& { L, q; Z1 Q#ifdef __QUGET_SWAP_FIX
/ D r" p5 i1 T6 A5 V+ E! X6 I. t! M' b) E
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). h. b; G3 K- d$ i6 F: k
pUser->SetHitPoint( pUser->GetMaxHitPoint());& k4 p5 v. C( d0 O2 `5 J
& o" C* M% z3 I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
7 F( Z0 p, Q. N, U5 e7 i pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 h1 \7 v" O' e" o4 a
% a" R( y& Y! h2 ~; _* D8 {0 e if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 I; ?4 o3 R5 I/ `- z7 g
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );6 `/ Y( \, e2 d! v% h* ?$ v) [
5 `. J" Z0 h8 x% Z$ f/ p
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp+ r9 \' j. e2 ?/ t
and add under
. q$ M+ b# _1 R/ ~- A0 {8 g6 O, `5 N2 ^& K
Code:
8 X5 V" q5 T+ V% g9 W3 Z& Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 t% N' u( W& K2 V3 [! X$ x {
+ N: N1 Q$ X x, F9 e; y) V$ N& z J 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 );
, r- l0 S& I1 y! | r0 m+ | }this2 N# v4 C2 s$ e$ B3 S2 U; ~2 c. n
( o8 K6 I, b5 h% u& T7 ZCode:1 @0 L$ t, d9 Q# o5 c4 z; v
#ifdef __QUGET_SWAP_FIX
# N. s# B* T& Q. C if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 b5 O$ e% d( J* M7 N4 o
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
7 l6 t1 t6 K& ~$ |/ o& W+ O0 ?+ `1 a; r8 E* O" Y
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 q8 j5 t8 \4 |0 s6 I
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# k7 R$ D B4 ~: E) L& N1 [( A: |* L, V
2 e8 z( s1 S& P0 J& S$ F
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ x8 e* V" G b w# T
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 l) W; ?" O! X4 P/ B
& Q7 q9 {4 g& n
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 L& K( ]2 m/ n$ `1 M: F
1 P" p, ]6 P: V# e& d% i
& X- v6 u0 D" k* ^6 C
|
|