|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 3 n9 G5 x! f+ k: t4 @6 Z5 W
I posted this because someone kinda posted a youtube thingy about it :O.; Z. C; N: v; }+ N( B
' B4 U4 Y3 B. |* u" tFind this in DPSrv.cpp @ worldserver h; B6 V- q) G7 D+ f. i
+ h0 f* j4 X8 N$ f- ?! g4 R% ^
Code:
9 u/ a6 L% f: D4 Vvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
; @% V* H0 K. a+ A. R; ]{1 M) L- n- H' `
DWORD nId;
1 V3 ?# {7 y9 W# ~5 @6 y int nPart;
J& x* ], D! E2 D" ^' |' \7 P X2 n
ar >> nId;
. K) q% A, n/ P, v/ [ ar >> nPart;
" u7 k( W2 m. k 4 B0 K- T4 q: q
if( nPart >= MAX_HUMAN_PARTS ) ! d" d' t4 M6 Z. j9 z4 _" a/ l
return;
; K$ u/ Z( s( H1 z% G
4 x+ ~7 s, Z7 Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ z9 S0 o' E- Y
% C p, x5 g- b) @0 b2 b. y- u4 W
Code:
0 s* @- l& C; ~) x, P, Z& B4 L#ifdef __QUGET_SWAP_FIX
g/ `1 _* K& ]* X5 y9 u8 `
, B& {5 Z" h% Y L; B0 G if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
/ V) f" Z d- h% J+ d6 s; I pUser->SetHitPoint( pUser->GetMaxHitPoint());
9 V: V/ Y& p, C( e! J+ A5 c) D$ k, \* D o0 o, a5 P
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )9 b- b4 x/ B3 a2 K {
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
* s/ C1 D, c: Q5 _; ^4 s
8 T: U: E) y& ^7 ~% W/ J if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
( H0 H- r6 M$ B* s; i pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );* t, p O$ Y! W: q) L- } Y
2 K: \5 T4 q" W$ p5 l( t' `; Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp3 j6 ` ]9 E- ^) z
and add under" \0 G, o8 ^" B5 Y( g: C
7 A" H3 ~! R+ `1 e( M7 V2 |4 `4 v5 D
Code:+ n2 Z' j8 Q7 Z% D0 z; \
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: H; k* V$ b4 ~8 Q) {& Y- _ {
' m& n- b0 T8 K5 j( `9 C 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 );0 m- g" M- v- p1 l/ y) ~
}this
0 `5 z# \8 h- _7 K* P% t" b) V
- D# D: t/ M: }5 }$ |Code:! u- {) e: _9 F' a: F# S* S
#ifdef __QUGET_SWAP_FIX& Q1 I7 q- e1 H% S$ o
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )+ ]+ L% A5 c1 w. a
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' `2 E! O5 O9 C3 y4 h9 n
; X9 _: J4 {4 {" l( \; C+ l% ]" b# s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
Q) H5 N6 V2 [8 i+ x" }5 p pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 S6 X) a9 P7 d4 W
; l1 q, h+ u/ G6 M. D8 H if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
5 @' g4 f/ v) }" ~4 [ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; F7 ~2 S* p3 H! x
) @1 |2 f/ ~/ k: K7 C#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
' D; x; |% o2 j% h, j- l# J
' y/ |8 I* i4 k0 G; A& R. Z$ B4 q) Q
|
|