|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
x4 N+ h2 S5 Q& j2 ZI posted this because someone kinda posted a youtube thingy about it :O.
2 V" }+ t; G. s1 ]$ Q# F+ {) p, X) v' T1 M1 S$ W+ `
Find this in DPSrv.cpp @ worldserver
$ E6 D6 C6 J! z i/ O5 f! p+ B: t5 G) m3 r
Code:8 g1 p/ X2 w5 v9 t; W
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) F4 ~ w0 ?/ C1 K" B{
( j/ ]( n0 [+ y DWORD nId;7 z; t5 J7 `# e) M
int nPart;% s3 g& G, P# [! v S }4 G
' z- T7 ]7 s: @9 V* r
ar >> nId;2 D$ d) Y3 t0 g8 a$ C. v, A6 e
ar >> nPart;
2 y+ C7 j, @+ @3 ^9 O" K Z& b ! E$ b( X: v1 E( r1 ]
if( nPart >= MAX_HUMAN_PARTS )
% {) G8 t+ h, v' e4 n$ r, B return;
7 Q7 u; c+ q/ K; r) n) O
* G/ Q$ V# J/ G% [2 e CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 \% B3 I0 I6 r5 f1 M J( L- G/ y/ N, F2 p
0 B- R* E2 r4 TCode:- o1 B8 m, K6 S3 F
#ifdef __QUGET_SWAP_FIX) `; c8 o$ N3 d- X+ V
" v3 m* f3 e# @0 V4 z, @ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 {# x5 R! U. e
pUser->SetHitPoint( pUser->GetMaxHitPoint());
) d# B ~$ x/ J& N% g" G8 W; `1 x0 F
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* @: R, i5 r& f/ }8 s0 ` pUser->SetManaPoint( pUser->GetMaxManaPoint() );. E8 |+ n: k* ?+ K
7 y* |# m; @ M4 x- r i
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )5 o. k; Y, i" N/ G7 E) X
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );1 L% y/ j0 N& W. Q. H* @1 U: X. J% l
7 p+ L" \7 J3 y. c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 ^3 p9 r, J6 ^* u4 d. v7 T
and add under: ]$ |9 ^. W7 c+ A S
7 F( G# p! Q5 L L1 E* uCode:$ z) N: v2 C) D# e) x
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 t7 S) u, W' [1 [; \% t {
: e9 P" {2 O/ U- \# m' Q 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 );
* k0 m' K: |1 M; T }this
) F( p% M0 p! K1 Z2 x4 f) K8 T, w7 B
# ^- b+ I4 h! m0 R, nCode:% p) S: A8 I! R! i2 ~8 r
#ifdef __QUGET_SWAP_FIX$ [1 G8 Y# | I* Q$ I
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ); H5 a$ l, O4 ~9 G7 ~5 h+ w1 C& n2 B& S
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 G4 C1 }) ~" D* I8 v- g% L0 O
# X! D% X( P$ X! Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
& b+ |( V. C* _; A9 m+ u pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# _8 l( c0 V) a( c0 i+ F& t5 _( s! }& \$ ~3 T4 H
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 W! F. k3 n! @# @5 D pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 i F; ?& P k
7 @& B8 P4 M0 @% ^- g0 p! y. Y3 w) O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& K! @7 P% F/ c% [. {- _! P8 Z+ a+ }! ]
E3 m8 V d% ], a3 u- @9 O6 M
|
|