|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # ^5 d2 `$ Y' S. X4 t& R
I posted this because someone kinda posted a youtube thingy about it :O.
3 _- g+ e8 `; k/ x9 t* y" ^" S
( M2 k; _ \8 D% S0 yFind this in DPSrv.cpp @ worldserver
, a. h) n! @0 s( D+ j# d
9 j- r$ Q# B$ l/ \$ `Code:
3 T7 g. S! A- s1 t9 Ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 X% [1 {( ? |% T
{
: x Q5 T4 \" J7 [ DWORD nId;1 p F% Z! J* L1 o1 C; O: t8 Q' i
int nPart;
, A: u( x6 u) N( g! N
# F) \1 b u/ B# Z ar >> nId;' e. D' X1 g2 V$ V: f
ar >> nPart;
# G3 t; x7 H+ E ^5 H, H
. Q2 {" v$ x. j if( nPart >= MAX_HUMAN_PARTS ) 7 H8 r ]' V* ^: p
return;1 F+ c7 a' d$ ] a1 `2 |4 ~5 L
: A; D) k7 l" e0 r CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) b. o$ R3 j0 E; P: G! Q
& W( p! q3 A" S+ l: ?- R9 f: S: z8 ]
Code:; E0 i6 `/ Y1 q8 m$ i) F8 U0 E) E3 A
#ifdef __QUGET_SWAP_FIX
: K$ H# O0 |+ k: l' K3 a) S
8 o* m' J$ s9 j: ^! X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ). c; C' @' o4 F0 f/ R& Q- I
pUser->SetHitPoint( pUser->GetMaxHitPoint());& j& d! A+ V- e/ E! [
8 Z) f& \" I& D
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' g. J9 ^7 R7 j' ^! g, M$ B' V pUser->SetManaPoint( pUser->GetMaxManaPoint() );
' }; T& k6 M7 ]2 x- l1 M- W3 d+ K# v
7 }- [: g6 t \1 \4 S5 L- S if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )6 M3 @9 h7 ^ T% s
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
8 ?2 D. |# m$ t* l0 Z0 `
& @& y* L% B8 b. L4 [#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp1 _# ^+ n; Z# r! e; l1 k
and add under
5 i( E6 N" U% m* U" U2 }4 L( i: X1 V: Y3 Y& z/ [8 _- r& O
Code:
) X5 F8 N! h4 U# v: Sif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )8 q( E) x' l1 T& A
{; T2 N. U8 Y% X$ I8 H" p
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 );
n; k* S& w, y; @% U9 h: v }this
9 z7 G* r3 [! Z' u$ @
' s2 Y" Z' q" J; hCode:/ `9 {3 {& K% R- k/ h
#ifdef __QUGET_SWAP_FIX
1 L( B; k# {. k if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# c8 z% j# S, n6 n2 ?
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint()); L, q% }7 Y9 g2 r* S: u
2 H2 c/ z3 ^. E+ U- @; B8 [ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 Z6 r1 B! P9 ]- Z4 d7 A3 H
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
- |+ O9 @$ T# Y9 H: y
+ O) T& l4 r- \4 q# w* t if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ). z5 H6 R7 o# W. j
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );6 r1 Z$ `/ T3 _
( c" N ]2 p& t* H* v3 _ l/ i( y
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 7 |% R. E( p: X( K- y9 [
3 y# e3 e7 x) N8 t; l5 s* _
5 p( {. q' @0 f |
|