|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 r% W6 P9 x0 u# S
I posted this because someone kinda posted a youtube thingy about it :O.
' ?- w1 L2 h. ^2 {- E( l/ v! U8 k# s. H
Find this in DPSrv.cpp @ worldserver
3 O P3 n K/ B) i, ]# O8 M2 y. V7 I, b' F3 }" q6 }
Code:
) Y4 a3 @9 `- X ^void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
8 j% [2 E/ a2 V5 W; e, _{
4 b* d. x+ `6 V7 H8 T8 Q DWORD nId;
5 f+ t( G! B- P" ~- s% `( M2 A% _% Q$ J int nPart;
$ Z. F( k7 L3 C* }- N+ h5 P+ M/ [1 S! c
ar >> nId;
* L$ X* `- U% Q' S ar >> nPart; 2 C- @5 t( E4 ~% q' u+ ]
$ M9 j+ z5 j$ d' E9 {7 _ if( nPart >= MAX_HUMAN_PARTS ) & Z+ D; k- Z' v$ W0 D, t0 b
return;
% p0 P: e) s. {% e
$ W5 ?: M6 A# s( S3 Z2 g9 r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
: m$ a8 V) G h* m/ X0 e$ A) T' F- G# U
& q+ O+ H2 z2 w6 x6 SCode:8 O% F4 T/ v' h( ]% b$ _& i
#ifdef __QUGET_SWAP_FIX
5 u* R( j! } |/ h
4 [* ^! W8 c4 {0 E if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
8 E/ e ^: r( T* G; t: p" A pUser->SetHitPoint( pUser->GetMaxHitPoint());5 [4 h: a5 O# E" B
& J5 s8 B- I* i# Q7 A if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
1 w3 l/ A/ u5 k& @0 J G pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* x e0 M$ p4 ]! G! N; S7 v
0 E6 O3 G8 ~( s% c) j% |$ s if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) a) O. |# @5 @' Y7 A pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
( x- a8 V) x" V+ W, ?6 X `9 [# b( p: {
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
Z$ i1 k" N" K& M. \* Pand add under. N; ?3 I/ S0 G! I3 l2 U9 C; C% E9 o) }
- u- q+ I. J9 A3 t* JCode:
3 B; } t, Y# e$ G y+ uif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 ~) q$ F* W5 ` b; X
{+ L/ @! X) J* h. H4 U0 E' }" o3 R/ [' [
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 );& z9 A9 Q$ T: J
}this4 H) x& v& M6 U; M
5 P- X. d" _1 L, n
Code:
- s5 S, a U. ^#ifdef __QUGET_SWAP_FIX8 |1 H1 z G. m" u
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ w# r/ ~ ~7 u! U- X. ]: ]; N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& {! r8 b% P# C3 b7 P# P
9 {! D' X, c- M' g% F# c/ R
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
/ r! C3 a& c; }1 T4 G) F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( t% T( L/ x! g0 @: T* O6 I
- w1 m0 p" m% M if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ _8 H4 m p2 n; g; A, U& Q pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! h, V; ~# C' Q W% h1 D( R
# r- p9 D% p9 D* j2 v6 ?6 _#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
. ?/ k6 B( T/ O# M' |: W/ C/ D0 o, I
2 k" \) N1 |5 w6 S0 P0 `
|
|