|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 5 {& `1 |) d/ G; r+ Q, H* T
I posted this because someone kinda posted a youtube thingy about it :O.
7 L/ M0 m6 U) o0 c t( [& z, Q, M0 Z( h) E
Find this in DPSrv.cpp @ worldserver
) i0 o! T5 W' P0 E" I1 s
& w2 T( p' b t# u \ {) y( g5 sCode:
: }) ?8 O5 ^2 K) Y* ivoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ): o8 @* k+ {& L* K/ ~" H7 h4 m
{+ o! X9 h+ r) E4 v, d y3 E" K; b
DWORD nId;
+ b/ U6 Z) }/ f, k; ]! I int nPart;
' @2 p2 B" ~! |# Y+ J# B0 X+ ?8 _
ar >> nId;7 ^1 G& M& c# `/ q9 P' h0 P2 J+ w
ar >> nPart; ' _. }5 I' E# F1 F" V8 h4 X; V/ y; N" v
+ c* q# p$ d" O, o E if( nPart >= MAX_HUMAN_PARTS )
% M2 \) v5 q0 k6 W return;- K+ Q& F: V' D1 H' a* b1 S
4 L' ^7 w# A& y( M
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
& ~7 Y) @% K- b# v' ]9 x$ Q- Q/ e d% x
+ {7 {7 p7 ~" u, ]/ L2 e0 ~7 yCode:* R' Q" p; V |9 U* c
#ifdef __QUGET_SWAP_FIX. ^, K5 G* ]4 J/ Y
) I3 A! D6 @) J6 o* }
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 }; U7 U6 P5 ] Y/ | pUser->SetHitPoint( pUser->GetMaxHitPoint());
' @+ x4 A( c; [0 P
) U- `2 o) X C1 C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )0 @$ H) A9 K. n
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
! Q) N% f& [% s) E5 w9 y8 ]( `- Z3 R E. e6 C% d0 I
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 v& `! E% L3 E7 ?1 b. i pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );7 C. ]" {- W5 b, A. G
) k$ x5 \; h! D0 G
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
3 ^8 [' Z. U+ r8 r) band add under
: x" V7 t. L( i' V* a
1 u+ C6 @$ n$ \# FCode:8 U3 [0 g8 y% W& O
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )/ X! {, e( }$ {( X# m! H! H% L0 b
{6 k- b7 Y3 N% L- Q/ [5 M
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 );
* g$ b7 ]* N- b, q; ^ }this
" n5 i" L. Q! x6 I' K6 e7 U( X6 L
5 m' m- J/ @2 xCode:
- }8 f0 C5 E$ A- e#ifdef __QUGET_SWAP_FIX
5 @& k# d3 Z8 C8 M$ [ if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
% |8 o& H' h" d4 F: S6 W1 g pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());8 S: }, `$ _7 [: q- g& n
! ^: W/ V! O! g2 b/ Z6 _
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )" M. V H! s4 `. ?1 w
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* |& l. {9 _' D2 n2 M7 _
* R7 |7 U1 Q, `+ B4 W8 t# @ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
/ }, S* ~7 E \ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );/ a: x/ R8 }3 I! p
4 F, ~% b9 {8 ?7 d) y8 Q0 W: }. ~
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 8 `7 w A/ ?1 O6 B
# D" G V$ a0 w# I( m# }, O8 f* _, n3 @
|
|