|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
7 f6 u1 a+ H9 s6 ]6 NI posted this because someone kinda posted a youtube thingy about it :O.
( K6 |2 s& @5 K6 }- J
+ z; M( T! S1 T* V, \% U: ^Find this in DPSrv.cpp @ worldserver
$ E8 Q* E! k3 M L! N n( ?: _1 z& |# A4 X& c( y
Code:$ B# d! C, e9 B$ S, q
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; C( U j9 a# w5 B2 [2 b{0 N. d0 s* I: q$ l
DWORD nId;
0 q4 R" ]/ c, j' U: r0 m8 W/ B6 {2 ~ int nPart;
7 a7 Z3 X9 H. ^! x9 A* r4 c7 r- P4 f9 L* h- j2 o
ar >> nId;
% W/ ]+ I4 u( s2 R9 o. _ ar >> nPart;
6 G) J; ?& u7 Q) x1 V ' y$ P& [, X" K8 c
if( nPart >= MAX_HUMAN_PARTS ) 1 D( i6 M) m' A7 f' ]% i
return;. b, F4 W7 Q0 e3 u2 |
" r% h! E% I [: E& L* W
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( P7 t0 H: J& r3 {9 j4 s" I7 g4 A# |# P2 ~
4 z6 K8 `$ i6 j" B% |6 V& E
Code:$ o4 |( t8 E* r2 V- Q L
#ifdef __QUGET_SWAP_FIX
s7 D' o U! [3 a$ l4 h- t7 l2 u% e% `
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 G! k2 \1 x1 z7 V
pUser->SetHitPoint( pUser->GetMaxHitPoint());5 j3 `& S$ m7 U4 X2 ^7 e
' _1 U% Q# R! M: S' T4 c
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )- t) f' a- H* H5 H
pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 E& g& L4 i8 e7 }
9 A7 ?' r' `0 e; }7 ?/ M2 [
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )0 b; `4 Z# y' K& x. _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! m6 e; }8 d& T7 j
; \5 d3 u$ D1 w1 s$ J' T1 }+ D3 c
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp# ]( d% p2 P! j( D
and add under
3 R2 F. f. H& l/ M( ~7 U; [
) e' {- `' J1 L \Code:
8 w& V: \+ \) r% Qif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 F! E4 b% J8 T7 o1 i {9 p$ I/ {. s/ u% S8 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 );
. j0 O5 Q. C1 ~; J6 B4 i }this2 H7 \2 U) @& A2 T
* v1 a; G0 s' u1 W& ACode: C/ H. r/ q) D. o( \% V* a, I8 F
#ifdef __QUGET_SWAP_FIX0 d2 D1 {! i5 |6 |5 k' C: z
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )9 t3 f8 i! o! p3 L3 @. } c: a; f
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
2 F! ?$ `, X+ L$ M9 S9 L1 K+ S ?% \" Y2 g ]6 C
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )7 `: U5 f% p7 F0 p* U
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
# x0 d: T% E% H3 \1 U* l8 J9 Z: d7 {1 z) I8 | m; t! m
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 z1 e" ]' n7 @. H
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
0 a4 D/ s0 T8 Y$ S+ g- A
4 _6 Y$ q5 P% E k% Q#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver % S4 T- L0 v2 v* [
, ~( e/ x! c3 o9 p" Q: [" E3 F! D4 j3 V' i$ Q0 x, [. C
|
|