|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked . V9 ]$ K: @% t8 l$ k
I posted this because someone kinda posted a youtube thingy about it :O., B5 \' M6 F0 {- a, w
# G L( u2 O9 @+ s7 Z- J% N2 yFind this in DPSrv.cpp @ worldserver! q9 U0 [; ^; x
* h* F* H% }4 X9 _, \Code:
: \7 g$ X4 K9 uvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 q+ F+ b# {1 e{
7 t, C3 T) }; C+ e% D6 ` DWORD nId;+ c0 M* D! e0 m" Z
int nPart;7 Y s7 x2 l6 ~4 R* J9 Y4 }
! W' k6 a! ~9 ^; X- x6 o. H* v ar >> nId;% R9 u& ?! p8 V8 B$ Y
ar >> nPart; - n4 h1 B- m7 ^) R" |
6 K* H1 M! G' d) g4 X
if( nPart >= MAX_HUMAN_PARTS )
! }- C9 u$ ^9 a9 M: o/ T5 R return;. S. p; n" h6 e# T
' `$ m) s1 ~6 Q: N* J( o CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it: U: J; `3 e; ^! v$ J( L
" B. J1 c6 o( x
% z9 \9 u& \5 a, QCode:
8 g2 X0 A# a' ` {+ g$ ~9 S; S#ifdef __QUGET_SWAP_FIX
& O* ?. v1 }% q, G( C# W- o& d6 o1 R' s3 H. E. @ B
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
9 P! l$ k* y8 O9 l3 z" @ pUser->SetHitPoint( pUser->GetMaxHitPoint());
! ^5 a, o) o) @8 U
8 K4 p. n7 M9 I/ e' d$ Y+ f# Q% @6 x* j if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
% _2 O% O7 i: g2 ]" @& m! v: C pUser->SetManaPoint( pUser->GetMaxManaPoint() );) @4 E9 Q' D- d, c5 t
% i; \2 C) q7 L" e: v
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 ^* @2 u0 E, X! Z8 f$ h" H% l4 F Y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );9 x- X) w6 \. X1 ~3 o& @
' ~6 Y# P' I$ {8 }#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
& @& N9 J# _3 s: P0 B8 Z+ R& Kand add under2 |3 F, G1 J2 ^1 [
/ p4 B* }0 \0 Z% q( P* S
Code:% `" ^2 g/ S0 _* k
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
. k. |% o. U7 g {
6 Q* s2 R5 g2 f+ a! l8 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 );2 I- h; x6 A% m n
}this* M7 B& I: n5 A9 C
1 C! k y4 ?9 JCode:( g9 L. B) x& \/ q# Y: [
#ifdef __QUGET_SWAP_FIX4 O& S& v) A. [( p
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
7 `' G' G8 q1 ]/ e pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. Q0 I' c2 M( n: _! |5 ]7 e6 F
8 e5 S" b7 ~. }. i( s' i5 u/ b if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() ); ?, A8 G R2 V: T
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 |0 m5 ?% z1 r/ W5 m3 @; c! g9 Q7 n- ~* v0 X# F9 ]4 \
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 k6 K& u/ U, X, u) E F) ~7 u/ [0 I pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );# T! r2 f6 X9 l B1 V, o! ^
& J5 z6 O7 T6 a% P
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
7 i# Q& k5 u% ]* q0 c& f; e! R+ V. V& q# ?7 J$ ~. c: r
% q1 i4 `5 W) K% \! M |
|