|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
/ A6 s7 w1 l2 n `1 ^9 XI posted this because someone kinda posted a youtube thingy about it :O.2 e& W" e( ~ t
& E# `5 q! c5 u3 A% NFind this in DPSrv.cpp @ worldserver
; Q/ r9 x" V, K" c7 H4 U5 O6 w7 e, W; L5 p0 j- g
Code:
+ b( C8 g+ o2 {. i& f v/ Pvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )% M! _" T2 r9 u3 C
{
' L% A) |7 K+ i4 c# F, W: h6 R DWORD nId;: y5 c4 J5 s# V7 t3 _2 O8 C$ d
int nPart;
; b4 s5 E8 Y- d ?! Y$ V! x/ u
6 O0 }+ T! j& i4 ?" @; M ar >> nId;
5 L" g& R$ A8 n7 m& G% ^% L ar >> nPart;
8 R1 e2 x8 l, l9 B( r3 p
; S; }( Q, i# k if( nPart >= MAX_HUMAN_PARTS )
7 Z; U, t4 c3 P0 o return;( x A" G- b$ _6 }
. _! c$ \7 d0 _2 e! }7 l
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
6 h5 R$ V5 G% C- l* T* V6 e( C( Z0 u% \5 L% ?- L0 ~; ?9 t: L
; l- B1 [, T9 ~4 w0 ~
Code:! {; f. Q0 S( T9 R. d
#ifdef __QUGET_SWAP_FIX' Y- S2 U9 D( r3 ` M
, ^' |8 c( \- w$ s3 l7 d# n: V. K if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
& ]3 D. C, C/ i& Z5 C8 | pUser->SetHitPoint( pUser->GetMaxHitPoint());
4 M8 a6 D8 j) k5 }! C' f3 G3 V" c( V8 L% l; w" g* a
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )4 Q2 c" s: U! Q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );) g8 N1 P( c) x7 k! c; d
# p8 O9 X( E) Y3 Z' R if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() ), r( R- m- @: `6 ]4 ^1 R, ^1 S
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );& i. P' t3 {# M+ y7 q# x0 A/ D
2 n+ \" ]# z0 N0 L0 X4 k
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
' I' E9 H3 A3 b# Band add under
% O5 G6 R6 G$ D5 l1 }( S
& g2 K! H5 z* H2 qCode:% @& y7 \0 t* Q' d" C
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )5 l5 @$ K' t* l( H4 Y& f
{
3 Q/ {0 G9 z# K3 S% F$ n. ^ 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 );
; j* F" w8 k9 H }this0 t* H& U- V2 |$ x& l6 v2 @ }
6 Q: n: P: |& M4 ^7 N9 C1 ]
Code:: {; q* m2 ^/ J
#ifdef __QUGET_SWAP_FIX# [2 ^/ D( ~& v, W
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )( ]8 M% r- [3 x+ f! [. K
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" X4 Y2 }$ d2 ^) y" q
) R7 Q! T- q, p: @" ^ if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
7 A/ q+ p) f, p/ T' f3 n1 F' h/ `5 ~ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );* o5 t8 I( U: b# L/ `: G
& g; C7 a# v0 i if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() ), o6 e# a& C" y0 @) w$ v
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
6 i! a* T6 U4 W0 Q! H
- N; k }* H" F0 M4 t6 I% J, _#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
8 F+ _& u8 t% Q0 r; m1 ?/ G3 L
4 I. x) j. k5 c
. J" h [) K5 G+ f! `; q4 X, r |
|