|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ Y, K: P4 D1 X; W' l+ gI posted this because someone kinda posted a youtube thingy about it :O.4 k1 Z; ~9 O6 b0 W( r- {# m$ G
) t5 l' n! K. A, c/ N. |Find this in DPSrv.cpp @ worldserver
2 J- {, F, g! U+ ^6 ^3 K9 V. C1 [2 @
Code: a, V9 }* B# n9 q, \
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 V! l: @9 b1 R8 t0 z6 ]5 T7 Q{
7 l8 l( R' x. T% _ DWORD nId;; h8 X0 r3 Y" o
int nPart;9 P8 E4 j7 z9 _( ~
+ `/ j+ f) g' {% T0 h u! R
ar >> nId;! ]5 p/ ]8 j( }: S& d' R: X2 H' h+ p
ar >> nPart; 1 ~- r* O3 m# I2 ~. W4 [
" }- ` S. U F b9 o1 Z/ P2 [6 L4 Q if( nPart >= MAX_HUMAN_PARTS ) & |* k" T- i+ Z# a, I2 s d
return;
& a/ x9 [! P( M& h9 S; I; O0 V: L0 f0 a& I- J
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
* I4 r0 f1 I4 D2 |* N; A7 Z+ u' h
, ]: V7 ?7 e2 N% U* a+ fCode:% @0 M5 m$ f5 ?+ U1 [! C" F
#ifdef __QUGET_SWAP_FIX
" J7 N# S+ I3 p* ~7 m/ X g5 L- p: J& K9 V7 x
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 d# m9 S6 V1 P4 c" u$ E7 S pUser->SetHitPoint( pUser->GetMaxHitPoint());
# s- L( U; _5 ?/ o' [9 W' @# x, u( X* ~
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% q! F6 p. V: L$ f
pUser->SetManaPoint( pUser->GetMaxManaPoint() );3 t% o. r, i6 ]- |8 h' V/ u
9 W% ~, K' g& Z) X) x* J. p% I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
0 u2 S2 w* {6 d3 x pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) @: a: R: i2 O$ K8 R& r) h9 X
0 _% u3 H' D: @#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 g( O& q* \7 j* p9 P1 Rand add under% f2 ?7 s; u+ Q
" J. b3 }) _$ {) i
Code:
( V: v$ H/ z6 Y4 Iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
3 R) ^$ c" z4 H {
# D! L5 d. I' r5 o7 U 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. n- w0 H% i
}this/ w3 L2 N z# ~2 _ w
9 F- t0 [# ]; i6 p; X, qCode:% ^/ G$ |+ X. H6 c& b" S3 A
#ifdef __QUGET_SWAP_FIX: ?( X4 ]& b5 |1 |4 y k
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): j/ a# z ]7 o I% G. |
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 c0 l& H" L% a
& D2 Y5 N& I* [5 ?) ~3 b7 \6 I if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( K, Y, Y% i" @. j: d* |% v: t# W pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );$ c. d# B0 c) \5 M& ~# ^9 P
7 S) x! f; i/ b4 Q" N if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
7 I! P) x$ J' r5 E pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );9 p/ N% s- {6 g6 M% B6 ~* I& \
3 l# `4 V) h( ~. c, b- t& L#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 0 \$ e( r8 u/ g( _4 t3 n/ y
, g; i @/ L% ^+ H$ n
% _# }7 s3 G7 C4 T; I+ O5 f |
|