|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
' t: N6 x% R4 J# {8 P2 L7 D) KI posted this because someone kinda posted a youtube thingy about it :O.
+ M) D6 z4 A% p O/ x- R* y0 D4 h5 s1 c" R2 k$ K
Find this in DPSrv.cpp @ worldserver& v3 Z# d( P1 \$ P# C/ f
+ }! f9 Q# ]8 t, Z+ j$ z0 J1 Q( NCode: i8 s. e+ E* V- \' u& s' |
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )7 }! R6 ~# [) `1 k
{4 n% F4 z' P; G7 V+ w
DWORD nId;7 k) l& M O: d! E+ M+ C
int nPart;
. X- {/ b& W& _; o9 j y; s5 \ k* b6 h, J# [& Y
ar >> nId;
5 L: ~. j, Q7 _! j ar >> nPart;
6 }& A! h+ k: O- x/ ^# _8 r
2 l+ J% @& J2 z% s, V: V1 M! F if( nPart >= MAX_HUMAN_PARTS ) $ ?* `, P4 }0 s0 y$ i+ T& L
return;# J( t# o4 u9 ~. g' n
2 g, p% m6 n3 Q( X7 e' w
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it. G1 M! t$ c9 T$ ]' J! R; p5 F
J$ D/ H/ I9 ?$ }# W6 Q
! i% r4 }( y' p& `* d: y4 TCode:+ p. W( h! D3 `1 I2 L
#ifdef __QUGET_SWAP_FIX' H; L: h$ x! ^: d T: Z: C$ P* J
; f' O6 u5 w% I7 Y if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
- K' Y% G/ I+ \1 G1 E. G pUser->SetHitPoint( pUser->GetMaxHitPoint());
- u0 j+ {2 z2 Y. K. V2 g' @! M$ g0 i$ {2 o
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* |, m% {& Q( R1 F' _7 Z5 H2 D pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 [8 I: @3 P8 w5 T0 X
0 q: n/ c0 ^2 a. g# {, u
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )0 t) `: m2 y* M9 f. H5 z
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );9 F) [7 Z, V( Z) ]$ P
1 F u, s7 M2 B5 a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% c# _/ `) |7 N9 j# O, A
and add under
/ w. d* Z: f# P3 }6 \1 |% @9 \2 g; ~* y
Code:
2 e8 u% x& r2 Y4 Y+ Q. P* ~& z: j$ \if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )) \1 p% Q3 o- f6 {5 a" I
{: t5 ~- N* P; Q @0 N7 j# S
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 );
9 R3 Z# j. v; Y/ J# j( y/ O }this; n" h5 k; R! d1 h! U! ]
3 U `& y3 [8 u4 T% ]5 qCode:1 A: f# R( h% V( y4 D
#ifdef __QUGET_SWAP_FIX4 }+ N. F$ N( |. i$ G0 r1 b
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )* D* q9 g8 b5 k8 D) _
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
- E7 W: h( E( s% l7 ~5 `# s$ ?+ W. Q; R
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
8 T' i( l8 G+ d8 \) O' Q1 [, J pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
7 V) m- I3 J' u" C4 g- h8 r- d& A# {5 Z7 ^. l! ~
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
% K9 M2 u, ~6 g$ ~' g5 h6 f pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 M1 H. `) |' |, j$ V
8 v# Z/ j( W5 E }- m; V `1 o
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
$ e7 x. h2 ?1 {7 V" Z: N. o9 b( T
& Z) l7 Y8 T$ M |
|