|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
C1 z% c# k# ?6 yI posted this because someone kinda posted a youtube thingy about it :O.
6 p4 i, o0 M# w7 K! U5 \3 K( v5 w6 o6 c) ?/ K1 P- M3 S( L9 ]# C4 ~ ~$ }
Find this in DPSrv.cpp @ worldserver
$ @1 D5 M8 a1 G9 d% j6 n; V$ j( y; _4 }( W0 @1 G
Code:& U9 }9 Z4 f9 s6 `' D( i
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' V1 x# R9 Y8 L! U4 f$ |5 `{9 R" ~* a" H0 K+ B
DWORD nId;3 N l ?# L9 S( F
int nPart;
x5 M$ \$ K: k3 L
, n$ J7 ?. i2 n( M2 w ar >> nId;$ J0 L @7 l: U) R9 y
ar >> nPart; 4 s. I3 t2 F% y, @
; ]0 I* s3 \) Z
if( nPart >= MAX_HUMAN_PARTS ) - U& X7 @' G9 ]! Z+ \# Z/ d4 [
return;3 G+ ~+ N( Y1 d/ q D
" U; ]2 G7 D. R7 h9 {, e! B, X7 V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
9 d# W! P; z0 g8 D. H+ x) r8 o: B% _4 B3 x1 d, m# n
; u! c7 [8 s" Z! w& c3 L% O
Code:
) v; g8 o& J! g% O' ~! U7 `#ifdef __QUGET_SWAP_FIX) `" V7 U( P1 ~+ d# f, B' g: _0 s1 M; W: s
* B8 [1 Z8 W7 V/ R v f
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 r& S- v* F. B
pUser->SetHitPoint( pUser->GetMaxHitPoint());
; o* n5 y9 n( g' ^2 e$ [; l5 B' x1 S, C. C1 q3 m) b
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) Q8 \/ w3 F# J: C7 G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, I6 K7 U/ f" c# [! @
/ x# J/ B8 Z2 R- R% l: M if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 J. U' G. E3 w/ @
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 V- m" m' a, Q" G! C' U" @
3 o) ~$ m/ n% N# S$ Z' u
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp5 k; W+ }( l: F/ j+ {5 P
and add under
2 i- C: m, K0 \7 \
4 I9 f7 ?5 H1 Y% A/ KCode:
- @% @) Y, w0 G! }. X Fif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )' O5 z! _( I9 y. t7 x- {
{
9 h k8 U8 Q. x 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 ); `7 P- @, ^/ s/ F
}this
0 R8 S3 O2 ?5 u/ C$ F! H1 B. R$ \. a1 K
Code:$ h' }+ `- d9 s3 K/ y. ^
#ifdef __QUGET_SWAP_FIX
" }( n+ E7 L* ^, f- I& v3 `6 {5 \ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
; t* U4 T- `( r8 U3 B4 z5 V pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
Y4 A$ V1 N0 ], v s: Z! R2 P' w
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 H/ a: X+ k9 i) a% X pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ Y1 ~+ [. ?$ e% M: v0 A+ E( l+ G# }) E$ r& j
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )4 o" F( _" Z' O5 v8 a; x+ h+ V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
K5 K2 @% H0 l* H" c4 |- x* b/ @$ v/ Y e9 t0 d, d2 F& t6 y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % ]: e/ W; ]' P: O
9 v K; ~$ N& ^7 ^0 K2 e( E
4 f& o) D4 K$ V i3 I |
|