|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% z" X9 s* P( r" I8 p6 Q5 tI posted this because someone kinda posted a youtube thingy about it :O.
- ?: e( P# V9 v" O9 Q5 W$ Q0 h
9 W$ e% F1 m `) e8 u: eFind this in DPSrv.cpp @ worldserver& k3 j2 e3 o$ L% |) @9 `
* w( U( R7 d3 v; i& j( ECode:: q9 a5 T; K; B6 U
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
. l/ B, n1 X. J6 Q{
, ?( `& L1 i( Z! Q$ | c! H5 U DWORD nId;
( U: h3 K0 D" W( }5 w8 l; N int nPart;
* C/ d7 h: }" f5 u: H# \
! C7 ]' V- G" D/ D$ } ar >> nId;& R! {* |- E+ k E+ s
ar >> nPart;
) N8 L0 \ \2 ] + |9 B) [; w4 X
if( nPart >= MAX_HUMAN_PARTS )
0 |" Q( H% p/ h4 E/ Q; N2 v return;) L' p) ?# q1 m
$ Y, w& c7 r# P/ P, s. T CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% f3 g+ P/ w' F. G B
M) g N" N0 w6 P$ N% U5 q* z
, p( o( t2 S( t: |7 c1 v7 h' GCode:1 `# d+ k* Q9 ~
#ifdef __QUGET_SWAP_FIX
: Q# s- w+ M3 g {/ n9 B4 K& Z* _% }' M
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
% z) x$ D. P+ v! w+ V pUser->SetHitPoint( pUser->GetMaxHitPoint());; Y8 b3 S9 C c% H" b0 p3 k
/ j0 I+ h, o7 ~* {/ c8 |1 ~- ? if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: l0 o8 s( s4 n7 M% L. } pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ f$ k; h) F# m" C% n2 P' [* x
1 |5 ]: T! f! `( f# o: A5 E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )9 G2 x! T4 u. x ?; I* L7 {" y, Y$ w
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ Z( p$ G. q" e. i- ~+ K" w4 C& y) `6 [( Z( W
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" k# ^: h& I- V9 y, s1 rand add under
) U! f, E a: r2 }% [ V
( q# w: E, L0 `& e3 u* ?' P0 sCode:
* m' ?/ L- X% J4 d9 oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )7 ]" [" O; _( W2 o
{
5 M0 p2 h. G' c; R8 C+ J- U2 l 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 );; _2 O0 C& }4 p4 i! ~: k
}this
3 o- Z+ e9 r' p
, Z& A2 }$ b1 G/ j h# s1 V3 V& ECode:
) `8 V' f' R5 {#ifdef __QUGET_SWAP_FIX
) k8 |' s! {: F; b if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ \% b+ S( m. b/ g, O9 O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 u) G" V* |& Y: T# b4 p
; s5 D1 w: y7 A+ n6 n
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 v4 z" A- @/ U1 g9 w" j0 r, U pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
" L; c& s4 J( ^: S- p4 k) g _
% M( o1 h+ W& P if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 N! v% J+ M" T# g pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 l% i z, b7 h, u
u- V* ]0 S- @0 n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver . n' G1 f; o0 A5 B+ v7 {
7 [4 M8 V& q" ~4 a* B. J9 e2 M, M0 I; T+ B# }2 Y* Q
|
|