|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' h @# C% D4 j7 o) EI posted this because someone kinda posted a youtube thingy about it :O.
, A8 C5 q$ ~4 l: t7 i, m( j8 P' \7 C) e& L1 I& T
Find this in DPSrv.cpp @ worldserver
8 s& z8 j2 t" Q5 e0 y2 \8 T/ S' C% Q6 N
Code:
3 D8 e' B, D% F' l: V. K1 Cvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; i p( G( q/ D- |5 n{
. _9 G2 Z. ]1 y P. e) g% p2 |: h DWORD nId;
( p! z3 T3 a& a/ \( r* U7 J( Y int nPart;
# a1 ~, ^# @# \& R3 }" W+ K" S9 a, }/ t* I; u7 j4 |/ y% t
ar >> nId;
[: S s0 s- _3 [# s* e ar >> nPart;
$ w# R5 D N6 a% o3 h 8 h1 I0 E7 F( M1 ~! c' X, { t- U1 X
if( nPart >= MAX_HUMAN_PARTS )
' O8 E1 l+ [- \7 W6 k return;
$ _: x) u$ S1 ], e6 c9 D" b- {2 v8 o# v( _
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it' C) @# ~! I4 o, _+ {2 ~; ~2 s7 p
0 F+ Y2 S5 j; a q% P# ~
1 D6 I+ O# G: s: E: S
Code:7 F4 @; c# e2 \. T: M. U& A1 @
#ifdef __QUGET_SWAP_FIX
0 ~* i/ w1 V& D: H5 ~6 a( N2 P7 G1 `% t; X% q- G1 V
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
! U2 E* I& ]1 c- W5 ?/ F$ w/ r pUser->SetHitPoint( pUser->GetMaxHitPoint());6 P5 s, {0 L) r4 \
% ] F u& ]: T. \( U4 | if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
$ T. p3 ^) S) H( H- { pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( k2 q. U8 M, e' I6 O
) q! O, N% G* a9 U7 E if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! A& {* \' S5 p! t# Z; R
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 }" B# |7 n: Q& B. M2 P' Y6 y1 P% ^# U( D0 m8 e
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 U( O( l0 t1 @4 _8 A1 r
and add under
Y- H. e c$ a/ l! T) I% c3 F, _" q- `6 J& w
Code: v. k6 c7 N7 y" M! o2 T
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
- ~( a1 Q% B4 d/ M {: ~, [. g8 j- ~; m/ L1 x) N
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 );
6 S; V- y1 r' \7 n }this
! a3 T" N" `( V: S& ~
) d7 ~4 [6 z3 h4 z- wCode:- x& A- C( H y) P8 j8 X; y
#ifdef __QUGET_SWAP_FIX# v9 `: W* i7 X
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
) Q2 q p" F' K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
+ }3 X2 P+ R* A; V2 L- |5 S: a
+ B$ B. r4 [( e9 n. _# N if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ): \* k; K* v2 d8 ], t% Q( A! N$ s
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ n4 {4 s3 ^6 }7 F. X/ X
/ t" Y8 l' h' W( k if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 v# N6 \. a4 i1 ^0 q+ y. W
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );" `$ p8 F" V% w" W' H. M
$ Q P" C% B, d4 t7 T$ E7 D#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* O" C6 z9 _5 ]7 |" U* @# a& z4 d/ v$ r0 |
& y; |3 f# l$ A: r) l |
|