|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
" _$ s: _3 ?6 k# J! H/ s8 _I posted this because someone kinda posted a youtube thingy about it :O.
( V3 c, v" l8 {, F
& k0 P2 o$ X( O1 NFind this in DPSrv.cpp @ worldserver1 O9 s6 |' N- W
* T# D* x: w* {
Code:3 R5 o& R! o+ |) N) }
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )- \0 |1 m a5 `+ n& c
{% g$ ^1 S$ x) S8 \9 ]. K
DWORD nId;
* @2 R" g; M6 b. l9 _# Y int nPart;
: j5 G( q5 I% M9 N9 h
2 v7 h. ^8 ]7 d, q6 F$ F0 ^ ar >> nId;% t) P+ r3 K' b
ar >> nPart; - G. s, D0 C) l+ S% P4 X) p
2 l, w: d8 {+ Y0 z& s if( nPart >= MAX_HUMAN_PARTS ) ! v* n S2 Q( U7 X4 C1 E* h
return;
1 y7 c8 R- S& {* l. m8 o y' l- U5 s: H' d& D% f8 E" A
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it1 t R1 r% X ~; [' h+ z3 T
, W1 H: }+ M; r8 [! R$ o: B) b, R
. C4 t6 L6 Y) C dCode:+ _% x4 _# D6 K |+ \
#ifdef __QUGET_SWAP_FIX
( Z! J, @* R4 w( a8 @7 f0 I, C
* s! D" D( G1 q4 N if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
5 R* g' b W" d: P# N; r pUser->SetHitPoint( pUser->GetMaxHitPoint());3 O; H2 B3 e9 J4 @3 i
/ I! H$ h* \8 w1 f( D- l4 T% C if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
8 L3 ?, K) d- w+ ^+ l; c pUser->SetManaPoint( pUser->GetMaxManaPoint() );
1 @5 v$ u0 R# Z1 m* N! X! o- q
% }+ _% ]6 n: F! T- m if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ): C( R8 k8 a" j4 [
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );) q/ O# j1 o7 f
0 c1 ?" K+ M% |/ t7 N& ` B7 Y#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
* S& J9 v* F( H) p, f! f9 F$ V mand add under8 x! m% y8 }( \% m! o
# j/ a, S" ], C+ O0 P6 s
Code:, g& W+ F( r. X1 o1 _
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
$ X8 W: U5 ~0 c( Y" g: H {2 y. N& @+ }9 u' @
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 ); t0 C$ h* Q! V8 g0 P6 u3 v; t
}this
7 O4 @! }8 r, z# p% o* j. \+ Z0 H5 W" k
Code:
* X* z2 B! d6 c* d; r) c/ A4 ?: n#ifdef __QUGET_SWAP_FIX
, b( r- K, B& B# L if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 X" z H* ~% Q" N2 ~
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());5 K- M/ a0 o( l. @
: h! Z6 P( ?% V2 |4 R: {! k" o
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
" i2 |' c. r$ b, b' P1 v/ K pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );. W. p% ], @0 s: c2 b5 r
9 C# ?+ p# o9 Z0 d5 p
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
1 T9 C& O: [8 j, O3 Y# q) R5 P pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. R+ q* x5 ?' k- h- H1 \' w
; @3 r$ Q& u: b) T* Y#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
& S; {' |" z e8 {, H" g6 k3 r% o7 k7 s
! N4 ^6 c6 C- d, J0 d
|
|