|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked R" P& e8 y" J; P( J! ]- r( V4 d
I posted this because someone kinda posted a youtube thingy about it :O.
8 }; g% N8 E8 ^0 |+ _# h9 I2 _
8 t1 m, Z4 Z G* W4 i1 ?4 TFind this in DPSrv.cpp @ worldserver& Y$ r3 @( {9 q k: t
) b |) ]/ r% }4 ACode:
) \+ L5 B- W3 m* pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); z$ K% |1 e5 a& G' U2 u
{+ c+ k. Y/ {* { w V. w3 a
DWORD nId;( F3 l. Z9 q k
int nPart;
/ ^- a; e1 g6 j! [4 e+ X- `0 ]) s
ar >> nId;; C4 }/ ~: U; n# R. b+ F
ar >> nPart; 3 N" D1 W! m4 W; R
) F* S2 m# S1 r- h, x" R# f if( nPart >= MAX_HUMAN_PARTS ) , Q" v$ x: U* S& c4 |. g, L
return;
* ?* T) W1 X( k- D& {& |6 l* N/ ^6 b" I0 Z
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it0 J, o: S& u% J+ j
) }+ C7 L; L0 H% g
: p% A3 N! w$ ?* G5 r* ]Code:4 L5 r; R7 w- d. g, [' s
#ifdef __QUGET_SWAP_FIX" ?* a J b% t6 n7 n" ^4 P
: ~: K' ?* I% H5 C8 p7 ?
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
# S! E: i8 p2 x0 Q- M4 d pUser->SetHitPoint( pUser->GetMaxHitPoint());2 @% |) Q% P# ?: b- W E. H
; I1 Y" u; h3 P( X
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )+ R& d. q" m \8 p" t
pUser->SetManaPoint( pUser->GetMaxManaPoint() );5 P$ V [ ^# I
' q2 H7 B. F- w! c H. B
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 B) F" k3 x/ H; m pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );+ m# P+ b Y l& X1 E' |7 b
' u" U! |: `5 Q" s#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp; ]2 O; M2 \5 t5 T; q v
and add under
! M$ [" t" w$ ?+ f5 Y
5 h8 b1 _9 i0 N2 }$ Z4 c9 s, uCode:' d3 |$ J( }) W* @
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 c/ Y* T2 e8 M. [3 M {* p5 |! `% f8 Q8 s# o
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 );
) _$ [; j6 K7 U9 S" } }this
# p$ K y: K, ~* x( k5 k! |! i8 M, L
" o, d! s/ x/ w; ?1 h) S; @2 nCode:2 |3 d: P g8 Y8 H5 s5 f
#ifdef __QUGET_SWAP_FIX8 Y# M+ j3 R5 l9 t
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
( z i) [1 Y8 {) Q$ V pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 v7 F* W" L' g: d
2 d, n; l3 m& t$ k6 e9 N, r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )- i& Y0 e6 R% R( Y" t8 U7 S0 g
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) D& }" \1 E# b# q3 k# a6 p$ c
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )$ V% O/ V% W6 n3 P: y
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );. d$ L, W% @/ R0 i
3 Y V1 x; D9 Y+ Z; Y6 s# J+ O#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 a! n' |: X: x( F$ \% W2 G
2 i, D5 c9 d/ E* O: s
( R9 d9 m1 T% s, W- W$ q8 q( { |
|