|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 L3 n7 `. [9 `2 m" Z7 H& `" I
I posted this because someone kinda posted a youtube thingy about it :O.3 a7 x" v4 k; M, L. `- J# x
3 _& d! e( z; qFind this in DPSrv.cpp @ worldserver
1 U% d( i# F& r+ n$ A1 q5 b# v7 ~$ r! N
Code:
% {* d1 e" x6 t0 ?; p" pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
) @2 X. [! P2 e; a6 R/ [{
4 H9 r: F( f) I$ B0 U. k' m; R DWORD nId;8 K& G S- u: k
int nPart;
0 ^' _7 t; K- V9 y3 A
3 ?5 Y6 f6 f( _2 K8 ^ ar >> nId;
1 H+ M( F. d' j3 H+ L6 i ar >> nPart;
3 W% f8 q* K2 X3 L
! ^# M7 O! V8 G4 p/ H8 E4 ~% t T if( nPart >= MAX_HUMAN_PARTS )
5 O) }% V9 d C: F return;1 R& |) h( A, w% u9 O
" Y9 J2 [+ z! v CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it6 Y+ ~. [! ?2 i% R8 z6 w! V& t7 M
* _0 K2 g) i$ H7 H; _$ c5 I4 h
4 B2 h2 v, B2 O( H; D: b! \
Code:
7 l8 u1 Y1 U F- N- U#ifdef __QUGET_SWAP_FIX
( u9 `; ^2 [. r" H4 ~0 [1 z8 r9 _1 I: ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
$ p. ]& m: _" o9 A$ y" t pUser->SetHitPoint( pUser->GetMaxHitPoint());
. D( B, J% S& x6 b+ l( [: |3 G' k
: R& b) q3 i1 j- P if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 M+ f& g) g" o+ y& O
pUser->SetManaPoint( pUser->GetMaxManaPoint() );# W( L8 X. t- L+ X h1 @& f) L! f" I
& i; H0 N0 A- _8 r
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )" N6 m: H( C: x1 M) ~8 W6 V+ _
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );! ~6 W& d+ U+ h4 g! M
+ y1 X; R8 b6 c% @
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 B+ k6 P# y5 ?$ [ M% d* u. r; k
and add under
( ~: G3 T6 ?% }, @- K1 J9 J- [5 P1 g9 L' L6 D" C: P- H n
Code:! M. u* s+ {0 J) M+ p) p. s
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 |: S( }6 ?+ f3 _4 n1 W
{. @+ A# ] j* t4 H+ i
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 );
9 S' r/ z8 a1 w8 ]9 R& W. r }this
+ _* s( F6 H7 I- \9 m
! Z& }% k8 u8 T- E& ?9 A Y7 bCode:
( p1 S# `& f/ z7 z, t. K* z#ifdef __QUGET_SWAP_FIX6 B( w/ i, h" I! |& B+ l2 V
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ): ~5 l9 c( t, ^4 \. a5 N( L8 T
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());- F9 p3 n& B* n2 k
: e( M u! b+ w7 J6 B
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )! v& l6 x, o- _! }, n! k7 N
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );( I. Z3 E0 \7 v2 ~0 G
6 N m( C5 z; \0 M% s: ` if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& P- B" C( C: }0 O
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );5 ^7 ~4 I7 s: Y* {: }/ U
3 \! Z- f% y: u. k5 w
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) S9 E% a: J& x" X5 ]( A: t2 U$ v2 Y+ x% u
& k! n5 g7 f0 U |
|