|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ A9 H' s: |. B4 `& e- @5 J/ hI posted this because someone kinda posted a youtube thingy about it :O.
; b" j' j! u7 |# G1 ^& I S+ y
2 ]: m4 Q$ o- P0 ]Find this in DPSrv.cpp @ worldserver
1 U& a2 c, `0 S' s# F% a: A6 u% z1 ?) n
Code:
3 v8 g$ K2 X8 S/ x rvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 e/ d8 E h* y) m/ t{. E* n3 E" b# m7 c/ F1 C8 b
DWORD nId;. s2 h( a: n' v5 J7 W" L9 u
int nPart; w0 k( ^. b$ E' r3 ]0 Z/ t9 X( B
8 L7 Y+ l5 `9 W' ?- k ar >> nId;6 V2 |: Y+ a7 ] }! e. T. D V
ar >> nPart;
6 v- J* j: D: X8 q4 @" Z, R5 h7 S ; n9 _3 ]2 X4 V$ |& p4 E
if( nPart >= MAX_HUMAN_PARTS )
" u8 }( E6 X9 G- H3 L3 d return;
! D+ {0 [* P1 K( d
6 k& D& q5 ?& N7 N CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( D1 K+ V9 h# ]) B9 b! B4 ` I' B& h: N7 d
6 I9 |. K. A. x0 P3 D
Code:
' J5 ?8 G1 x b: S- ~+ o: o#ifdef __QUGET_SWAP_FIX% o+ k/ o0 R: q* W$ s! N; O. K
9 {. a7 V; E \: S* m( ] if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )8 J1 t9 I7 ~6 w9 V
pUser->SetHitPoint( pUser->GetMaxHitPoint());
8 ~) t1 _# }" y4 F: Q
8 e# M. h' A5 G4 { if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 I6 v- `$ P, v) s6 { pUser->SetManaPoint( pUser->GetMaxManaPoint() );
& L1 v' L) q) }6 Y
' n& e, R5 g: C( A/ J+ u; B if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
2 Y6 k2 R# s1 I; Y, t4 W) k3 P7 O pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
5 \+ i" c# X8 Q4 e+ X0 b" q; R, m: y2 k5 N
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
: ^. Z. m, k2 w8 l7 u. i4 `and add under
$ |4 D4 K& X3 b8 L, V
. T) w! e1 ]( K, j! ICode:
/ x. H# j( P9 ?3 @; V/ Aif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )4 d5 [ ?6 m% E, r0 Y! {/ I
{4 K" m6 @5 I6 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 );
( v u/ e2 q2 d0 U5 i+ p- A }this1 t1 B2 u5 y: k* ^; l4 N
y7 ^! S( _/ N6 a% K1 s5 l" _Code:& t# s5 p1 G/ w: t5 M- g
#ifdef __QUGET_SWAP_FIX. ~: U- _( R8 l* U7 J- k
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
! l! X4 k: |( C, b pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());' j; O" ^! V+ h0 g* j1 a2 ~! e
+ x) `& q2 f8 |: |- e! Z% g
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
. V+ U% `/ I- o2 f4 d pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );5 x2 V$ |7 U7 _4 H& c8 A3 D0 Z
2 s: [* k$ P- A, M
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 p: a" S! a! H* Y- _6 S: M) w pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. M) u" W% C7 j5 ]& p
0 x$ Z' `0 i7 a8 [' `# ~) j( Z' u#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
* O; p9 z' x3 \
; K/ e7 K) D; T' o: Q5 A2 [* |: x# \6 n
|
|