|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
5 [# g2 _( T/ U; qI posted this because someone kinda posted a youtube thingy about it :O.# x* {3 C, O) \
6 }$ w+ J _8 f: i# } a% h" E0 LFind this in DPSrv.cpp @ worldserver0 H/ a3 n% \. _/ s! o& c
% Z3 R0 w- t9 a+ A' oCode:
9 j& h( a( l E! S( c8 Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
- n& @: G% _: D8 }{
5 h7 ^2 i' m, h% I d* I) _ DWORD nId;
" }* e- l; @" o S8 B int nPart;& V8 i' W( [: v! N" B
2 s4 I* `0 V; R& S1 |+ p ar >> nId;
9 N, X/ I5 w5 T8 h ar >> nPart; 8 `6 ^$ u' @+ x, u% `
/ N2 C" N' n! I5 m' \( @
if( nPart >= MAX_HUMAN_PARTS ) 8 r& f8 _9 h$ D, k: @% c; J( f# k
return;. H- M U8 k- v/ T8 O" d3 S% n8 }
+ S9 k. j M2 M
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( {' d# K& P9 o
: ^! v" \+ p% h' W
7 {6 @* H- j5 x1 D2 n* u
Code:) @) A- J' u, j# g
#ifdef __QUGET_SWAP_FIX
8 A6 K) f# V& D9 W3 @! m
) A9 @4 o4 f5 d3 `0 L if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 ]6 g' T4 z5 [ J
pUser->SetHitPoint( pUser->GetMaxHitPoint());( Q9 o$ m6 |" B# S& Q; s- }
$ F& @ o5 T& z+ G. y0 e- X2 [( _ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )" V2 m3 ?4 a4 I7 q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 b/ n1 J7 L6 [( q3 [/ _9 {
- g- H9 q' S1 K$ Z( U if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
H9 ]" L' R7 T1 R. v7 m; T pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); [* A! B* E) g! V- a
4 w k$ _1 J; q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 C( P7 P3 |: @
and add under) L9 f' d& S# G7 x4 E) c" I8 e
! Z9 Z5 O5 v* u1 `9 @Code:, o9 F" ]: A2 S* E
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) }& V) x1 {1 C, v. p
{* i9 B L Q3 l8 t' ^+ D4 e; 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 );
, ^/ i$ P. K1 b1 b( S }this
7 W& P4 w( U# |) S! j, V
! X4 b+ z+ x1 W) DCode:
/ n& d4 }0 m( ?1 J4 [* p#ifdef __QUGET_SWAP_FIX4 p5 }2 N" k( P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
' z% {- F4 R7 A2 D w8 `6 \ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 O1 N( {; d$ b3 N5 ~
3 P ]8 g" p% |# \' { m+ f
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! O+ i( y; q& _/ Q. @$ z1 o' A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# e4 P/ f2 `$ a5 Z
# k4 y# t6 g! ~5 S% T; ] if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )* n( L0 V& J# i$ G* [9 `3 ?2 m
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );' ~2 w2 I+ l: O1 S! f8 J
4 J5 E7 K7 T! R8 [: B4 I) j
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 A# q! V# K/ r! Y
: s9 A3 x' ?, A4 g# F: I
- N q4 A7 y `) ^! _$ `& d
|
|