|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 L( R: L6 R0 f2 i1 s
I posted this because someone kinda posted a youtube thingy about it :O.( U- d1 k6 L( b3 F* ?
- i% M8 G1 E; f& z% t7 cFind this in DPSrv.cpp @ worldserver9 T6 b( K; X- F- d" H8 n4 g
+ J5 F4 j$ e* ]! t, Y, b' Y1 X: K8 m
Code:$ h. p2 ?! e" D' k
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 {' p4 ]- Y" U) ?; h0 m
{: n4 g, o0 L7 }+ i: K. |8 Q
DWORD nId; l4 P* Q& p1 U; V( `8 c
int nPart;+ ^9 o5 T( Q/ a3 p
" d& [0 E s* B: N' n
ar >> nId;5 u8 \, d5 r R' D- z. h( Y
ar >> nPart;
, i0 z9 m3 n5 ]6 h
5 O4 D2 I& p3 a* A1 w if( nPart >= MAX_HUMAN_PARTS ) p4 I6 p- N8 c4 n9 v1 t; U
return;6 Z5 w" s |; q# W0 ?
5 l0 u8 b7 S1 @ @0 e8 V8 | CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' M6 o: t! U- W+ j/ W( u( Z
: ^7 j/ u9 U% N* J, I3 k6 e; O s, k1 o' r- v( I& T2 J, t
Code:3 ?8 X5 `5 p3 u, |/ ~# D2 D
#ifdef __QUGET_SWAP_FIX
5 V f7 }* J9 [" ~3 s$ k
3 x& R0 y+ w0 F if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ i% P; i" D7 H2 c# q9 h0 O
pUser->SetHitPoint( pUser->GetMaxHitPoint());
' ~/ x( B& \1 I& v7 T! d8 W3 `- U- Y4 ^, }; X$ j' }
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )8 I7 B; f/ u) J, r& I: }* [6 }8 L
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) K' T3 l# y* M6 [; Z" v
6 l+ U0 I$ |- ^; Z- k if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. J. J5 ]- k- v5 Y$ S0 [ Q9 Z pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 F7 T1 Y# v* I3 \8 M. B; d7 P$ X }4 Y& X i6 E* \
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" Z6 `( A# p; ]and add under
( S9 ~# f# U8 r5 H; D# X4 O2 _; [% F7 ~( ?5 X/ w0 A* W K7 c2 s k
Code:5 u8 N7 |' N" A2 n, a
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 t7 G) K1 j' [, U# q
{. g' E, ^+ ^# q4 B) w
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 );* d' ?& |: e& P: U
}this
1 U/ e" Q+ Q0 U
" Z$ {% t4 m) K; J* n0 cCode:& l/ V8 d# t, b7 A
#ifdef __QUGET_SWAP_FIX
: K4 B+ _ q- k& G P; ^" I3 M if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ e0 g, x Y) c; P7 ]; C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. ^6 \ Q$ ~3 |& e& O+ Z& D& O' M; x
1 ?+ ?/ n! ]' Z, f9 ? if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )5 s) T: I+ h% a8 a. ?
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
L( ?6 Y0 q, P ]' M8 Z+ I; l& o0 v- L9 J
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 b% E. ~/ ]0 m' ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; u! P2 g" b: D
7 q2 \4 K/ I, x, Q6 h$ S' V#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 c& |% [8 h' k3 {3 v% z4 H
* s7 b5 ~. b: l5 c4 e1 a; j+ u( a x" s3 o3 x# v% z' }& C/ x
|
|