|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
1 |1 u( U8 X. Z! o2 t- I3 q( ^& q# XI posted this because someone kinda posted a youtube thingy about it :O.
* j _% |: Q2 f- e, ^! M2 n2 w" L. {/ o2 [0 s
Find this in DPSrv.cpp @ worldserver
. H, _& }$ [3 t- P' U
9 g) D; y7 d0 ]8 rCode:/ I6 g# G; e6 `; O
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 {0 ^! z9 M% b9 q
{' h: n5 @5 j7 K* j( w; G
DWORD nId;
2 P$ M: Y2 t0 X. q& P% H int nPart;! f8 j* x7 F1 o" H' [4 q
" I& j! ?( y; ?6 a, y7 }4 \
ar >> nId;, ]1 i# a0 i' A5 l
ar >> nPart; ( L% N& L s! C5 z) t+ U- O
9 `& p4 ^5 l& |/ f/ a2 a if( nPart >= MAX_HUMAN_PARTS )
* z2 j9 Q1 M4 b' h return;
* l6 y4 t& N8 a. m0 y) M; `7 U7 G) x7 | `
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; D: q+ a- s \
3 y( h# `7 B/ Z% `" K: C1 O5 F
2 p* ]+ S/ q% `$ p8 z5 a! ^- J' u8 iCode:
. L1 R$ e! b8 E% Y5 C: Q#ifdef __QUGET_SWAP_FIX
9 E$ \8 m' W* F/ f+ @
, z; ], ^ \4 s if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; }: M+ E' V& N) c4 ?3 J4 M1 O pUser->SetHitPoint( pUser->GetMaxHitPoint());
% j" }7 D* h0 L9 V
6 v5 Y; ]$ T; M3 i. a7 R+ W. q, J if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ): q7 S1 g% m* r, D/ G
pUser->SetManaPoint( pUser->GetMaxManaPoint() );7 i$ M- J) ^2 o
) i7 D* S7 j( O if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
/ w5 t/ G! d* e/ Q pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 C2 R! t9 N h- i
" O% C/ v( L5 d. J#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 J% d, b8 C% u7 N3 B
and add under
1 J3 [8 d& ~' y7 V* A' f: e% L9 C$ P Q
Code:' l. F/ b5 M4 i! `& E+ A. Y2 |# g
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )9 _2 o; c0 w2 k1 c+ v7 [& j% Q# n$ @
{
0 ^3 t. P$ P2 w# ^$ v 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 );
9 b* n$ x' c' m: J( M% W }this. ]/ G0 T. H5 Y/ ?! T' _9 w
, B% L! b# J# z3 `& B4 B% O
Code:
! y/ P4 d' C+ R" G#ifdef __QUGET_SWAP_FIX
: m2 `. Q6 G- ?& }# ~ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )! S- E0 {8 ]1 _! e
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 d N% U4 v! t& F8 r. c
9 D t+ s. u) B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
* L" G* d" K& x1 u6 } pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* M* B3 D) l% A+ }- y9 f1 i1 n% |8 M
7 ?4 N7 e# `6 f6 [9 U: r6 [; t if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 [+ F( y) K8 ^3 O0 z* X1 v3 Z8 E pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 F7 d8 Q! K, Y* l/ X+ x
$ N& `! s, J! @' M& q% N! [ b#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * I: `9 F3 [) c) Z% M8 a; u
@0 |8 H. z* Q( d4 g
6 Y8 q, L: M1 Y: E* r7 [; @- @
|
|