|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
# O, \% ?3 H9 K/ j3 s2 a' PI posted this because someone kinda posted a youtube thingy about it :O.
, y. O1 q: S6 |6 `; J4 }
, C. h; p7 c- f* IFind this in DPSrv.cpp @ worldserver6 u% n( V1 b, _$ o
5 ~0 L! N: S, V7 tCode:0 C6 h2 R0 L9 Y6 S3 L; J3 o
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& w: o* i% T' f' A2 Y$ K7 I
{
. W0 o3 H0 c0 _6 x ?# d4 t% u4 X9 D DWORD nId;3 R4 |+ W5 O# {! Y- k2 O
int nPart;2 K; Y& |, D8 J, d
! S3 i& Q4 M" V2 C# g6 i: } ar >> nId;
' G" ?- `3 h+ j- y c; | ar >> nPart; 1 I, k @' u# `* j' @+ r
% |' t0 P) g. h: y$ u
if( nPart >= MAX_HUMAN_PARTS ) % T( P& k% N7 Z5 l" C* }9 x! d" |
return;
0 x5 y5 a# D& P( a! G1 V( _2 K) o" |6 p0 r. ~6 o; g
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
% e3 _4 e. w! q7 n0 s% I/ \2 Q# q& F) G5 Y
" |9 h) Z1 Y5 Y+ s0 a0 X
Code:
% w5 L# m3 P3 B8 f) {+ J#ifdef __QUGET_SWAP_FIX# r( \+ Y7 } Y
. |3 }) [% r9 v' q. v4 T if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )) w. s9 V" |2 m
pUser->SetHitPoint( pUser->GetMaxHitPoint());6 X) e2 M% ]3 j+ ^7 Z, p
7 {4 q3 }5 ]/ Y) I& a& z if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
: K) p+ W- L' A, t- g* Z! d. y pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! |9 |: i; L( ^ N2 R& ~ w3 J1 q# k6 y- t& `+ ]( A+ h5 Z. w
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
- X( g6 v- T. y) ?4 k pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
$ _; v, \6 D/ u
2 H9 K+ K+ e1 W' w) t' v#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp2 q' p, I: u* ]1 |& T
and add under
8 X) r0 b5 o$ Q5 T, u2 L, x4 l4 D3 B9 @' o
Code:) a7 m6 B& M( ^, s1 j9 W% U
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 T7 @9 b4 `$ l5 O9 M+ b
{
0 p- U: B, n8 z: ^) u$ w 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 );
- {. e# e% N3 b% f2 M }this
- d% t7 b2 P3 ?7 \& m" g% k/ E0 S5 M
) l3 p$ [. z- y! h3 PCode:2 Y* X' @( p; y/ V
#ifdef __QUGET_SWAP_FIX
6 b7 {( z: v3 o" ]) _2 y7 q+ |% M if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )/ i9 ~" G; l0 t9 j/ Z+ j2 u1 P# x. G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 a) ?4 e n- L) G: x7 e' _4 ^% ?
3 i. y0 b. J1 N. s n g if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 H" w3 Q- H% g1 Q
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );& Z; Z. A5 f6 {6 D7 x0 t
0 O! e$ K, M1 a7 h9 _# [
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
, }4 H" g/ e7 o- ? u pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );$ t, q& z! f% ~6 i6 A
: R$ J) g8 m" c' l& M
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
: Q+ W/ Y% n1 ^* Y! N* W
( b7 L) U" Q4 Z8 P7 T' `* u2 O+ L4 V
|
|