|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
4 H# d! s" f5 RI posted this because someone kinda posted a youtube thingy about it :O.. S9 X! _/ L) g3 R" z$ k
8 B8 k9 D# @, I9 v4 B
Find this in DPSrv.cpp @ worldserver
0 x$ R/ M6 @* G M5 B/ ]( m) J. J8 k/ g) g
Code:
/ v/ {0 L( L' T& U. p! I/ U9 e# nvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" n- j" w" g( ?/ g x; P; R{+ w2 }* a5 {1 x' ~) g3 J4 ~
DWORD nId;
8 @+ C/ ^# L% Y) s4 O! w4 { int nPart;3 E* b1 G7 n. \
( u8 r3 u8 F* e% F' C0 r/ p9 G
ar >> nId;1 E7 w+ O* ?# q
ar >> nPart;
# N0 M' U# b- Z" K
6 K2 `: {$ P+ b+ [/ B e& P if( nPart >= MAX_HUMAN_PARTS )
8 @) d. n8 X& V/ N( [) I c4 v return; e7 l& C }! m d% y# d
! I% f/ H7 |, ?4 [
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it2 s2 p$ j+ O; ~. L& s
+ m' Y6 {5 p; S' S+ ^& E! I& i
' ]2 O. D- ]7 i% ~" ~, zCode:
5 Y# D2 G, i; m( E* A, \#ifdef __QUGET_SWAP_FIX2 j j- G& z7 l9 D) @$ g
. i' S2 N8 h7 h2 [
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ); l0 O5 Q) l/ _! {" _
pUser->SetHitPoint( pUser->GetMaxHitPoint());
2 N6 ^4 i% T! ^% V' N3 I% o
1 X* }4 i( V1 x. u if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 o5 e' D0 r; w2 z9 u, T, G pUser->SetManaPoint( pUser->GetMaxManaPoint() );% t! U1 _# L( Z7 ]! U1 I, L
0 P# K, p/ D2 w4 A: c9 ~1 m3 p if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ Q& d6 A7 `. E! m C; M pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& |4 @1 D8 t1 ~; }9 ?
7 q$ b3 A6 h6 R$ m" K2 A" D- Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp4 r# L! _9 J7 m* F
and add under
4 A* n( c# x9 F# g
. r- R `/ y" }0 V1 F4 G8 [Code:
- M% j7 W S4 Qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ); a4 U0 Q, W, a ^9 w Z
{
: S y4 ?3 J5 d+ e5 ^/ K9 p: Y 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 );
$ z3 G+ I2 {6 J* x$ r' c5 _! y }this! z' k, L0 H7 i1 j# X! F
- I+ P. \6 S+ u8 }6 z, YCode:: a; A* r7 _( L2 t
#ifdef __QUGET_SWAP_FIX
+ d& W; J0 W+ V0 i E6 T if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ H, N, m/ @# i- Y( q" N pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
' k4 h$ `) [; Z5 J( W3 K* K! ^1 w7 r
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" S- g& M- S; S5 B! S% \. k' R- Q pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );: n' o3 s$ t, F# Y! |
2 f+ a1 a0 b' Z- [; ~ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
) ]9 D! m5 Z q2 n4 ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ A+ F. u! Y. f0 G, w' A" c' Q* G' |. f% W3 m' s& e
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 Z7 s }' T- O6 r
' w9 P: u$ U( h4 p' M! E
9 h! |4 s, M3 r1 f: j" m: I/ w6 Q |
|