|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked I/ q/ y' F0 Z# f
I posted this because someone kinda posted a youtube thingy about it :O.
# B7 B; w8 b7 X& C* y5 p3 I% d$ W$ }7 D9 U' k7 S( m
Find this in DPSrv.cpp @ worldserver
/ q: k) r. @, u& O5 s& x- A( X
& D& |! K. N) ]2 y SCode:0 P5 H% ^1 T# U v5 d" O% y
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )8 T- d( h- A8 l+ B4 t- s* @
{6 \8 ~ S) {/ U0 n. j- F$ q# o2 y
DWORD nId;
/ U; G' K2 S# g. M4 q( D I# Z int nPart;7 f. I+ T3 R# [) d7 P0 r" e @
+ A8 u$ f8 c0 P& n; Y6 R
ar >> nId;) D: v- U& P1 w0 W+ y4 ^
ar >> nPart;
( v- R C+ U- U+ T5 [ 6 G, m! {3 T7 q5 J( @! [
if( nPart >= MAX_HUMAN_PARTS ) 2 p3 s- M% Q7 j' k$ i: u
return;
% w2 ^7 Q# G- s. D# ?
- p. t6 y7 Q/ |3 y2 d CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
, c( t* S* C' S0 F' y* e2 [: y9 u1 I, C4 R
" @3 r% ?* M$ j- hCode:
# [2 Z' U- r: J+ z/ q#ifdef __QUGET_SWAP_FIX8 C* h/ i( O# Q" s+ e( f7 k5 J; C
/ W6 M" U4 E7 ~# w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& r% Q+ _) d- z3 y pUser->SetHitPoint( pUser->GetMaxHitPoint());9 S" T) h/ J) @# P( I0 F9 `$ M: y4 p
) M* ~0 ~9 h: e, R1 ` if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
4 S* j+ ^/ H& @0 p' K- g8 d( p9 S pUser->SetManaPoint( pUser->GetMaxManaPoint() );
+ ^7 y# l+ m1 E' M0 _+ h0 T0 g4 x3 j( }6 Y
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )- z. M# o% n5 i& ~+ u- `
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
% d4 [+ |- \) H* h% s- n- C
8 W! d$ a6 E! x3 @. g#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
, g! e9 E+ o; S9 Y) l( k" Zand add under) e+ B2 K2 t% S1 D. J
* H) R0 g9 K5 S7 J. c. xCode:9 _$ B2 b- r7 q$ p3 S( w2 |5 o- R# N
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 i6 @2 A; Q+ ^' O6 G3 o {
: G# b6 X0 I e: k' R 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 );6 L1 A. Y+ l) g& w5 @* q* `
}this6 u7 s: U! }& B! k6 t
, [+ ~6 f1 z7 o. e( L& qCode: _" c: C2 J0 U: R: k
#ifdef __QUGET_SWAP_FIX6 N8 m* g2 ^! A# E+ ]
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ), c b+ _' t \
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
0 [ _( E+ s+ T& O6 \) g0 [( f3 j, l" s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
+ g8 p8 [! h3 a2 z pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );4 J/ a1 s0 A6 V+ t, N I
~9 F' j/ N' t
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
! w8 X5 @* A3 f: }0 w pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
% i8 u& a$ s* e: {
% C# r4 R. m( }, t* [+ z5 E#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
, X2 W0 Q7 Q2 R' G R! B) p
' \9 x- e! Q8 [! s" D' f
+ e4 u. M* J, S+ Y/ Q: i |
|