|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked K! o# y) H0 F! N/ L9 q, _2 Y4 S
I posted this because someone kinda posted a youtube thingy about it :O.; Q' o0 z" C1 F
3 H/ x. ^* Z5 i6 v4 z; S# z
Find this in DPSrv.cpp @ worldserver& Z$ r, `% C3 ^3 s
: f& l$ f% F) N# x/ a$ z, t- ~. h
Code:
3 w& a7 n A$ q" g, W4 Ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
% c( i- }$ S, d& X$ h{
9 s( f# K* c( P7 O6 d- T" F$ e DWORD nId;, [; Y' i+ H% t! ~* H8 C
int nPart;
) R9 f. ~) V( h' d# S$ D4 W, `9 Q; T
ar >> nId;% w* |% C6 C& y, f% Z0 I
ar >> nPart;
' f/ F3 Q8 `9 [7 D$ l" t
- v6 d5 e8 Y9 x, E; u+ @7 x8 s; [! { if( nPart >= MAX_HUMAN_PARTS )
0 {' Z+ @) H( [" |6 E# u* M8 V: b# H. v return;
4 H( f z. i: Y s0 y
/ \) D6 G/ v: T, U2 D( ^ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it- q, A- D# v- W8 [
[0 {0 R& R8 Z5 n* o( V
/ H% V5 P4 Z; p$ }* h) M2 H$ YCode:
1 \3 y! J) H8 Q$ B0 }3 Y#ifdef __QUGET_SWAP_FIX5 y- V* _' x5 u9 @
" l0 L$ J, f0 T6 `2 s
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )! ~4 t+ J' b( r8 r7 c0 F) x* T' k
pUser->SetHitPoint( pUser->GetMaxHitPoint());$ [( w( t" W+ s( I) F( j$ N
6 R/ F" _/ v& D6 @8 n
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
4 p9 l" R0 ~& g6 L. X pUser->SetManaPoint( pUser->GetMaxManaPoint() );
6 L; F* E0 a! E" V# q- y! N0 l& r
$ y6 s% h0 q p if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
/ p7 V7 \ U/ N% v7 b pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
* Y( Q% }" m }' I2 c- ^* p1 e' L t% E* |/ Q8 I2 q
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 B/ _: X1 \; r3 w+ Y5 L }
and add under w. t" h) d4 a9 O$ G
* t& P& n) n' v$ x
Code:
! |3 n$ d6 I5 S6 ]+ S7 ~( S u: E% ~if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )* A5 X7 e8 \# c+ @* @- {
{. L4 r6 d" M- R( F) F) {& w7 z
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 D' `* C2 X# {. d }this: m0 M: S2 J+ G& p( r2 f& E, l
6 N, }& P9 h" e% m& L
Code:/ d; c0 e* a& {7 k* |
#ifdef __QUGET_SWAP_FIX7 P9 V% T7 v$ y/ y x; }+ Y7 G
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
" _7 u: n/ L+ l. [0 \ pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());& Z) w: i8 g1 a* @) G
3 C5 Q5 ]" d |
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( A' M) X0 G( f r5 X
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
/ e" q8 V: F! w* B: E: T5 B0 B c% F
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )( R0 n! @. w$ u, N
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ V7 x9 x3 ^! w
1 X! ~. e- E( |9 ?; I- ^
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver , N& \$ J2 F# N4 w+ D$ K( l
0 S5 }9 s% @5 l
8 o p# _: U/ i @' t |
|