|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked + C' v" \& c1 [6 }( x
I posted this because someone kinda posted a youtube thingy about it :O." J9 ~+ R7 Y- X/ K' D& C- G; w
3 j v: }9 r6 F
Find this in DPSrv.cpp @ worldserver
3 A2 z9 Z1 a2 J9 \/ Y* Y: [9 R/ I
- g) ^, h& E% U) B2 u8 gCode:
( B; C, @, R4 K( \+ J" K; tvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" u" |. Y+ H* ~- v% W$ [& s{0 Q8 t. c3 D6 D, b+ z4 W" h' z
DWORD nId;
9 y4 l+ I% n3 d+ y+ N- [! \8 e8 S' _ int nPart;
6 g; u& z |* Q: h, R
9 X( h4 } K5 N7 N; w& m ar >> nId;
$ M7 s9 T y$ Q8 p: |2 | ar >> nPart; @) g2 B& {( c) Q% ]0 v" n6 ]7 V* X
1 y. O; ?' ?% H4 v if( nPart >= MAX_HUMAN_PARTS )
, d: G2 Q0 P2 {. f# F2 ] return;& e% ]6 b+ C" a' o: M: y
1 ?# ^, p1 i, z: X" w; G
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 a7 l) l# Y$ k
( u. D2 C# S* y7 b
' [2 Y3 z- O) O* g% uCode:
5 |( e" M% i: _. Y7 Q#ifdef __QUGET_SWAP_FIX9 z5 k1 s0 Q9 r0 t! A0 e& ?, L: r, v
5 x- U7 U0 |% O- H if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- U5 e- [* V t+ n$ m
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 U7 x6 ]* X) L
2 {$ ~; ]3 @7 d2 u# c
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% _3 r8 T( z. ?: ?& p pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 B! q' F+ f, N/ K# M0 q" D7 j
5 |% P1 \$ J& k! I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
F1 u3 B/ F% G1 B; T pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
3 e1 I% J) A; e3 z, Z- O# ^
3 m& F" G5 Z* @" x U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp! r3 `3 G& O2 }6 h4 e
and add under
. V; u: _! v" ^5 [" Q
" m( M0 I% A$ B5 |Code:% a: O( R' T3 V
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
+ c: W2 I0 |' }2 d0 a3 A& L {
5 |. s3 L3 ?/ L" V. J" w: z 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! G Z& V2 }; o: B- m+ y3 |7 Z }this
C/ T- r( d) _5 R$ I) U' m& ?) d: F0 q/ O/ F0 \ Y
Code:
/ N7 {5 C+ G' B. n#ifdef __QUGET_SWAP_FIX' m1 m" A/ r* I1 x
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 N4 d/ |1 o- v7 b4 V1 n. h pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- s8 T3 E0 W) C+ Z8 ^
) g8 V: o w2 b G! n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' S s7 U- Y' o; o$ M/ x' u
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
: {$ S- b2 H _. m0 S/ O. Z2 k. a" x5 u$ T
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 ?5 | E8 c1 I$ Y6 P& m pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
& M3 S) M+ d) g6 Y% P0 {/ O& L d& U/ k
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ' R- Q, j, N% _6 ]% l9 [& ^
- s8 |% j/ M* F( E+ C, N5 W
2 W+ E! Y& a! M' _ |
|