|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * X- H5 t Z1 b1 a# {
I posted this because someone kinda posted a youtube thingy about it :O.
/ _ K- ~$ j2 Z$ c
8 Z* V5 M! K3 @# M$ K) L1 uFind this in DPSrv.cpp @ worldserver
; ~$ s, K/ b+ u* n' t. ^; t1 C
; }% b9 m* j) \; bCode:
" |. s, M K7 Lvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 k# B- ]/ p* S0 {" Z8 E' T3 n: f
{
, o ~9 Q ]7 M+ H4 }( y9 V DWORD nId;
( d$ [/ K" \0 s int nPart;
, p) x3 Z; y. h i" `$ K& B& v( H5 d
ar >> nId;
. v" | S. x$ g2 ^/ M4 B5 g ar >> nPart; 5 [0 d0 U, ?' C$ o1 l
! z% d1 F# N4 F7 H& Z
if( nPart >= MAX_HUMAN_PARTS )
( K; a* A! B! q. p/ w- [( ? return;8 c) r* p) T3 Q3 T( ]0 @
6 { ]# d- x T2 L( k+ a' w
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it p6 q; q. Y, C
. }4 N- S% |4 R, E7 \ q
( A+ H5 D" p/ I* A$ m. Y2 @
Code:: [+ X! e, P% U- V( q2 c
#ifdef __QUGET_SWAP_FIX
f9 d0 r' H- p
1 l- M% v$ ?# {- [( H if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* D; v+ F% W4 g* g
pUser->SetHitPoint( pUser->GetMaxHitPoint());
! j. x7 C/ ]: O5 e4 d7 T) ^% `. o( I
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )/ E* r- z) i( S# }5 U
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, v5 Y* l( e) h; {) L3 [: K: n/ p, g' R. u) C
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), J! N& {& q; K% l' b. v' o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! R: `9 c' V0 J
: ]: M6 G, Q& W$ |4 v9 e: P#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' p+ e" T w# g/ S& R mand add under
! E5 o c) f( U0 [1 W) i: D8 r- ]) W/ X8 Y
Code:
# ^+ l0 s5 j9 W' [& Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
; J! C8 M% S; g5 ]4 H {* \+ `5 D$ q [+ i
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 );
8 f* u) C8 J3 c }this
# W. l1 B- V) v% T0 q" x4 [# E- N0 e5 @$ J: f7 w- @+ {+ z9 z: I2 {
Code:
1 r* \+ @% ]* h6 f- ~( S" Z6 N$ H#ifdef __QUGET_SWAP_FIX
0 _0 [) O) F& F# s4 Y L1 Z% h3 @ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )0 L6 q, m/ r+ r0 L- J9 d
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
4 s; ]0 E1 ^4 y% w. M& s, ?# v" H' d2 u/ [
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
9 @6 l, _4 s: r9 Z) L( F pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& p4 C* C& u2 `/ F
: E. D( T5 j2 V( V+ w* \2 ^ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ); _6 @. i5 i- u% O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& M. Z7 M+ ^: ?2 m
4 N+ q! Z- B' V8 @3 V) c. {#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) A" R) p" Z0 L& z W3 C! c
9 i3 L& x$ u- k) w8 N5 B2 A' v3 q. G, }
|
|