|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked ; O8 b: k8 t: n& j
I posted this because someone kinda posted a youtube thingy about it :O.5 L2 B. f, K. y$ x. R
5 ]3 a( w5 v5 x5 A
Find this in DPSrv.cpp @ worldserver5 I( m7 k, k. U0 K- [- d
1 U% j) |# u; ]; H2 M. LCode:
: U# |6 w- ~/ q; }$ c9 }& wvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: u$ V* U) E# }# M. P{
! Z; I9 F9 {9 a% N DWORD nId;
" H) p( a9 a6 r7 { int nPart;6 N1 y e0 }0 n0 Q! X; i; E2 \5 _
6 G: v, F" ^" _* ]6 ~ ar >> nId; T i$ i# D" l0 N9 T7 V
ar >> nPart;
+ M5 o$ J- B& A* J3 u8 }, p
$ S$ P0 R) g6 z6 q: h, X9 o# F! Q if( nPart >= MAX_HUMAN_PARTS ) " \/ p8 F3 G' D! J. [/ b) P: B
return;8 a, s- Y$ P8 G( W
$ j! N" e- q1 J4 B' I CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 v& ~0 J# a6 W I ^" P1 k3 ~7 w* D0 t) o5 n& D; n, S t
0 l6 w- e: G4 e1 Y6 _
Code:
: ]6 S* X2 g) q, b/ @5 S) a! Z#ifdef __QUGET_SWAP_FIX# x5 K+ f9 g! n1 U' M7 Q" [
0 W" G3 L7 Q9 p8 ]* X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )+ c u+ Q f# c. ~; K
pUser->SetHitPoint( pUser->GetMaxHitPoint());* B5 t! E: s) \$ u$ o6 s5 G
6 E: k0 x# ^4 g' ?' ]+ x; g
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 q7 O$ ?* K3 Z0 [- ^ pUser->SetManaPoint( pUser->GetMaxManaPoint() );
. f t$ }; s# s8 ~
* e( m/ P" f* ?4 j, o: q if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% _$ g Z! c. [8 T8 N
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( M% C5 {! e8 `% d) t* E5 Q
" ^3 Q0 W/ X$ Y
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp: d3 m/ _6 J* ?2 w# ^# D
and add under
7 I" {5 Z, M" R/ C# ^
) J, y" B( z3 n8 oCode:
& z+ R5 J4 {. u; w; K8 ^) z% z+ iif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
: D) G. Q: u$ l9 Y% H {% m# D; _$ G- V" {3 B
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 );
/ Y: T' p9 N- K6 Z+ o' w$ o4 q } }this% V1 L# x9 d1 g- }! t, l
1 v& W+ l6 Y; @' J: l' f+ g
Code:
# c* {2 ^- X0 b2 ?$ E4 n#ifdef __QUGET_SWAP_FIX
% @# f- b; c1 N; f) u if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( |7 L/ K$ Y6 T) Y$ C
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());4 M6 e" S: Y B$ n) A9 ] |
" e0 ~! S }; B8 E2 X
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )9 k' V! V3 J+ A& U4 x
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
9 P# Q( c) ]( ]) M* o$ v; W
: J$ u% J' j% D2 m7 v if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
: g" B* i( J3 v5 k( C7 K1 _ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
, H+ P5 w( S0 X3 C# {& a- v: [5 u' b- O7 n. e5 {1 W$ b) }- Y- L0 w
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
0 L1 o6 a! ~2 O' H6 J
9 m* l, `8 j! ?4 L8 n# J, C Y
9 Z9 f7 ]( {/ R" T |
|