|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
( r8 J5 f1 D/ J+ UI posted this because someone kinda posted a youtube thingy about it :O.! M+ Y6 E' e- [* a- L
, e" f, _8 K' I4 J9 [1 Q
Find this in DPSrv.cpp @ worldserver$ E' ?+ Z- a: }/ N3 m p
$ G7 G2 v+ {" ~ f5 t8 [- nCode:. @0 r9 [3 r" D8 n2 A! A
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )$ c$ Z$ Z( B( P, Z6 i& f
{2 O1 }9 I" f7 n/ S7 e" s
DWORD nId;1 u- p5 P1 D/ C" ~ D) V
int nPart;
6 C, i3 P' M* j3 @0 h0 f- c+ R" |5 Z
ar >> nId;& _" Y4 `6 j, y+ m1 L
ar >> nPart;
* G) w% A! A9 @+ Y
) z6 z* [4 R& k% Z# S( t if( nPart >= MAX_HUMAN_PARTS ) ! i* d* c1 p0 h* M1 o' y7 Y
return;
1 ]: `% m$ ]8 z% m5 F3 }* J
# j6 f/ |5 T5 \3 g' b- e7 t$ b! c CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( b/ i, w L h: Z O) Q- G- G
$ p3 L' y/ o3 o- p, _0 J2 P; E+ f' Q
8 j. ~! V$ N. a
Code:; z7 u% E, h% {( u
#ifdef __QUGET_SWAP_FIX0 w$ @: z: t9 j( e" A( L2 S
: `% N. P- F: o- K3 \& O7 h if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
. j* H0 x/ h; y4 g9 ` pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ j# }$ {- k, l _8 K4 O( A5 j( C# k
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )( b# A& G' S0 g/ c4 Z5 p6 c/ D
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 s' d: X) |, }" o+ n9 |( k8 \; R: D. k, P
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
& t) O/ f2 ^3 R D0 u* {) b pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 }& M. n# Y+ v' ]' b& c& q& a8 U9 F3 H: j
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) P) P& E6 S( i5 n4 a) Y+ P
and add under( p( K; C7 v) T2 Z y; I
$ Z% F2 H( T% ? |" ?Code:
/ k7 `5 i1 T$ c0 w; ?; A+ Jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 Y4 X1 `. V' ^% D {
# A( z! m* x _0 q/ n( M# ^ 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 );
0 D3 i9 L4 C" ^5 f' z }this+ U9 x% Z f6 {' h- H
9 g) M1 w) ?* m; }8 Q6 ?
Code: f* a* a2 s8 y. S
#ifdef __QUGET_SWAP_FIX
8 w. c# e. Y/ y% [ F: t' E if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )6 V+ l- A% m( [+ `4 `2 |% Z
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());: M! ~# M6 b q' h
" R# M, d0 z, A" u if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ m/ h7 K, e- p7 n pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
4 @( H; C/ C4 T; }7 b6 [5 E1 n+ S# H3 e+ u1 G# K. {
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), r* V# T3 o7 @( N/ K& G, D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
) s6 @8 J+ D3 G$ k' k6 M; g3 g* z1 j2 x2 F+ n& ?
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver " H8 Q& t6 `) `0 d$ b& L$ c# {2 b
7 K, N% S1 `# h+ S
$ W# v2 y( d/ x/ [6 v& T! t |
|