|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 E4 Q$ x3 r- q5 F& m& CI posted this because someone kinda posted a youtube thingy about it :O.
: ?. D# f0 d( _
8 ?( Z# X) d" wFind this in DPSrv.cpp @ worldserver6 _3 Y. h6 c. L& G
% G* X# X# |" [Code:
" M$ `4 o$ _5 q8 K3 Hvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
* q% [/ f& m4 w2 S2 ^' r{
9 a! q$ ]! E0 F2 F% G8 a9 |0 X9 [ DWORD nId;3 \/ t7 w$ D" E" x& X
int nPart;; Z" L: U- M, k# V
) @. Q9 G5 C" a+ O: C+ S% h ar >> nId;! G6 X9 U' i9 S0 `) n, T. y& X3 _
ar >> nPart;
; P, R; v+ W0 \- e& x8 Y
, {& W3 U$ b2 \6 \, F8 F, c3 A if( nPart >= MAX_HUMAN_PARTS )
: N2 U& g5 M' {) A3 w! z% P return;
3 d) c( W. O& D2 I9 j
# F5 o1 q5 O( W CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
; ?7 \9 _9 Y& @8 g* Z
0 ?: @, E# z4 N \$ J6 U2 \. N; D0 x, h
Code:0 P, B/ F. M% b4 i3 t0 H3 _
#ifdef __QUGET_SWAP_FIX C1 [# ^7 m+ d, A: s
" ~' _( p. l$ Q8 i
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* j" L; ~4 \( E* N
pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 k! G9 q+ w" c) T1 `& T/ f# b
3 ^0 b# w" p2 x* t if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
0 {. J9 [1 V$ q: @$ M" k2 j pUser->SetManaPoint( pUser->GetMaxManaPoint() );- h7 g* L9 t3 ]4 b( P3 M- _
, h: d7 k3 q5 M, g if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- k/ g' i8 N) g2 S
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 ~" e4 c: e- S% H
; r5 w/ o. [! h' z. P5 g/ _
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp* _; s5 \/ h; V$ d
and add under: Y5 U# U! I; \8 s; b- {
. @% D) f! {! \$ CCode:
: [$ O/ u- o6 I) ?* h( l0 Eif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). Y5 V* h0 N/ |7 E" [
{
# G$ S8 C T: P5 M7 V2 { 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 );3 A8 h: a& U3 `0 z& N' J A1 v7 o0 ]
}this
9 P2 ?- _. R) T+ a6 e9 y$ z0 _5 \* ~$ ~5 F( F" g# T8 f
Code:
R" U6 R* N: }9 c& R#ifdef __QUGET_SWAP_FIX
/ e& |5 T! q& Z8 i if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 e' [3 v5 p% l) e
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, y0 V; C& J' Y/ N. Y7 w9 b1 v/ Q7 }; P4 f1 \* g, F) j8 s k
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
/ Z W# F" G3 X5 c( P pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ M0 j' i$ U8 ~0 d
& k) y8 c4 A7 Q- g6 m9 x, Q3 }, q) w if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% l6 y7 B! J) D" Q2 f
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
P1 M/ d7 s' e5 m; F$ ~' ?# ~0 ^* |+ q
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* t; |* I8 H- ~) P0 [ I2 o4 j8 s
# ^$ M8 G- F1 d% X+ \
|
|