|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked & P1 D8 h: @( m* s( E
I posted this because someone kinda posted a youtube thingy about it :O.2 I- K8 ` e# J3 l/ ~
6 T; Z- c8 G' Z/ Y+ n
Find this in DPSrv.cpp @ worldserver# [1 |- X6 x3 j% E. V$ G
) a5 i' [( m3 M R7 @Code:
$ ~# T( R7 Z) O0 [( T$ Mvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
5 d O) `) X2 X. u2 Y8 s$ p! }$ r7 R{
, A6 N( `+ M0 d: I M1 x6 v DWORD nId;
2 ?8 Q4 c, T& n$ Y; a& {% n. U int nPart;
/ t/ J9 |' ]3 g( \7 T8 B$ X4 X. |0 ]
ar >> nId;
2 d, X, a! ^/ u- t ar >> nPart; : J, X1 P, @. k# L ]
7 w1 v0 h8 {4 @9 q" |+ t. J if( nPart >= MAX_HUMAN_PARTS )
# m) X+ u2 f' c/ s( K( J# @ return;
) X& n8 D/ ]- |" b0 Q5 k: u2 g; @3 e( Q9 C7 `8 _0 w
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it9 {% Z8 @% z' U7 T
# G0 k, w y" a' m0 N. I2 K4 O [4 a+ q) Q$ h: ^) P9 p
Code:
Z# c" L& V( u" e2 w#ifdef __QUGET_SWAP_FIX
* ^) V3 B6 ~ I* s+ I* P% s' ]# W: K Q7 X' V1 X8 h
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )7 C2 g+ c5 M, G
pUser->SetHitPoint( pUser->GetMaxHitPoint());
! U9 v9 n' i, j4 p' f/ L+ ]* C8 F4 W/ D0 D" }
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )& w$ L, U5 C, S A, o6 \
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
0 Z1 u$ X2 A0 U# _, R+ p$ [' W* C1 \8 H- ]
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
6 Q/ h$ X- a8 f0 Z) K1 Y pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
g3 Q/ C' v7 g. x8 n3 S) B) ?7 F. x3 e1 ^
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
+ z; m2 w: _! j% j. |and add under! D5 s+ L3 i4 @+ R* U
1 F0 I9 r: x; S5 z
Code:
1 F" K4 R+ \1 jif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
1 t% e# J7 ^) b {+ f. u @% B4 U1 m* m6 T! \" 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 );
5 j+ b, v1 x0 V1 s }this
+ O+ F! F3 r) n7 `* X6 ?& ~$ c& k
) X6 C; K3 E7 T9 vCode:
, B& I6 y: a) X0 g6 T# [#ifdef __QUGET_SWAP_FIX$ j) l8 c+ D5 o
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ u/ f' u2 o2 d, C pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
$ H( F1 U1 d4 Z; h* v
' P, q4 N1 x- S& A. j if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
5 m. H: H2 d9 s" T! r$ D8 K! s0 V pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );' p4 `( E/ [2 U6 i, k: q! L
0 Z; ^8 ?( S M9 V D if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )/ f. j* }* u* |( m5 v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
2 x0 ~$ J1 w0 Q( W7 W9 g
1 F( {8 s' k. x# Q, z% J" t Y2 z) @#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver ) [1 h4 Q$ G9 ]9 I" p
3 e& N- d( M4 d) D9 I5 E- B4 ?; N0 M/ Q/ m! f2 z
|
|