|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / `- O, n% U0 \9 N/ ` k6 | D
I posted this because someone kinda posted a youtube thingy about it :O.' {2 x. y9 P! W- p7 C7 a3 M6 Q) t
8 g- c. D1 O! A5 P3 L o2 Z
Find this in DPSrv.cpp @ worldserver3 x0 b4 L& s t7 w+ n
: v* T# n/ O/ M: w* _1 U0 \ _: XCode:* S( q) _% M6 I: J1 k" z' C: c
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
6 k# k4 ^ W h{
: \' h" O, u! {" m DWORD nId;5 b4 d x1 u" a
int nPart;' H" |( m. Q, A; \% K( W
( l0 F/ G' `2 ]/ y ar >> nId;, A; L0 N4 F9 e4 D. j* {
ar >> nPart; , |- Y4 Y, u& g$ q
7 o( {: u5 K1 h' Y7 b; I, I& n
if( nPart >= MAX_HUMAN_PARTS )
: S0 R' \# o1 C* z( c- H) G return;
( R& o( W" R+ X, ]0 T1 x+ g/ F' e" f9 w6 N, [0 e
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
0 T& h# E9 _ S1 m1 g9 ?( y8 H4 D- m- a; \. f
8 _1 C0 @% G9 C8 R4 ^4 i8 LCode:: P9 O# P6 N9 _( c
#ifdef __QUGET_SWAP_FIX
; Q' Y1 `, N- x7 Y" V8 d- `1 o7 |) b9 Y2 b
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )1 @: v2 x6 c% [8 ] ?
pUser->SetHitPoint( pUser->GetMaxHitPoint());; S# \- q% R8 N
c9 b& z+ O$ B& j" }8 D6 T% L2 b
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
! Q9 u5 l* q" i* A4 m8 w+ {, R pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! n# Q, h) C) K) N2 k6 V; [ | ^; f7 p8 R2 S+ x9 E! j9 }
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 I4 P1 ?2 p( i' C% [$ B: T
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
" W }, @) v% U9 ~# R- J
D0 `. I5 d5 Y: O# x#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" F, [; E8 F( w6 X* c( Dand add under
. u* b1 y) R% _( h$ v' }3 s# l4 u T
Code:
1 K6 B7 K( G3 E: I$ P4 Bif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 w9 C. L: h/ G, j6 L* ~& n {
5 @0 E% G! ^, H 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 );- b" h9 }% b0 i% T- q
}this
# x, S& g- W6 ^. Q3 M& f; V2 G; m$ n! V! u
Code:
8 H+ O4 W. m `' M, _1 U: Q* k, |#ifdef __QUGET_SWAP_FIX
6 V+ N! U& d, d! | if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ C' F" x% Z4 m4 h6 V
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());! t v* L% u; T2 h& z
& c) _8 v+ b. _. `& |- c if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
% Q9 Y9 m) k# j. c/ s, w2 W pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );0 H. W; _) `, u( V$ ]' i
5 J! F2 D1 P3 G" w2 o4 F if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! c" l+ ], b- T( @0 f$ D, d pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
1 ]% g5 \. ~4 }5 B5 a5 S* g& W- p$ r! {
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver $ c, a9 G& W% M. q% ]
3 j: z. [$ K; Y+ w8 S$ w5 H" G+ c; Y+ O. S- L ]* h2 ~
|
|