|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" m* Z5 C& `3 o, ^. E9 vI posted this because someone kinda posted a youtube thingy about it :O.
* M* m1 ~; {* E) G5 [/ A* w) G- d5 \
Find this in DPSrv.cpp @ worldserver
; M Z3 o! U/ Y% Z+ y0 u H0 z3 X6 L+ [+ i% P. X n# @. J* M
Code:7 x" U9 g: M; ?% U5 }9 @
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )( K8 ~( k5 ]+ w7 J0 @$ n% w" g
{
. l& n. U. x* t DWORD nId;
, p- n6 J0 k p1 v G int nPart;- \% u' [8 W5 }/ U
; h& x+ p1 A5 N/ J) ?- d
ar >> nId;
" ^6 ~- ~6 A* b, Y ar >> nPart; 9 F# E/ V5 H" v( `+ f
: t7 i1 D6 H' U C) p: L! K# d
if( nPart >= MAX_HUMAN_PARTS )
/ ?6 \7 g/ p& } return; `0 l; u6 V; U6 w
) m9 N$ O( L7 {/ l2 C+ q' O+ P
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
1 H# K- ^4 \4 D% b" ^- _" A; z- r4 i$ H# H
, J- M8 J; g/ m$ `
Code:
1 b0 f+ M4 j' a8 y* q6 i#ifdef __QUGET_SWAP_FIX+ h4 r7 f, [' @
5 M: D; h" y+ C, F- w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* W8 d) j8 \, p6 I% I; u' X' p pUser->SetHitPoint( pUser->GetMaxHitPoint());2 {2 ~- n5 ^1 R2 R- F6 ?0 H
9 W/ Z3 l5 P- I0 n+ g5 n
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )) Y4 s% ?) F+ M3 W% Q# [
pUser->SetManaPoint( pUser->GetMaxManaPoint() );. j# b+ N4 P0 u3 {: }/ I; K
5 M9 j4 c( d2 p q2 I3 W& ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ) Y0 k6 R0 m+ R2 e. j: ^; Q
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
2 t1 Z z9 d9 r! B, J/ l! V& c
% U: T C/ [4 Y+ t1 Q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 P; W$ Y; a0 S7 ^
and add under
: p6 M" k' l" l' W+ R' g7 _& G
. a8 ?. I; }7 ?( d. p& gCode:
1 K& h& x/ k" oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
, C0 D/ C5 ^& t) s; f' x1 o {) K. p; {4 i7 P- k# G8 t
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 );
$ u; M& }- Y$ ]7 c& E }this! F) \/ k, O- v" y9 m
6 X% V* Z) M3 t+ Y, V D
Code:
) U0 |1 U5 c4 M7 E. E4 j. ~# S#ifdef __QUGET_SWAP_FIX# B+ s9 @1 l; i. T) @* W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* U9 C9 y* e: ]# G: l$ f- q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* x% r3 m: N; R% L* l
/ C9 t }% P% \) [5 _( x# c" B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! U6 ~# k6 y U4 L0 D& f
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );! w; H, H4 i) E
* s% x* @. T6 U0 y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% c$ s K9 K5 o+ {' L6 m: [6 b
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( i$ X! ?: x; x3 G- F3 |1 J
" e4 n i' [/ N
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
/ p) C- t) e9 S8 }. }
' o! |3 N5 l( A
* ?' m6 G& W6 t |
|