|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked $ k! O- O- e" K& F4 r
I posted this because someone kinda posted a youtube thingy about it :O.
# B; T/ y8 }: E3 M- F K5 x9 {: ?8 ^( Q. s& b& L$ F+ K9 H/ R
Find this in DPSrv.cpp @ worldserver
7 w3 @ M [& O( p! }+ x' [6 z4 s0 M9 n" e% k
Code:
) R% c- ]7 i4 k6 k/ d7 s: [void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
' I$ l) H( y9 s" G7 G/ }" u{6 F6 ]7 j: U9 [8 P: i/ c$ d
DWORD nId;
1 z- d9 Q7 ^ v4 v3 Y# }5 z2 d int nPart;; d2 s8 b* D* L
; r' [, u3 U) t
ar >> nId;
) }! `" n/ @* P$ ?3 n$ c ar >> nPart;
( x, ^. Q* o* I6 @, M* n: s
$ v/ o5 ]! P0 S5 N- V" Q if( nPart >= MAX_HUMAN_PARTS )
9 g, l6 `; x# ?) D return; R+ U7 s; w8 M7 c0 D2 A+ U( w
# c4 o! l/ Z/ s- o" ~1 F$ z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& Y6 f0 a8 i: n4 R% N3 x
3 k4 [3 C7 _- R
' |% H/ _( M0 L
Code:
3 z1 i+ B( U& e' N. E `! [8 v#ifdef __QUGET_SWAP_FIX
: h4 ]+ g5 h& e1 P; T2 I: A$ V3 d/ W" a( Y& n% W2 Y
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 x/ Q) V0 ]4 _ pUser->SetHitPoint( pUser->GetMaxHitPoint());
% A/ S0 X, S+ ]3 ~% j
6 J" j3 N/ D9 y' N if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). v6 L" x" u/ c9 f1 ?; Y
pUser->SetManaPoint( pUser->GetMaxManaPoint() );' y5 m; r( s9 v5 c: F; U, G' h
! O# J6 x3 }0 r; k* u4 @- @/ ^5 X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )2 t3 }% E( y2 K4 O/ O, e [' s
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ f+ V. f( o$ p. [9 G
- X; @7 B: m& o, h3 G( O( Z& c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 J5 |. P k. w8 F" _
and add under6 G ?8 I$ P5 k( Z L
6 F0 P0 C1 `# _- u. o; FCode:
5 U' Y# W& u9 ^+ @; Tif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
2 X1 `( U! g5 q; Y1 ^ {8 N* B# { T4 t' o) j9 S. g3 z
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 );+ b4 W, l0 U9 i# m+ B7 p- B
}this
& e+ L5 |6 d2 ~" R. X- ~& H
7 E: K$ ~, K/ ?Code:
+ _; ~' @5 h+ w) l' ^4 h% k6 N2 C#ifdef __QUGET_SWAP_FIX
9 |$ @. e, L0 P2 t+ ~7 L* K# T8 n2 P if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
. {7 }, u1 x1 C) m4 R pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 _1 s7 C4 {& @5 e6 G% H: r" K* o: u% D4 S
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" w) w4 y4 _( k/ l/ u3 ~6 f
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: \6 I2 ~9 @/ o+ J; i
) m# ^- E; c9 \
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, A+ E( N: U' O+ q' P4 x! ?& b pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
! s9 ?( y! ? M- Q8 A& V+ b5 m
0 _' e5 a( g/ e/ @. W7 ^" u& x5 i#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 `8 [; z& n, z, Z1 e, K; ? `
6 w# }3 N2 |+ i2 N* r+ A4 c4 A% f5 T* Z- Y
|
|