|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked $ h# I7 o# j* R$ ]. \
I posted this because someone kinda posted a youtube thingy about it :O.5 u+ y n+ O3 }
1 Y6 v) p- K% E: ~Find this in DPSrv.cpp @ worldserver
* \7 C/ q: W) L k" E% _( e! [
5 @* ?: J U; t# G/ L& hCode:7 m1 U% z! X: m$ z% z6 {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
3 s& ~* ?% D: d* `0 w& S; ]- S{
. G. ~, F& c/ s" w# E0 l- o5 N DWORD nId;
( K6 k' a$ S/ q+ T8 {/ f8 ]+ W9 l int nPart;7 N3 n$ C4 J) t/ p
) Z7 y& [( U# g" v3 h0 t4 Q* E" O: Z
ar >> nId;, v7 K. [: p1 `, ~$ N3 r9 V
ar >> nPart;
$ _# W8 R* K& ~
9 P* o) Y5 U) W if( nPart >= MAX_HUMAN_PARTS ) ( u% i% X3 l- v0 x8 W" v0 J
return;6 e9 ~! F% z8 ?9 B
: h Z' o% E- T- ~6 i CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
" O- ]" C0 e+ j# p) |2 \
2 h! o0 W. z; X: v: A1 I2 L; c0 C6 S8 [7 E
Code:$ l% f2 e% x, j
#ifdef __QUGET_SWAP_FIX5 _/ c. b+ t0 I1 q0 @% u4 h
1 b K: _& ]/ `! g2 O
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' C9 T @5 S: K( x x6 U
pUser->SetHitPoint( pUser->GetMaxHitPoint());
0 |8 p+ G5 f0 ?1 z8 s9 j' Z& H2 E5 O# |6 Q2 D+ n
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% K- p. }2 }1 u
pUser->SetManaPoint( pUser->GetMaxManaPoint() );+ ~6 L6 {" e( L
8 Q2 Z9 u! a; }, M) O4 B ^: ?
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
+ m: t/ v& q, j/ {0 i" X pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
0 g: u) r; ?) U- T$ V: i5 x7 y$ Y2 \0 k4 }4 G: ]
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
4 b( ^* ~5 n. Vand add under
: J, y' W' t$ R/ D5 X/ C! y& S( S: l" L5 _
Code:) k1 N3 I% p, t. U) b
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 f" ]$ I: ]* f; e
{
. ]3 P2 s/ W, u 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 );' L7 x5 L2 V. Q. @. }3 G* s2 f) q
}this, m! f) b& `2 u2 S5 j9 u
4 m4 D( {) ]$ S; U9 @Code:
5 t% D) E1 e5 o: o8 e6 K8 y. ?#ifdef __QUGET_SWAP_FIX
% t2 Z; O! P# ? if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
6 Z ~* W4 ]* S8 }! Q( f* X pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());% w: ], y. {( ~8 X8 {5 U. {
: m1 A9 G7 B# r9 Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
* V, S. l4 Q9 ]" X9 p) ^ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
m. _/ c% y3 N7 Z6 O$ @+ y, ^/ l* ?# D# t: V6 @
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )- s8 s* H) Q- \, w# G
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );0 s) a: M" _3 v1 G- }( R
* n* H% ?) Z# G; k m
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 b$ | f$ A! B4 ~, g
/ s' \$ `4 L& q
+ k4 r3 g( J0 f( q2 s2 o6 r |
|