|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 _ ^- I" E ^% h" _6 z J: kI posted this because someone kinda posted a youtube thingy about it :O.
0 C% X; G/ u5 U! T$ {8 w8 j2 y: t( K* g: A1 `0 K' u8 L2 _' Q3 s
Find this in DPSrv.cpp @ worldserver% o6 T( C" N. L, E# G. b1 U
' S9 U: J2 J! l: N" jCode:
, c% d- Q8 e/ A6 k @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: m/ f5 k+ h! F& Q- A$ X, K{8 j. H1 i: x! |! ~4 |
DWORD nId;
4 t4 ?) d4 [) O) e" ]% M9 V9 R int nPart;
3 N; e/ u: l) W+ m/ i8 @- y; O
" W7 e1 @0 J( m( n ar >> nId;& u# y% O% a( V: b6 H9 d9 g! _+ _
ar >> nPart; : K' D# {2 m8 }& Y
! w% j0 U. S5 s( H( Y3 d
if( nPart >= MAX_HUMAN_PARTS ) - L+ U1 I- m! L U3 I8 T# F% y/ k
return;
" |- [6 N) |6 K5 `4 ^ m: q7 y# ^, }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
! O k) T1 o4 ]6 p5 L# e9 o
: d9 r0 K, X. U1 t0 o
: n" [1 d8 f7 @6 ^1 k8 e) r- TCode:; {2 S z. r' f
#ifdef __QUGET_SWAP_FIX
6 C( F( B2 u. h2 D) t0 @. ~2 M, j& N9 h# T, \ }; w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) {! K$ K& X8 S& }4 h
pUser->SetHitPoint( pUser->GetMaxHitPoint());
: e8 a4 G, @0 P7 A# ]' E3 k! P8 ~) O+ s
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) U5 m4 b4 g! l8 R1 d& h: r
pUser->SetManaPoint( pUser->GetMaxManaPoint() );, t0 t1 n5 {$ X+ f0 _( N
# N, H' e0 D& M# r! A& t/ f" r" h; [ if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
! T9 v0 L: k5 O0 | pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );4 F3 `' @ y# d6 `1 n8 [' i* y. g
0 u3 F- Q1 R/ ?" L! R2 L#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp) I9 T7 c$ i9 A! ]
and add under
5 f0 g+ o! O% _" d3 Q/ g- A9 [. _, l! u7 N' s; O
Code:
! G' m) O2 @0 Xif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% A+ E ]3 e6 L# x3 z
{6 i: W" U( m z5 P# U& Z3 V/ ?8 o
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 );
8 Z9 O$ o+ p; [7 y" f! B }this
, r/ h" X' @. v ^- p3 ?9 o3 s$ Z& u2 o, J0 l" e4 ^
Code:
$ @, h7 \7 U l; s$ s( j! J$ f#ifdef __QUGET_SWAP_FIX
6 g) A5 u. t: x if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
$ j& j, t2 V; S* z/ B pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());) i2 a$ `& U8 x8 N* H' R
& ~% r9 i; ~8 p* i; ]7 x1 V if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )8 o0 |6 K0 a% e- I2 m! U" v7 w
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
3 h6 g1 ]4 C; W% F
: k) `+ G( b' y3 W if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
8 w0 ~; Z$ ]3 c7 T: J pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( o3 f# Y# E% s. z- q$ ?
4 h. o% [) r" r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
3 o. I2 O9 l6 k! X, U
( }6 w! P0 W& u" @' T$ _ S2 {: A- h! F) K8 ^: M
|
|