|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " _8 n$ {4 `9 f; B
I posted this because someone kinda posted a youtube thingy about it :O." D) G8 i* r" O, l
) I; I e. _/ o/ g5 G" q J7 G. Z
Find this in DPSrv.cpp @ worldserver
) r1 ?/ T, _1 G/ `" j
Y! {- S4 U' Q# k& ~Code:( p8 ?6 g; y* n5 n! r2 X7 G$ t
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 ?- W- w- m ~5 [, T: W4 ^{1 L: I9 R$ _' B+ {' o
DWORD nId;
0 {* D% [1 s& U1 v9 @ s int nPart;
7 M; {6 z' O7 b! F) |" }' a% h( J( @! x) z% F, |* E7 q" c
ar >> nId;5 ]1 U) ~9 \/ T0 a' R
ar >> nPart;
4 E& K8 n9 [ d! L
6 J) v Y& b# D+ i if( nPart >= MAX_HUMAN_PARTS )
3 W# l- K1 R0 k; [6 _# K2 ?6 G return;: H# }/ ]8 m |2 ?, h
% c, \7 P6 [/ }1 A! i4 ?$ J* _ A CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% T* `' Y( w$ M3 f7 p1 R- ~& ?0 z+ n* @1 G
6 Q) O" w R1 P, R
Code:" N0 Z* Z8 x1 r# s% U( v) R7 N
#ifdef __QUGET_SWAP_FIX* W8 ~+ K# G& K. d6 W/ I% f2 y
9 @1 S# i4 @4 P& S; y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! f' ?; Z) b( A4 N# Z6 Q pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 y! C" q2 [+ P; u' f0 `6 q3 d+ n! }9 T" U0 f2 R' e5 s
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! K, I, }$ c- G. f$ l7 Y! x pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ N" f; R4 X% G; N& m/ z4 \7 e& R5 o) l: D5 d* K% y+ [
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
) ?% ^: i4 r l9 y/ ^0 G! y2 y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% F$ z1 p' D# |" g5 U" N
. Z% T: Q8 o; ?# z#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
% m2 D3 m. v+ o iand add under R6 \6 d' A% r* Y
1 R% N# p& D) {/ A) m6 t- f! r5 v
Code:
$ ^% V3 b+ ~" O+ i0 Dif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
) v6 P: l4 n% r {
1 i9 l( T& `9 e- J& J. E 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 );1 W: V5 ~; I( s& R8 X: X
}this
o" W1 J5 l0 @( _! H9 ]
+ T0 [" `: u/ j/ @" fCode:
! {" |# X9 k I0 O7 y% U/ p#ifdef __QUGET_SWAP_FIX
0 s3 f. ~$ \( P( d3 p* D if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )4 D: y7 f, z! a& L q
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" |( ]8 ?8 a+ j8 H" c* t$ J& }3 _% K' @2 O) c" P/ P% [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )% H1 m: ~/ U5 z& x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 ~7 A3 f7 [6 Q6 x# c5 X+ e7 h
" [; l# p; r0 Q0 ^0 m8 b& u; }
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )' h2 E! L8 ?! w' S+ s" I8 H+ n# G
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. {* Q& s* t2 S% h2 E. ?0 D' n! M( }1 D4 B. ]3 F& u
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver : I# [3 Y8 F; q1 j9 }$ K
+ O. f) ~$ c7 j% _: Q, I
$ {/ h- b2 z2 p |
|