|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # f: L/ [1 l0 ?6 d4 T3 d- Q
I posted this because someone kinda posted a youtube thingy about it :O.
2 a" g# U6 k7 e; F! S$ ~) u8 o6 Q, e$ a0 w# S( u. I
Find this in DPSrv.cpp @ worldserver
! L. L0 j1 e$ q7 q' Q2 `& P0 D+ y6 _9 Z k, {5 N' t. o
Code:" B# ]/ s4 ^- j0 a6 ?9 ^
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )0 k2 X' m1 A) l" l* P( Q6 R. [9 v
{) [8 o8 I4 n' T Z
DWORD nId;
; O+ U" j9 n2 ` int nPart;, X, C8 p4 E( S' N6 L
5 }, d) `8 S% y" p! l! B" @ ar >> nId;
7 }5 [7 j, o% [" n( J- {/ |2 U ar >> nPart;
0 \+ ^) M) b8 ^6 i. p 8 r, d9 v4 [5 u" T0 r: B- ^$ k, A
if( nPart >= MAX_HUMAN_PARTS )
% H5 h% g% a' w9 m K return;, \' l9 W6 |; h2 j; a& [* Z
& v8 J2 p# r, m! f% B) F7 u CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 r+ u9 x% J. Y' e
$ `5 F# f& P) n& p+ q: z: X0 a
' I' m" @. J3 mCode:! A" L# E% l( i5 @) F- F
#ifdef __QUGET_SWAP_FIX
5 F7 G3 z) \! B$ i$ m9 c! _$ a$ M* R/ {, J A3 S( ?
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
) H: A% p Q% P6 u# R+ ]6 o# N pUser->SetHitPoint( pUser->GetMaxHitPoint());
& \8 o* K& v8 i: r1 S
. c6 d2 d$ M; ]; G; }" F if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 _9 O) c2 H0 s
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
2 I6 n* @5 q$ @: [6 E
|8 n1 `5 |/ P& m) B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 ?: H$ p7 S. G5 |$ _; u
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );/ H% s( j! z. G8 _
: S; [1 {/ w. C, N% D+ ]#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
6 I: _- O7 H+ I W) H$ Qand add under. q% t2 I/ `/ _3 h0 G
) p' H9 E* V/ i6 [- R- U
Code:
# ]9 n) j8 N2 k& l7 ^0 hif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )# y, i3 ~; T ^, c
{5 F9 x# F# o- K' m3 Z
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 );# y# ], }8 X! h( i
}this# u9 J3 \( R0 V- [: ^; }* X
% a5 _$ `( Z, D M, ~+ pCode:$ y% Z; W1 N$ Z5 |9 G
#ifdef __QUGET_SWAP_FIX
2 t* _0 o6 H( S* q if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
, ]8 X4 f5 ^7 i% r( t" P pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ D1 \7 T! }- A2 r( T. k- h
! d2 |* |/ k/ @1 Z" P J if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ Q+ ?7 o( `! N; _* E! _
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
\1 p* a: l0 M. h& I: z
; U1 k- d, l6 F. M6 [6 T' s if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
; e# n3 X6 d- V" v( E0 ]7 r% | pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
5 i. t& M8 S8 t1 l" M! D
' A. g" k. _ H- |#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, L7 C; i- Q4 q4 q+ z& X! _
+ G7 T& ?2 p! ~4 r) O
# S+ N! g2 |2 d- _$ ? |
|