|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
. U3 Y' i- n7 U' BI posted this because someone kinda posted a youtube thingy about it :O.- S' s; H% ~8 k
) e! L; }6 b2 \2 e# A9 d( x
Find this in DPSrv.cpp @ worldserver' L/ `# p8 K) p. O& r) I3 N' }+ d
7 y5 U- r& y# BCode:/ j. G. V; h |3 ^4 t9 V
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )5 w. R* q6 f: ]% k' ?
{
( W. c5 ^: b4 k4 \5 ]- f* a DWORD nId;: r; T" y* P2 }5 f
int nPart;4 q) ^ D7 w- a
' I& S9 h0 V* N4 a* c7 k4 y ar >> nId;
& J4 r" X. R6 p$ B+ F' f, T ar >> nPart; ) E4 M/ ]2 z; l1 D0 I1 H' w- T
% c& [% i$ h: w
if( nPart >= MAX_HUMAN_PARTS ) ( n3 U1 h8 Q) T+ ], ]$ U
return;
3 S% X) L9 J1 ^
' M! G! ^) n- f) e" } CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it( g/ `1 X! D" X- v/ V
1 V" S8 l9 Y: M8 L1 H* s2 k. r# ?2 S- T3 N) h
Code:( o# j* a6 K2 r
#ifdef __QUGET_SWAP_FIX6 |- U( Q( ~$ _
+ e- R' @7 V# G" N. m' Y$ C if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, ^& j# t4 j- \ pUser->SetHitPoint( pUser->GetMaxHitPoint());
. ~( K4 \/ F8 d: X5 h9 n1 c/ y% J1 R* Y
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
; g6 Y) Q8 r+ y pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 g1 U) H/ O2 M) s7 I9 `7 z! n# @( x
1 r& j/ K! o* z3 \, Z if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )! ^1 y2 ~. r" z( P/ L% r
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
; O- ]' q2 e9 X/ F& X* I0 p; k$ i; [; N2 ~. |: ?. i2 M8 r
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
# q7 s+ t7 v' ^/ z& K/ h$ S) ?and add under
' ~2 `2 V+ |7 C0 J9 L/ ]
* t8 U W0 q" |( O& a) yCode:' O* }' _% R0 r0 I) l& w
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel ) q* w: M' h7 h8 S
{
W! k$ Q- i' y ~, 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 );. Q/ W7 d, l7 g' c8 _/ W; z5 q
}this
7 I$ X% w- d* q* s& U3 d0 ~
' ]1 N/ x/ ]% \# r. {. MCode:' E" c9 d1 B( |
#ifdef __QUGET_SWAP_FIX
' Y* j$ s4 y) j$ X- [$ W% n0 [& K if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
3 r& F- W* x' ~# k6 ? pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 u7 F; l+ o1 j! X
$ v8 ]9 v8 l" j& `2 r if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )+ ^% p$ t0 Q/ {# m/ h
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );/ \" J' ?- i5 Z4 n# w
$ p% h; ~( d3 g* C: A
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )# N* d; w2 [, a3 s) \
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );; R) z0 y% [0 a# I$ q0 G! V z
8 D( W( C/ U; F" f
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
" w) S0 S5 G( w8 p- b5 Y9 z/ ]5 W P2 T0 c
2 p' f+ C" y8 g& G! D. e% C; V |
|