|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ s, e- D X8 c# i) I- B" [I posted this because someone kinda posted a youtube thingy about it :O." N+ j O/ r/ K7 o7 T. z
( `2 Y8 I' G z) e; VFind this in DPSrv.cpp @ worldserver
6 E% J a; B: L! T4 S' u- W, e' g' f. n, k6 t5 \3 b- g
Code:+ o+ Y, N$ B0 S# B5 l6 `% ~
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 W! i+ T8 x+ U c1 e4 Z
{" p, t& s P/ H4 M% ~: Y; h( c
DWORD nId;
7 d2 @" b4 t6 ?1 T' h int nPart;- d9 U5 a/ Y/ e7 b. W
$ x* a) l; k9 X4 D1 C+ T/ s# Z
ar >> nId;
# v. e0 s4 Z9 q$ A/ w# M% n( Y ar >> nPart;
1 s- j- Q7 q* z, g( ` ( r# g. a+ C: z
if( nPart >= MAX_HUMAN_PARTS ) 6 M- e! A/ W% T+ Q) i) h# k K, }
return;
) V) y( `: y2 H7 Z$ a9 z+ y. {% D: p: A0 ]
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
) h' U& l3 ~* S9 C, e" t
+ W9 H: `9 `- P& D1 B1 \' B& v! q3 w( @+ Q/ o7 C6 y
Code:
; Q" W# P0 @; ~. v! B: ]) Y#ifdef __QUGET_SWAP_FIX
# d& j- g! r( n6 R ]1 h9 `0 i8 y0 _, u/ \7 V
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
H- I% S5 y; z1 Y- Q; U pUser->SetHitPoint( pUser->GetMaxHitPoint());. n; ~" u, `( v: m$ d& ]; } J
( b+ a- k3 [! ]4 n2 p$ X5 f if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
9 C3 c. S' V; o( b7 _' i pUser->SetManaPoint( pUser->GetMaxManaPoint() );! @# i, D! e a# F2 g
/ ]2 f- V* X. h' o- p% D+ B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
# p ^1 h- |" V7 J pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: _; ?# _8 h0 |. h5 N& I6 j5 b$ g7 \
8 n2 c2 h# b# h1 Y3 S( e#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp% n9 n1 |: g: P" }4 I
and add under
u0 b' a- L+ d
% L' P2 M: F3 w# B* NCode:$ [% E' k/ c" Z6 ?
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ). o& \4 v# s& Y' O8 ~0 X2 N
{9 v; A! D: r- m7 [0 p
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 );
1 s4 h3 ` j6 [; D) E8 T0 ]. B }this
6 v% B3 ?! f3 ]- s ^2 R- y; k6 B3 X
Code:+ P3 _8 S& P$ b) f' `
#ifdef __QUGET_SWAP_FIX
- U3 ^8 }" _" h- {" z( D3 x( i if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
* @* d) x, h' I2 u, T8 } pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
* j% `( f) `9 G' u9 }$ z' \6 Z
* {( ?" d8 D; V' J( H if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
# k# b4 p) Y: O+ b6 R$ D# ?0 k0 d3 j pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
8 x- t/ k; x1 G
% l4 W! J% J2 F' y b) E& M if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 U& w+ E& L4 N3 G; a7 y+ `& m
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# @5 k. D& e: e# ~
3 {% W5 m+ V a" I2 j% W
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 A) g) W2 J" Q, g) w5 x( q
6 i0 { c0 c- B
# ?, h+ Y' G' X- R- @1 J |
|