|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked - D6 S1 | v! |+ a' Q
I posted this because someone kinda posted a youtube thingy about it :O.' e" b# N/ |9 K3 z9 T6 ^
! L! `' `; i: n) A9 Z) p1 WFind this in DPSrv.cpp @ worldserver
% t' |+ ?: J, {( ~6 F& u7 t; ]0 ]9 S0 H9 j% |' R
Code:, l# n2 h2 j8 R# g7 E
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
1 @. m1 [5 s% ?: t h- E+ U p{
/ ]) ^0 H/ Z) }6 r! ^6 x DWORD nId;
/ w& s& Y1 T ] D1 I! ` s( c int nPart;
+ U9 G: p+ N( U' _; e1 y" [8 M$ k2 R$ g) L; m7 g
ar >> nId;
- v; M$ }9 y; ?& X1 @ ar >> nPart; + \' P+ Y+ V! V2 Q3 Y, X
* S1 ?1 y: m* G o/ p
if( nPart >= MAX_HUMAN_PARTS ) 8 N( p: |7 d( c! Q c4 U
return;
7 [2 @7 y* G" p) G3 Z
' K5 L0 I) S \. |+ J- _. N/ G CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; A; R6 c& c; I- e- q) F9 w7 _
6 t- W1 D. _2 D$ e2 K9 X0 h
. j8 D: W# z8 Y |# |3 K! ?( d" iCode:
* h4 z- N3 f- E$ h" V#ifdef __QUGET_SWAP_FIX. m& @' ~; t- c
- t) N) U: V* q if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )% z% Q% r# x y0 t E3 i
pUser->SetHitPoint( pUser->GetMaxHitPoint());( l* x& I) a& d* P
. }* l) k: p- j; Q; k" }1 D( e6 v: _ if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ), w4 @+ A$ h0 V1 e. l
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
: a( b+ T, b g; \% @6 l2 H; ^+ l6 _ J# a
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
$ ^2 q1 Z) e2 } pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );; |- W: K! W$ c4 O7 f
& _/ F/ A- U+ N+ d; \
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
" m2 |: l9 o& b% @and add under8 z+ c# ^ \& H
; {6 w* @+ [3 m. L2 }Code:3 u/ [" _3 {3 d# C4 Z
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
" `5 Z% H3 b) |0 p/ ] {( w! x$ s2 T5 w d6 i8 z. h+ v
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 );7 y" O- ^" N* k0 R1 B
}this
; e7 O. f3 E/ M: L
U r0 }- ?. LCode:& S. q8 k7 H) K" S4 x: F
#ifdef __QUGET_SWAP_FIX. H ~( p; w/ T0 s. L
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
2 ~/ k( A8 S# z2 n- E, p/ |2 u pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
# ^8 E2 L$ f! g8 O" f( |
! G5 s, E. m9 r: e/ B if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )2 Z( R4 ~( Z, X- d) B$ t
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* d! d7 K/ r8 `6 n
/ U+ q) T( ]8 c7 A' D3 k4 Q' U
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
# W! l, U% n% p3 Q0 ~# p pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
$ Y3 m7 ~ w4 o1 A% v A, ?1 o% N% t9 r$ y$ A8 d' F8 z2 ^5 d
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 1 l' b6 t# s, P$ ] F
* m" I- _0 M( n$ T- t; B9 X
1 I6 W9 @. e% B: P# b. \& [
|
|