|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked : }1 C" |. Q/ M2 [
I posted this because someone kinda posted a youtube thingy about it :O.2 V, _6 H' I/ B! q
7 G/ r! f8 x9 Z
Find this in DPSrv.cpp @ worldserver1 y0 m3 w. d" C4 ^- i
& T- k6 I% Q: X5 z" z2 [4 X! p, L& z
Code:* D! |; q$ z, ?2 D
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )4 E( Q7 I3 R7 \1 @* \
{
0 w7 J6 o) S% F DWORD nId;
4 ~# W4 I8 Z, B3 X1 w, Z% ?. d int nPart;% P6 F9 Z% e6 i# E
6 l" K* a* Y3 S% k+ Z4 Y
ar >> nId;6 ?( ~& U0 Z1 d1 a- u0 I+ p- U9 [
ar >> nPart;
% A8 v# P4 a3 b) G& }
. N4 S% {. Z8 T6 Q2 m: \# }, S" I if( nPart >= MAX_HUMAN_PARTS ) ! M+ ]+ d+ Z3 [7 b# L c
return;
; K; l6 F) D2 w: h( |0 o: I0 v
- E/ t$ _3 ^) q( ?' Q9 z5 p* D, \ CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it$ f) B E; o l4 r2 k6 }5 C9 K
, q% ?& }- A" H9 K6 B" s/ t9 Q4 W0 @7 u$ H( P
Code:
' \6 R' Q$ U) R1 P$ f8 c#ifdef __QUGET_SWAP_FIX
0 v' s9 N3 B) O* i- ~0 H1 C7 |/ ]& F1 D
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
2 K) C0 A7 R! \2 N _( @ pUser->SetHitPoint( pUser->GetMaxHitPoint());5 C0 q) Y. h- {+ W" D' ^) U" }& }
a( r- s0 d8 K
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). b7 D9 l* x! ^% P* e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
8 m2 B, y0 I' V7 Q: g3 V; b9 l Z7 J' B8 } d* O4 d
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( p* H! ~- Y2 E5 e T: e5 d9 X pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
1 y6 ?: z/ ~+ U- t& t) r7 `. G" X3 q! K7 T9 G S' \; E( s
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
( ], S0 U/ W3 Land add under% M0 g* b$ u+ f% u0 ?8 E
2 h/ u+ \/ W4 |2 R; n1 fCode:$ Z0 O6 L2 B( R- d- B
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )( j9 o |8 ?# R* A
{: v# b0 |* t5 ]# |3 z* Y5 w- \
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 );: O1 w a2 O5 V y+ [# x" N8 h
}this1 M5 s, J0 i0 j5 z
8 U0 }- O9 G( ?Code:
9 s7 e6 A, ~! u5 d2 Z#ifdef __QUGET_SWAP_FIX
4 f& ~0 F7 Y7 \. y0 H! r& l3 Y& R if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
6 e) X8 z, Y9 { pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());0 @; a7 p7 x4 ^, s6 z& w
" l5 Y( L; q d if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 `/ I2 V7 c- o$ X+ I pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );2 B6 Z2 Y) S) s8 O# _% J" P& P0 t5 Q% \- K7 C
* c. I2 B, ~# P" o: M3 i if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )' x& {( ~4 u% u9 d2 V* Q, D
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
3 `" C+ @9 {! b) E+ d# ?% Q
$ k/ m6 E% d% X8 _2 q% [$ E3 r#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 N- M! M, K# C
+ [5 @) J2 z; E+ F d8 g. @. J, g9 z7 p+ } ?* O b5 c6 h
|
|