|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 k' R& q& n+ c
I posted this because someone kinda posted a youtube thingy about it :O.& I# o* M0 N: y$ v9 ]9 `* Y
# s6 k9 F8 b' `" V' ?Find this in DPSrv.cpp @ worldserver$ e5 _ ?2 v0 | z" X
s; `7 o7 w5 a! [3 V5 l) d* ~
Code:) Q4 j- r% I9 n1 [/ v
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
& {' x! S9 N& O{
) ]# ]- k, f+ y* n% O6 g& D8 w DWORD nId;' w' W2 r+ w0 R3 x0 Q
int nPart;
. p2 P' x% Z6 V! Z8 J0 ]9 K \2 m7 V! L
ar >> nId;6 Z7 L/ D* a, }' i6 \! n3 g
ar >> nPart; # u! @0 s( p* o" Z
2 m/ r. N+ h9 T4 F
if( nPart >= MAX_HUMAN_PARTS ) 6 D1 R9 e' e+ j
return;
: F" M- z# r% K1 {1 F% K, m
& |( H. P. {+ J C- q CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
' V3 j' m% K( U+ g- @2 w4 v, \' j" `) p
1 y; {# @ y5 i4 [/ c. B
Code:1 r& C# P4 g( u! O, N; W
#ifdef __QUGET_SWAP_FIX7 ]9 n N9 u& u$ x: ?0 Y
: `+ D0 L5 u. ~2 u$ N if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )$ p( p6 S2 |- y! ]+ u, C$ I- s: u
pUser->SetHitPoint( pUser->GetMaxHitPoint());
- H; \! `6 b) q
, ^9 X7 s3 ?2 W, I if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
( _8 G! E! V0 t6 A% I H pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 A- c, X2 l. s0 c' C
" Y8 Y/ e% u" o/ O& S6 ] if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
. }( @9 c* M: e- F pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
, R7 _- V1 G& i
9 y+ ~3 K: a: _, _& m#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' x8 S% ^1 y1 u- u% A& t8 gand add under
* v* x) T R1 A" }- C# u2 @. r2 k! s) ?- {
Code:
+ N& H( f0 K4 W2 x6 I/ z3 vif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 H: I% x. j. S0 o
{
% i+ }/ _9 H7 [% }) h5 s( v4 N1 j2 ? 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 );$ }- F$ V6 O" a) n
}this1 }; N0 ?3 O8 p' N" k2 r
5 n! \" z- O, J2 w
Code:" W/ I. i) I+ i7 B8 [+ \. I- h
#ifdef __QUGET_SWAP_FIX+ Q5 ~5 l. U+ z X/ ~
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )3 N4 z5 I5 ~( p$ T' ^, [. p: m# O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 \- r& U$ ~+ b- n3 R7 e4 z5 y4 \& U2 s$ w0 f1 f$ j1 F
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )) i) p# L2 P9 O5 G7 l
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' m. d$ n. r9 J9 w& Z* C6 P G" g
* {" a. s9 |$ ]" d* ]& G! {" b) ~9 [ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )) G+ K/ ~6 p, g4 O8 \
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );( m" d$ u" z/ O7 K( A' ? a7 I& U
9 u& \" @+ n; ^8 G3 W#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
9 q/ p2 O o, e9 Z; l) j% _" d$ F+ Z
# v1 j8 ?9 t7 d+ _% B* j
|
|