|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked " Y5 ]7 z( B' `1 T( E
I posted this because someone kinda posted a youtube thingy about it :O." ?0 j! }, k. _; o* o8 L( S0 P
: T$ X2 h+ A# N$ [Find this in DPSrv.cpp @ worldserver+ E7 x* N3 a" s! p. x
+ H( r& q; K, [
Code:
i2 j1 G0 h3 W; f# Uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )1 N# o; ?% I4 O) t
{
7 }( D7 m c9 U DWORD nId;3 L1 x/ j5 g2 E
int nPart;
' S2 D1 Q$ ~" E7 O3 A
$ j. B7 \% ~2 V% { ar >> nId;
# {, @0 t! r6 D6 U2 e+ H ar >> nPart;
- `' \! }* E* z4 K) {! ? % ]+ t! l0 w4 ^" K1 G
if( nPart >= MAX_HUMAN_PARTS ) ; p. G( U M) r
return;3 z' U& u; z; D$ ?4 \ G
Q0 M: z6 X4 y- u8 _9 Y CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 L. B9 D6 W+ h) r! ~: s- W+ b" t" w( k+ b% t
* R* D0 z# S6 D6 G) OCode:+ Z7 c2 M4 R) u& b1 i
#ifdef __QUGET_SWAP_FIX @% O9 t) S* _$ [4 n$ W# t4 v
. o4 ?+ o4 [! d7 D6 a4 S7 k6 @ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )% B6 d' X* e- q% \7 K* E" B: C
pUser->SetHitPoint( pUser->GetMaxHitPoint());- M0 w5 H1 L! w Z
$ K1 g4 z8 F Y4 F5 Y if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: {3 y; K" s; e0 J8 A5 [6 o pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* j7 v* _$ W/ r9 ?' ]
* g' L" g. U& S8 t$ b if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 ~' j2 _5 r: ] pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
- B7 N8 B3 D+ |: @2 ?8 n0 s& @* E; f4 n" v/ g/ {% b% v
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp+ g0 e5 k* ~- w2 A u' v+ U
and add under
4 ~7 n( v! R% o! T* d N( O6 X! u! D" R8 N+ z2 y
Code:( ~& n# w% p# M4 Z5 e+ X% E" a
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 n; T, ?/ V" `% I* c {
3 o) p% y: Q) G* U9 r: T# H Z 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 );% e, u. x: K3 H2 y( v
}this i1 c# `$ S# y- x& }: Z2 Y
9 d" ^6 ]& ~' J7 T& |Code:
, ~- \# _3 T% L+ z$ `3 g' d* V#ifdef __QUGET_SWAP_FIX
+ @( Y! O" R8 D8 C; P( m! n( R if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 b: f) _' u/ x. V$ G3 ]& G! J( v5 y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
/ Q u E0 ~" P' K1 N( Y
* D/ }+ [, _6 y9 U- U4 C if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ T9 P+ ]8 n+ [" A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
$ x7 ^. e P$ m
( K6 f6 j* y" A1 @+ r) W! Z( b; J if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
+ r& r: d# n1 Q6 k& I, X pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 v+ g& J t0 x1 G
T2 P3 B( d( m: ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 2 s; q+ t+ c/ n+ ^1 g
; T; p% t, Z) z
, I7 }! h9 J, z! a! L
|
|