|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ! B4 o( k" g" [6 x T
I posted this because someone kinda posted a youtube thingy about it :O.
6 v* h9 Y: d6 F/ v% F) `. A, O
& z0 h" J0 W; \, l8 K3 dFind this in DPSrv.cpp @ worldserver' c* n$ @# _. _# C- _6 c- j9 g
" s A/ X7 q& M, r
Code:+ m: ?# @, }9 I: C
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
# G0 M. A7 C/ o. h2 m{
( j; ]1 r$ q* j- ?( O: z8 i8 { DWORD nId;4 ]( J& r4 S1 Y& a
int nPart;0 A0 [9 \. A7 T8 e3 x
. M5 s( f& M% p6 l C
ar >> nId;4 S" |8 B4 i6 F7 H5 E
ar >> nPart; ! y3 O/ V8 P# z( f. [4 v5 C) g7 E
' u* H( C3 E; W0 X( Q( R5 P" {
if( nPart >= MAX_HUMAN_PARTS ) 1 Q/ e5 Y) z- G9 P
return;9 v7 V! b* f: a1 @1 `5 j" ^
" \, o& b( c+ p2 M, V CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it% ~' V* \. W$ V& F7 J& i
1 G% W6 H7 T. ?. d* R3 W( r4 }7 }
' ?: U3 F# K4 I; R0 f) c3 VCode:
1 K6 e9 l, n' }+ R T#ifdef __QUGET_SWAP_FIX7 s8 L8 b0 n- l E) G* K( x( b
; Q; @6 |$ q. i U D
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )' j4 K8 ~' K) ^+ k( `
pUser->SetHitPoint( pUser->GetMaxHitPoint());- f3 f0 K( C$ B/ h8 S7 x1 v
7 o# b: Z: E' z @, J* j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 q; ?$ S! G- M7 @1 _0 k) t pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 U6 m# B/ L6 W: D: h2 n) P6 [4 o$ h6 F# W; C# X
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% [; G& Y+ g+ t' h5 u
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );" Q# F2 m; l. E3 T7 O3 j
1 f% I( c1 O: y& A ^#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp7 O1 {- g- V A. s7 b
and add under
7 R+ U0 c }9 t! l* ~) s, h0 J" O+ C/ Y" t4 ?+ q% u+ b3 ^
Code:. n& t: x0 g3 N% x
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 ?( [3 ]! ~0 f3 i {: H( g: T( B. D
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 );
5 V1 y* T" C% T+ ^. E4 e }this+ @8 H% O% E; }& C1 c) k
( S8 J9 p$ N/ M" c: `
Code:
* D+ | L( T. G1 m9 C; u( y) l#ifdef __QUGET_SWAP_FIX' s, ~! Z' P. @4 j% U
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
; F+ F+ j; k; a$ E pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());/ r" n9 n* O& N* d
; I5 S$ D" O. Z, ~2 V% ^3 M) r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
) I0 \# J3 z; s$ ~; V: w pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# V. x6 k- |5 }( R, |, R
0 j. f$ U0 d. F& n
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )5 r' |* }6 m* e) F6 {
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, ]: m8 R* c9 C. }) L& s- v
1 `7 j$ D! O, Z, H8 H. E8 J( B; o( n#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 9 L+ O+ ?2 {' F4 \
( D# c8 k- Q) b+ q- \$ g
" K* q5 l' D" |* x% D, _: R4 S
|
|