|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 \' K' y! T N, `; m: o' x) e
I posted this because someone kinda posted a youtube thingy about it :O.. k8 S# C$ O* b: ~& C8 m& y
" R) U9 U, Y; p/ X8 H k
Find this in DPSrv.cpp @ worldserver
" R% ?" p- e0 k& Z# _( m+ ?& k" y% a9 D' O5 ^+ L! W
Code:# w! i; v- j/ H7 P9 S
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 Q, m+ E; Y( W' [
{
: {2 y9 P {9 T) a+ o& i, j$ q! U DWORD nId; J7 \+ u# _8 a
int nPart;( ~7 j3 y, I4 ?: e; |" c
- R8 a# w4 t* M9 S; E. X% h ar >> nId;
4 o7 p! U; I, m, |) ] ar >> nPart;
: K' [( g6 H% Y6 J0 D) D 0 z" N9 @2 a; D: M3 f% u/ j* H5 t
if( nPart >= MAX_HUMAN_PARTS ) " s1 X, B0 q3 u+ }2 S0 }
return;4 k7 \' H& y6 S( ]1 \; I
! L/ h- g; g' C4 ^+ q
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 J4 N$ H; |+ ~7 i& o) ?
1 `: ~5 s- a% e. t0 k2 b; ~& D$ t/ A7 K% Y& i' t# F* S
Code:
0 g- H& t: J0 ?5 K {3 G7 i6 H#ifdef __QUGET_SWAP_FIX
, @- F- ~& w) J5 F5 A# D: s$ R% }1 g' E- ]' N" B3 X9 y2 g7 X% G
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 U' [1 `- ^ A& w; c' E
pUser->SetHitPoint( pUser->GetMaxHitPoint());
3 J& [1 g% t: O% d6 w4 S* L( y! O
; y4 h! V9 B7 D1 F if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. X9 T. ~2 t$ p2 [2 L! F1 _ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 g, l" ` G' b( G+ J# C4 P
( n* c4 }' I' Y8 ^- n2 u& ~4 L* ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ); l% d: ~0 }4 R) E& I
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 s3 e' n; h: U, m6 H
3 x. p9 P, Z9 n: z5 Z8 V
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& w5 l5 L- q) y5 g u) k" `
and add under7 E1 \$ L/ S7 ?5 t; H; C4 I
; o8 K4 S5 Y( \$ }3 s8 k# G1 oCode:
1 }) X6 Y8 X; `7 H8 c1 Rif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& b% n" I" \, S5 p
{
4 B0 Y- L9 p( j9 H 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 );
2 H) P1 i5 m; @* O }this
7 r# v F% ?% F7 I& p
6 u$ p( n3 q: b( s z( ~; t* y2 tCode:
$ v3 U2 L$ Q t5 b7 L#ifdef __QUGET_SWAP_FIX3 O9 s$ v( z% R; J7 T) f4 C6 ^
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 f5 W5 A2 e* d! u
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) \" z* _: q; }1 P
' n& N( ]6 H. H) [6 q1 Z4 f
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
0 t+ @5 Y; f6 Y% ^9 v pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( j3 i4 T$ ?5 a3 e% L1 F: `
8 j8 f. L+ \$ k- K if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
3 u: [: ~: Q& J1 x pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ Y4 L2 Y% E4 s) M! z8 K
" ]) a! n* A! ~#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
u5 a" p5 @2 @1 _; C
# b( K6 R9 k3 G3 L6 j8 ?/ a* a- e1 h' V7 N
|
|