|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
3 T: a9 ]. n( ^I posted this because someone kinda posted a youtube thingy about it :O.; ~2 t8 z# s! L+ R! o P% U
" G8 B. p" C7 gFind this in DPSrv.cpp @ worldserver
1 P4 k3 u# ?6 [6 I) ~( R1 a3 n4 q8 K+ ]7 X
Code: a, H+ W- w7 i$ q' V w( s3 I3 z0 W, U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )' C/ q$ A5 P6 j" H$ T; _
{4 f" h% y% a# o" Z
DWORD nId;
( `+ o. x- f1 n" S7 |( m int nPart;3 d$ I: h/ ^* M1 m) l0 ?
3 C0 }7 t, c8 E: e" R
ar >> nId;
: p: B% }3 u% f( h8 X6 R* m3 ` ar >> nPart;
! T/ c0 M4 A' X* `
2 p ?* f% v A$ Y& t B if( nPart >= MAX_HUMAN_PARTS )
) e% h5 v4 B4 a; x' K return;
1 E2 M0 f# x: Z4 e1 E1 m; j1 o5 C; ^* }) b! y$ {% c; q
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( B; D6 D! @3 o! B- @5 G3 N+ m/ p
/ R1 @2 F5 p6 X" ^- t" M) `Code:3 n1 p* Y! X o) j' p7 ]. s
#ifdef __QUGET_SWAP_FIX
+ G. V2 c9 @% Y, R4 C
. m' @) o5 Q' I- N4 N if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, D- ~8 x5 D6 z" N pUser->SetHitPoint( pUser->GetMaxHitPoint());
) ~/ d5 s& ~" P. R% G5 d6 w4 t
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
& y7 R$ u1 F+ R" v& B8 O8 n" ~ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
5 b. h+ j) e+ z8 ] g U: a% t& G
7 H) R) S! q6 f if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )+ Y, t1 a4 T0 H
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* R& G' [, m) v2 O% X: [
7 [8 ]( u" c, q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( }* J& r' c& u: `1 U1 o$ @and add under0 A' H/ y e+ M( e& I+ L' ?
$ h: V7 u& q# z b+ m
Code:: {2 a5 N- ^- x$ F9 i* r# I, z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) N# q' W1 g' t5 \6 A
{
, ?- t6 d5 R( G% @ 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 );# v, O3 U3 k! M c1 x# A+ d" g
}this. g% M. f8 A- X5 W
! I. [7 O% Q0 Q3 s8 G/ i$ Y. o" jCode:$ q* a5 t# d6 Y V" r2 F
#ifdef __QUGET_SWAP_FIX) Q* t( q2 k+ I. c
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( _4 V% S9 V1 g" J
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( ], s3 A6 g# V$ Q* ?
R( T4 ]; d7 W5 L& x3 F8 I
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; z" m& f/ B+ @% x0 q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );% r' d, S$ g+ E# t- S$ L9 @
7 O# |" H4 G( X0 p6 S! s8 s if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 p( u `0 z2 V& x3 |# W pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% z# {0 N7 i7 ?9 a: [ Y _$ d5 G" S% r2 B
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 O5 e% W7 [8 @+ O7 e+ a/ P1 s" P6 P- j% ]
& W% @8 y5 p, n' q; n* U
|
|