|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( X- A, b9 o4 FI posted this because someone kinda posted a youtube thingy about it :O.
! K9 @( Z J- R) C/ W; M1 A- O e' x' j' ]
Find this in DPSrv.cpp @ worldserver2 v0 e E9 P$ ^
, X k: v* Y) B3 b
Code:
0 [- w: \5 g; {' F: g7 ]void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! w) X' z' T/ P! l$ x
{5 T I4 I9 }( g: e1 c1 R- ], ~$ J
DWORD nId;
& G/ i* d7 ~; M! m+ E' T3 U int nPart;
. e6 U$ `5 W# F" Z! p' r7 a! X4 o- b1 f+ d5 l3 d1 j( S
ar >> nId;
: B2 V5 i" e, p1 s4 l# `5 R' K ar >> nPart; ! y5 j! {- j- H% Z0 h& ^
! M; M, F, D! R4 B
if( nPart >= MAX_HUMAN_PARTS ) 3 ?8 c+ _. q5 b! @ T5 W6 r: r
return;
& j9 A& N8 _) ^8 L* r( h5 c$ q3 ~ D& ~
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" v, D1 K0 h3 \/ c X# l4 E' l" V; @9 q- ?1 A8 y: x7 j( T. v" h/ j4 q
, o. n( \- `7 p% B" J/ d
Code:* }+ X- ]8 u {/ A4 K. K; e3 B( C
#ifdef __QUGET_SWAP_FIX
?: I* a" L- j" ^9 [! S& L7 ?6 o9 c2 `" `# `
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
+ }3 i5 _7 H9 s& Y' M pUser->SetHitPoint( pUser->GetMaxHitPoint()); q$ G1 \* \% L: B2 W0 F' L
+ `* W3 t/ m( B7 s2 { if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 s8 m! S. c4 b6 {6 L( S pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ v" ~$ H* a/ v$ j' s" v% v p, A4 A, \! C9 b6 d
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), H. E7 S) k- Q3 @' ]
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; u) C' h Q& }, h6 f; A
( E; Q" ?6 D. c ]4 C0 p- W, Y4 Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) `5 ^8 B: Q( ^& g( r6 D
and add under# T% z; w- z, w( }6 t" V
0 m! f" s0 }9 j$ y4 C. ?0 |/ ZCode:( L2 {0 @) d% B. B$ Q) G; }
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 @1 l2 q; ]9 k W6 V6 S {
( _: `: R& X" y8 \7 X% y9 y, v 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 );
4 j3 a! d4 @. P$ b6 b. |" Y5 j4 b }this
" y( m* [/ z0 E7 U I; t& I; Q% V. g8 D
Code:9 q: w( }# B+ L
#ifdef __QUGET_SWAP_FIX
3 e. s# h. x" Q0 @/ z if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )$ J& G/ l# H- R! x- x% c l# N
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
1 Y3 e+ w2 t4 Q8 `0 c; @
, P9 U# |# T: ?/ \' Q if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): @; o. Z' m$ C' m- _2 T6 p8 b
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 ^2 y& F+ r I, P( `
, F- W# X% W8 ~% g, X! Y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
& ?+ g0 T. O6 }; v, m! l/ u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; z8 ?* h$ B7 w! i5 w& h1 d
1 A( i1 A( T! g: {#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
% z* R' }) r; q3 P' ~& l- H3 w- L( } M
4 r# @1 p0 }& m) e3 K& T6 S0 U
|
|