|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ' ^: u4 n- r M; J
I posted this because someone kinda posted a youtube thingy about it :O.+ s7 ~, ]9 B9 x4 s: o/ ^
1 P8 k7 D& ]8 K
Find this in DPSrv.cpp @ worldserver
* B1 X o7 o/ l) v5 } n; c" U% \7 Y' ?3 @! g0 N
Code:* N& m: W& p* [
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) y: ]& a% z; K) Y8 L: k{* q7 |. f( H# W, E2 Q( N: y+ N+ S
DWORD nId;
8 D5 f8 |; `% N+ |4 I4 q: s9 r( N: B int nPart;- a2 [1 D5 W; ~, j Y* z# w4 H
; | u0 f1 k4 B" g' h ar >> nId;
7 P0 }& @8 O( [. b ar >> nPart; : \: e2 A5 T. b' l- c# f! L
* w& S, X' |8 {9 B- k
if( nPart >= MAX_HUMAN_PARTS )
$ `9 Y' t# k, @, Q return; F5 V ^' H$ n
( g; A' b0 m R" C+ G( \( q X
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
B) Z) B' v5 N2 U! v K3 g# z# Q: Y$ A
. d9 v$ I3 x: u) u# ^2 V2 r8 ZCode:: ^* y4 f! Y. g" K5 j9 x
#ifdef __QUGET_SWAP_FIX/ c8 p- D! M0 m. [5 M8 }
4 Q' j9 q2 s) Q$ q
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )- Z: f8 \: N# `( H5 o: ~/ }
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 I- a5 D$ r/ b6 i* V' y) F
# w1 n+ |' S+ E6 }; g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
0 i4 A: d2 v1 s) t& x' D pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 M7 z; Y6 i7 B, |; V2 c' U
, q1 r) H! {3 K if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# W9 l% ~5 T. ^8 o' I* q0 k" d pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
) J* [; x: Z" f& B2 D0 x$ Q6 S5 u- _3 d) B: _# N+ g; {- P
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: T. z( i+ p. l4 O( M
and add under
: U6 _1 j% k- {" _8 C$ v( @9 ]1 U% V0 b4 n- }
Code:
- l0 n9 B2 a3 I& Z* P& Oif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )$ T4 s# a4 A+ _2 k0 L+ h
{$ ]' R0 a1 E# k: e9 j0 K6 ]# ?
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 );" d6 ^( e6 T! ~( g* i8 T$ D& u
}this' }0 V% _2 j: D! s# C
. d; ?4 ]7 | k5 W% j+ r
Code:* a/ t( m+ F' b8 E6 X6 A
#ifdef __QUGET_SWAP_FIX
8 N/ {% c3 x+ [$ h B4 O% u if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
8 F9 G4 w' ]4 M pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- o8 [* V" u& R" l2 [
4 G0 X: y' C& X if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! U) M& {8 Y* w' M# x; P5 ^0 v
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ j' g' W$ K+ D
+ q1 L% o# {- h) ^0 W, F
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )" j! l. Q, w7 Q% E" M
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% Y1 t2 e; O) u4 k) k6 A V
7 z. ~/ B7 K$ r0 o. M) Y, \% `#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver * {4 O; E2 _( o+ C0 u% q
9 a* d7 C3 v9 u2 G; A' g( q* p3 \. }3 O; S& o8 m D
|
|