|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 8 d1 \# d) y) s& P+ R4 P6 o% d# L/ _% D
I posted this because someone kinda posted a youtube thingy about it :O.6 O" D* T# b/ I. o0 u/ `' V3 K
; L8 T% Y" z, M* r. @, r: m) _
Find this in DPSrv.cpp @ worldserver
3 G, k* m0 ^( ~, X! n+ _+ }
( k) U8 p: p) u* p. QCode:1 o3 Y1 z; e2 \# x( o" V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )) b {0 g) B& }+ I% Z8 a9 l
{
& e# c! @9 J# v8 j c7 { U0 W* A DWORD nId;/ U1 y1 A1 s4 k/ P/ z4 a, k) y
int nPart;
% y0 v- G# _2 B; a/ g
; ]- {! x. |% H( c- s! l8 i ar >> nId;
7 D7 i/ `+ i: l; J% D ar >> nPart;
- J6 `9 J' F+ z* U/ k/ A6 M, U
0 } b9 V0 p$ W( U- O( L if( nPart >= MAX_HUMAN_PARTS )
/ v9 F0 Y' c7 c7 c2 i return;
1 C J5 X, V& G2 ]: R8 w [
8 V/ K# z1 g0 Q/ K) h) P0 O CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 A" F m) }$ ~, Y( j/ f, T
1 M- d( S- T' O
6 ~, n2 d# r8 K3 l: G0 a2 Y% GCode:
: W) M* W: G# E1 `1 u#ifdef __QUGET_SWAP_FIX
$ t& Z; w' ~6 f+ `4 L* f I. g
2 d$ p. a, h; q! u if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): z) f2 ]3 C8 f* ]3 B. T6 ?
pUser->SetHitPoint( pUser->GetMaxHitPoint());7 i% b7 g- n B2 S# H2 V% r
8 D! \5 `0 N5 ^# W$ D: Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
7 t( P. m, _, C S" Q. w" j( D pUser->SetManaPoint( pUser->GetMaxManaPoint() );) r+ C( L8 u9 b4 N% Q
2 G& s) Q3 b) Q5 D if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )6 ?$ j- T/ \( g2 J6 P/ l, I
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );2 {: L6 l# B4 T: P. K- ~
+ \$ G2 @4 j* L#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp @2 O) X* T R; B7 \# I# t5 ~ t9 p
and add under
! e. H) o% c1 W1 Y* Z
% m- r3 u1 U K: h2 u0 KCode:/ l9 _* E2 u% T1 d# I* G
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% L0 q0 B9 F: f+ b! {
{" Y [$ g D* a, x1 E S( L7 ~
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 }: h# H+ }5 w- M9 \8 Z! K' z4 z }this
* _: k: e$ S* d8 X6 j
$ Y5 ~5 k4 D: B2 dCode:
# y/ b! ]* g, V+ i3 |# I/ _#ifdef __QUGET_SWAP_FIX; ^! z/ {! o" K6 M
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )- I7 s4 @8 r1 ~$ l3 V4 G
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
% V- }+ `. a( R! o8 G
7 C8 A4 r' P& W5 [" A! B5 S: P8 _ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
3 l, ~( b. a2 }$ u4 Y pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() ); q3 C ^, g# H0 q( m; R
' k, q Z% I4 P, }+ B+ _
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )& C$ c1 B& w+ \( G, i g
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
7 S/ T% n- t7 t: A
) x. q$ d2 t+ y& _#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 5 ]6 V9 V+ i1 y& O) @
* s. P3 E1 u* ~1 H% u6 @4 ?8 G4 h
! C5 ?2 i4 B/ g# F( j: s |
|