|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ; N# }4 V l: n" p) a$ _! o% M
I posted this because someone kinda posted a youtube thingy about it :O." e+ r& s- B5 @# ^5 @" E
. O& `: s. T" m' J+ U, c8 C
Find this in DPSrv.cpp @ worldserver
; x g. S$ I' E$ K) {! @$ C& }3 u( `- v$ c
Code:1 p7 g; e7 Y. K( C8 {
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )! i; {; q2 L ]' ]' y
{; y6 V( A! z: P" {: d" [
DWORD nId;
9 a5 g k! Q1 t \3 v) M int nPart;
* @2 u7 v/ A& ]# c9 Z* {
) F8 O! b$ t! c. t) b5 U- B$ h ar >> nId;
1 Y% L8 c5 |1 O. n5 p- H2 [5 c ar >> nPart; " I6 ]6 J- v/ F$ L
X. a; |( a6 f$ m. D+ u if( nPart >= MAX_HUMAN_PARTS )
0 s7 [: C. n2 _& @+ L8 c4 g return;
) l* {5 [" O/ X, S4 U# E+ s& v* }
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( N: E% w6 a) u+ S& c6 N6 X0 ?% R
1 D$ V& a, ]$ t# Q
6 W3 O4 J( [0 O' x9 h+ e: iCode:
1 R5 u- Z, j4 u$ D# H#ifdef __QUGET_SWAP_FIX
8 V3 t+ P5 q7 p; R' e, [. e. B# V* ^
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
; A7 A+ N8 ]4 F* b- O$ f7 k pUser->SetHitPoint( pUser->GetMaxHitPoint());( j; W! h3 i2 W H3 w2 h2 L
) c% M4 H' v% P# ?* r7 S( W& M
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), ?0 y+ `# O) S8 O9 Z0 E2 Y9 d
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ i. ]2 R) ~* m5 c$ U$ f. c% ^% q$ n% Q6 I' r2 H8 G
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 i) Y) W9 P/ e& {$ Y* Y( P pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );' _% V% G5 r7 D2 {" J2 k
. W. P ]8 I h( S6 _& g#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ [% X6 W( A2 U8 ~and add under
0 U' G: M9 v+ g, `2 C, f2 X6 F: v) c h
Code:
* \/ ?, C' I) p* `8 lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
5 w: h" Z" o8 b7 k) k {
$ u5 A# M$ d4 v 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 );
/ I4 D# L" l' _+ G! l) }( L }this% c; b9 h; q% f6 P5 Y. ?; k5 U
9 t- L& }' h; ~; x' K$ J
Code:
/ E2 F. n, ]' C$ V7 \* \#ifdef __QUGET_SWAP_FIX
& E6 e S; d6 b5 F7 ]" a if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
9 i+ U' j5 P8 M8 R9 K pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());( O5 b7 }- ^+ G. H
1 l& w; C* ^$ }- Z if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
$ x6 Y' l; f' e8 {! A- ?) [ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );3 D& Z8 [* m& m. S P* }
! [5 b }1 j# ~$ L0 y: I0 ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 T! j3 {) Q, V+ ^4 m( e, x pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );& {1 o3 _. Y) H: m
. E# Z* k' F P! T* [
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" J W# w& @) d/ K, j* n* W: ]3 K
% ]" r# Y5 X0 B( S |
|