|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . ]) I/ M" ~! T9 }+ c: r9 g
I posted this because someone kinda posted a youtube thingy about it :O.1 N% Z. Y9 ~ V( i; t+ y2 L
. B$ ^, h, C! ^( qFind this in DPSrv.cpp @ worldserver
6 }. P; H: }8 `( q6 U- u$ [6 t' d1 x5 C) f3 C) n: q2 l
Code:' |. }" W! F1 z7 O/ h
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
" g7 _; H- ]+ z$ y; @0 a6 C{- q/ z. c8 c, R- E h0 z1 o
DWORD nId;/ P. q) [: [! p7 ~2 Y9 @0 i
int nPart;) P" G: S0 }, u- F/ i$ o1 y
! F# n5 _$ @* h! t9 k4 d/ g& [
ar >> nId;
& `7 a7 D. [9 b2 v' Z! \ ar >> nPart; & C3 i0 d- k/ V2 T/ s$ i
4 ~3 f# @/ c& F' S if( nPart >= MAX_HUMAN_PARTS ) : I8 {" r. `( M* q: h
return;
: z5 `; C' J0 C
) S% w! c& U F3 Y/ `, L H CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
4 h3 I: j9 ^$ H# | n5 b6 M
# D& |6 q% w, a/ E% T
' h% s+ i A. W+ N4 MCode:; n0 o. C7 j( w2 \! o+ O( `) R7 a
#ifdef __QUGET_SWAP_FIX
- t* ~6 P& }" b/ j- X- F i [2 Z" A- N6 l: x0 `* C
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
* ^( l) X; s9 `! L7 _3 a pUser->SetHitPoint( pUser->GetMaxHitPoint());
! ~" F+ s) E8 V8 f. h; C& D v% K
( a2 @# k: k( [$ k6 x5 a2 C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )2 m; a5 `3 A9 c0 f) g* o
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: R0 e% Z( c C: O7 V! ]2 Z; w; z$ _% E, z2 s
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- T' G* B ?3 H' o) I3 k
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );$ \: _1 f/ V8 D! J! N4 n
9 t/ i! p' n5 y, o+ |. R0 ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp" U9 o! I1 ?2 j* v
and add under# F+ }- n# x7 N0 h" P6 O
5 d! T, C4 u1 Z' \$ ^. N
Code:0 G& V8 s2 C& I9 {
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" m4 S% O- p5 u- Y, q {' Y, L$ b2 ?2 G& y" N; q4 w) R
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 );
) Z5 y; @ O9 O) t. o. |% v1 F" R }this
4 W. Q( f& [) w7 X& E( c- R- q: [) j5 a
Code:6 T L0 ~. X9 @$ w8 q
#ifdef __QUGET_SWAP_FIX7 j& g' z' r- j2 ~! Y! n K' j9 H% W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 w) _. g1 _0 Z0 n. d* K$ v) q
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
, Z: s2 h, r0 [
) M" z6 i% C7 b# l# v) _ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ) a1 j- z& a- d; G1 x: I8 Z
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* ^' G4 }' ]+ R
( K5 s5 z: C: Y if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ i) C% v& U. b+ B pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );% n' W. J/ t3 r; v" H8 ?' O) j! q
4 o; Z* u5 K* c% Y4 A#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- L, r- P4 S2 x0 A9 f+ i2 h7 g
3 R& h/ B/ b: {) E( \# b) M) l( _ ^, ^
|
|