|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! y: I8 T' X6 ?# m& E
I posted this because someone kinda posted a youtube thingy about it :O.
b7 G- c& m& j$ p" j1 ]. z( P J8 V) Y/ n
Find this in DPSrv.cpp @ worldserver! c' a6 y% a1 z4 E' A& c& b& l3 l
% M6 O" o# _0 N# B8 GCode:7 w; O5 P1 I6 f i% d2 N8 ?
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )% A3 f' F% {5 |* b! E
{( p5 y& g1 D) _: ]) h% h7 D+ l m
DWORD nId;
! h; z5 F' d7 a/ I, t% ~' S int nPart;
1 d. }8 p4 o: ~
4 u7 Z9 c5 Y: G( _' T ar >> nId;
* q, v0 n3 D# ~1 ]# R: q$ c2 { ar >> nPart; 7 G+ u; Z+ {. {- W
# Z* [5 ]7 a W# Z S1 N
if( nPart >= MAX_HUMAN_PARTS )
+ I' ~& x; K( F! F- D G' \8 d return;
. ]1 h, A, ^% z: b4 H. y) ?9 m% k- H3 b7 m* ?2 f: Z! i
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( {* e* \6 B; W0 N1 k+ `( `0 f# }
3 ^) }1 k" @+ A+ F$ G! I
6 T0 X! g2 E% w; h( Z0 VCode:
* g/ v& i+ H8 _#ifdef __QUGET_SWAP_FIX
0 d% Z6 r- F' I0 F; _; W. V0 H9 V6 r+ i* ]
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 J; B- d8 _/ v, w4 p! \$ a
pUser->SetHitPoint( pUser->GetMaxHitPoint());
/ w, Z6 a! I1 q9 R" K8 I& |: F- I1 G0 Q3 d1 @6 L/ z
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )% o% U* j7 n+ a5 a
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
, [( M( k' Y/ [$ C4 A+ g9 S# b' R) b* X4 K f% t( R9 Q' k6 d6 O& x) q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )4 B+ T( ~: m6 y/ a6 Y) O
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );, J7 V) ?( |1 _8 y2 z; V/ ~
& Y% w/ G/ [. e; Q: @3 h; D" d4 i2 }
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; E0 b- k: D3 o2 P% B
and add under' j, ~( O, i! m6 @7 K r
& T' y4 @2 a( [7 SCode:6 d+ Q9 Y8 z2 C5 M
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 X1 d6 Z5 ~/ z0 E: J {5 L4 J5 y/ v" O. {' s
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 );% I$ k y/ q( W* \6 m r$ ^# O3 w
}this
( s+ ~( r6 o/ U* A H' w: Y" e' j2 H$ [% J8 Q
Code:) [- e+ n) G; Z
#ifdef __QUGET_SWAP_FIX! y: M8 m d- E) _* P
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ) C4 O! k( o8 F' s w% K3 P
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());* Z9 Z6 I6 H( \) n
e) ^7 m0 {: _% M/ W
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
, Q+ V# ?6 x' P: {; s pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* b( V. v& P9 ?- y9 b2 S5 y
* ]1 h: i9 o& k
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )+ C C& g# ?) H( X+ @7 {
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 d. h2 u. p. ?0 h0 |
0 E9 A3 {' N& y5 K, `: m#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
; Y) l! M' D0 q8 j, F4 {) k2 X' ~$ A3 k, B* R1 p6 i: T+ W* h
3 \. j$ @2 T0 f |
|