|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* o$ X. b3 Z. L' kI posted this because someone kinda posted a youtube thingy about it :O." B1 S z( y8 u2 P( J; T Z
3 _, ?* J7 X- d( F5 W5 _Find this in DPSrv.cpp @ worldserver
' f8 M& p$ `* I! _' @" L4 K/ ~5 y# J |) N3 |9 P( \# B
Code:* g( u; t) x1 A* N) Z2 B
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
/ y3 d3 Z( c5 ]: S{$ e. Z, L, n( C# {, Y
DWORD nId;! f; ?# @7 L u6 ?/ |2 g( O
int nPart;! |% x8 O8 Y( g* g2 n
9 r& L% D: b/ O2 c3 K2 k1 S$ d
ar >> nId;
5 S; u+ R* o; c3 e) _ ar >> nPart;
6 T0 T7 m# U% A& G$ E2 s
' s& e6 b9 Q: ^ if( nPart >= MAX_HUMAN_PARTS )
% _2 u5 I" d7 ` R- O9 n return;
- B) \5 P2 o9 {( @ D0 F: I1 @# a6 R: N5 T# R
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
2 v/ L8 k$ A# W# z- Z' D7 Q. I1 Y
" ~' g0 |+ _, Y. v, G/ ^9 W% {6 DCode:
4 U$ {- d1 j; L: t- t+ B#ifdef __QUGET_SWAP_FIX' w8 F# N0 Y9 j' B9 }$ ~* ^
: ^ _/ R/ a% J, `' }) L1 f# ?, t8 C
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* h/ h. F2 }8 u3 ?1 L
pUser->SetHitPoint( pUser->GetMaxHitPoint());8 {' |7 W8 v* s6 S
9 x# e3 c. e2 V+ t' U
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )3 M& a& }9 b G1 {8 T6 |8 c
pUser->SetManaPoint( pUser->GetMaxManaPoint() );1 R* F2 q0 z' n( X4 J
5 P/ V0 ~( [/ o' z, M if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
1 N2 y! K5 x+ S) }9 c pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
6 f! g8 Y; ~9 r
0 E1 M) }3 k7 @5 r& G2 j, U#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
5 h/ X0 u( Q0 ^ q F, Jand add under- O0 u5 Q* E4 |7 T& A# l# P
; z5 c7 S9 I1 N4 v( tCode:2 H' I% D9 m% @: c2 Z3 w, a. c
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
7 D+ q7 e" B) @1 ^: N {
( ~' c" _/ 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 ); D& p7 x( g- F
}this
! Y# _* @# _$ F
% I* x* i- a! ], i' S5 p$ YCode:
# X* p n' u, E. ?! ?/ E#ifdef __QUGET_SWAP_FIX3 I2 C- G) h+ M1 b3 J
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
+ a3 `3 k; @0 L4 N3 r; I& } pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());+ N% ?4 C. S7 n& J: {
# u, U0 ~6 r$ o9 d# D if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
; K; P+ G Y+ H0 C: M8 A pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. a5 N* }4 @% W
3 m( h7 E$ w: ?( v7 m* @ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
. X* Y5 A: {3 B: o pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
+ ~. X4 j& I7 H% ?# E
, H! J6 ~/ C* d K, W#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
2 ]+ ]; f2 |8 b3 J
( p; }: w% [) F# t# n" r- ]( d' z. w, J1 f; m( D+ W b
|
|