|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 0 @' N5 m9 |0 I W5 b6 y; G
I posted this because someone kinda posted a youtube thingy about it :O." v R1 |4 d1 q0 ?/ J9 ]' s
; ?( N* V* Q9 U% D
Find this in DPSrv.cpp @ worldserver
- `9 C$ I k3 b; D
9 i; o$ t" W& V$ x5 D, FCode:
; c5 j, M ^, Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
|! B' K$ F2 v& K7 d6 Y{
; Y+ `- }1 m( W: F DWORD nId;
% i" i5 {: J$ u1 ~0 n, _ int nPart;5 D; W. {0 |3 Z$ m& \2 Y9 s6 Z
c. N9 r8 x8 f0 C0 e1 i
ar >> nId;$ y1 M9 I; [2 }' }6 u% l
ar >> nPart; ! W# Z8 F0 E3 S+ C
$ ~4 e6 F! W5 q, d: Z& i& a7 _( U if( nPart >= MAX_HUMAN_PARTS )
2 ^: F4 Q, P, `" d6 W return;3 Y; }( E$ a. M2 k
* A# z7 W: ~+ \& d& p, ?# a! d
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it& W9 r, v* |0 h, e6 }+ e
+ ~. n+ A! q2 o8 P
- D [0 \' m O) K9 J, e k2 g* pCode:
, E2 {* S9 w+ c" E#ifdef __QUGET_SWAP_FIX" E1 T: c# c$ g$ z) u
) j7 W6 }% [' l+ s& c5 f/ ~: @+ }" ~ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
. a& P } i4 S9 a1 B4 l1 \8 c8 C pUser->SetHitPoint( pUser->GetMaxHitPoint());
+ A D" O7 c$ N8 Q, n* n# J: A0 A0 r
/ u+ O1 C( H" M e, B/ c if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
' o, S) W! _6 X" |( {6 U, v/ ? pUser->SetManaPoint( pUser->GetMaxManaPoint() );* [+ Y l4 J/ b1 N% w$ G* S% n
' n9 b3 X+ L c if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- M0 Y( }& j8 p% x I8 t
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );5 \6 J. M! w# q2 Q0 S8 K; t
- K2 L4 j6 `, |. R, X" B) E6 l#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp6 y2 o5 g. d1 t1 x3 g* c6 I6 K
and add under0 b7 k" v! s) S5 ~( `: P1 ]' l
7 S6 K9 i: Z/ H5 I) P3 L
Code:
9 H5 O' m$ Z& ]% ]4 v9 vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 ~$ s* e$ I d8 N) {* b8 e {
) ^# F' a+ Y8 a) h* F2 Z. H3 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 );
7 @7 E7 M! C3 n }this
v; u1 y- v+ Z+ r# \* b, ?2 G3 Y$ q- f) K- [& C3 o( K+ s5 a# Y
Code:
5 |9 }, S, I) Q$ p& D2 a& e#ifdef __QUGET_SWAP_FIX
. S! u' W% l6 B# h2 A) ?' B if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 _ R9 r& M; ] pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());1 k- N* |0 e4 M! q. F$ W
7 H; G0 z* N1 D R- S if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 y3 x6 V+ e: A/ B: r+ T/ _: y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );; b" u4 Q" P, H$ K5 ?
1 z. I) q+ N& |4 X( n if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& T- N" L& `! i+ e& n( q. V
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
' d3 w' x! l% z$ Z# B L1 @9 m. ~1 }0 _; X
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" \& ^, j( g3 ^, F
) F, j+ |( b ^) P
5 f; }; e' ~9 M* b* z: m |
|