|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 z" ]9 z! s9 F6 I' F3 a. j
I posted this because someone kinda posted a youtube thingy about it :O.
& L* l8 s1 s! R$ v8 K$ _7 J2 M. `$ D2 E, j1 a9 W3 q
Find this in DPSrv.cpp @ worldserver- ^ L+ X, U' W2 G
" h- A# B+ @5 U6 h/ y6 t
Code:. j0 M! g/ M7 d" t" o! [) f2 v) z
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )3 F8 z& E# |6 x
{
& J- C) _6 t2 ]/ l! }* q DWORD nId;
5 E6 g3 u" S# E/ _& u int nPart;
Z2 \; D9 D6 }. u+ E( q9 F/ c6 s2 D" k$ R4 B
ar >> nId;: j) L" g6 q$ u% v: H; C
ar >> nPart;
4 e* `8 C' E6 u1 U$ a1 Q
/ i" R0 s: z4 k, j$ F7 h if( nPart >= MAX_HUMAN_PARTS )
" `; }- v* U5 }8 J1 h, I return;, i/ O. t/ x( W0 ^8 ^' q
6 M E1 d3 ?1 w8 P" |2 R
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it5 |8 h ^/ v. L5 b! B
" J) y2 ?( Q# h4 V3 f! d& U6 i: J) G! B) N. p. [. J
Code:( U# g5 x" F& R
#ifdef __QUGET_SWAP_FIX
; ?* ~7 _9 v( a$ m9 Z3 M2 F* k5 L: ~. ^
' {7 f1 O* q# g$ ]# } if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# [1 U8 _0 u& ?, m pUser->SetHitPoint( pUser->GetMaxHitPoint());; p% `% k/ U0 c1 H( y0 D+ Q& A
, I/ I1 d7 V; X2 G+ L if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
. p4 x9 y _0 L! z% L x. h pUser->SetManaPoint( pUser->GetMaxManaPoint() );8 Q% [6 A$ }* \4 A1 I( z8 t
; @. p; e6 @; W' P' j( z
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" E6 Y7 e% X- e
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 l& X" `! G7 Y& ?
. b0 z' d9 o9 C! W. M#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp& d2 f7 s1 ]# ^: C1 j0 s
and add under
( P& s: R1 ^# n0 v7 G: N& w: o ]8 K
, A* X" c# C! @; R$ Q3 gCode:1 r8 u2 w$ U, Q$ F0 [: ?
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 G! F8 e# v5 }; {! J5 D {
' H1 V. B4 t0 ~% Q$ T 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 );; b& P# G7 t% F u
}this; S1 \/ M& X6 T p+ E: b
: }( y; d- ]5 L4 W" u+ f! v
Code:: f3 o! K) R2 Q
#ifdef __QUGET_SWAP_FIX
/ T8 ^& ^* g- n* q. A9 x3 w if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 Y' L% Y8 w2 a' Q pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());7 N' W5 @# Z7 d2 ~$ }
' ] b$ Q6 U) c% f) }0 o8 g8 h if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ @# n+ z2 B$ d* z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
, G' ]4 b i- G/ j- Z$ y' M0 o! _. p* j+ \ ^; ~% `$ O+ y: N X
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% `3 S, y! L$ d
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 X0 i# _, _& `. C* W$ h
( f8 `! K" X9 a5 x( m
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
- V, I0 P' b4 V% [
- u" b1 u; X: o& Q1 t! W8 O, m: ^ t
0 N Q9 H: q* b' R$ b |
|