|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 0 w, E5 K, j# j& h( G% Q) p8 Y u
I posted this because someone kinda posted a youtube thingy about it :O.' g6 f# q8 [4 k/ W4 w
8 [7 ?2 U: h% [5 \1 j/ ]& DFind this in DPSrv.cpp @ worldserver
6 ?! T6 b3 h0 J- q3 f' A: a$ C8 w5 d0 d! y' U: ~' v7 x( N1 ?3 [
Code:$ E3 @4 t9 N( _9 [, s
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
! f. ?$ s2 \1 P2 T' \{, B+ ?# ]6 A9 \( U/ y/ f6 z6 X
DWORD nId;
) X; ?- e' G/ `3 [' [+ g) P int nPart;) }7 g& R0 e3 \: j
|# B/ `. S7 s4 \' M, P
ar >> nId;
- J4 z$ A B/ i3 p; n ar >> nPart;
" W' [% V6 O7 ?+ d1 b# B J
y2 U) b% A" j if( nPart >= MAX_HUMAN_PARTS )
) I) w% A5 M0 g* u6 n$ L3 E& c return;; |9 }( C- a B! ^* C
3 Y: c2 V8 E: \- n
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 U# e s5 q$ i
U+ F0 `$ |1 ^8 T
: `* p, y, L4 L5 e0 Z# K
Code:& C$ \; G* c1 k: ^
#ifdef __QUGET_SWAP_FIX4 n6 w: l0 n' i5 O+ S1 q k
9 ]$ {, d- V7 E
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
~7 q& b# @9 j1 J1 Q- m. H pUser->SetHitPoint( pUser->GetMaxHitPoint());' R5 s( `: W9 Q, N
* ~" f, `/ u+ V% {6 r, g if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
* {9 L5 R3 S5 y' n$ O pUser->SetManaPoint( pUser->GetMaxManaPoint() );
( o, [. R, O p) @' G% g) C/ c5 ~* Y7 b$ `. h4 w
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), J/ d9 w B; W# ?8 o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
9 j D/ \5 a$ m8 P) _& l
( V/ i5 Z/ Z9 D5 t5 C5 q- T2 V/ V#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 t7 f/ ?# B8 u# U4 J5 ^and add under+ A, K. Q4 V" W' T$ i# B
+ Q9 r5 F" ^+ [( s: ]( ZCode:% I: M; D2 k8 a6 B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: s. ?! R9 X% u {: U6 n4 Y) ]+ P o8 H3 ?# J
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 );' d7 Y& `" I3 j* y% I- q
}this
- j8 S7 X1 w, C, F0 [0 w3 E8 j& b9 Z/ y3 ^
Code:
! r, b8 F. }: M( j- b e+ r4 r7 b#ifdef __QUGET_SWAP_FIX. \4 v8 c" t1 X" h. a
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ _) h" [3 C( f6 u f8 O
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());$ A: g% f* H$ w7 L
( c4 f L/ x' x7 \/ a9 V! {. o if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )( ]: B J4 j5 v! Z3 ^" T
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ F+ v& a! z$ R' Z' ~ G" ]
3 D$ H: H: B$ A( h+ Y
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 b+ G1 a w, V3 l* t. e0 x pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );8 U$ Q! W, I" M1 K% K2 l0 d* }/ ^
" ~/ t( [3 V/ c" a/ ]#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver + N/ s+ t/ R3 \. H+ |3 M; K: `: @
7 Z/ m) ]- F9 y- B' `. X# M
4 J; \ d: U0 _& ?& G
|
|