|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 6 E8 Y2 h; ?, d2 I2 l& _
I posted this because someone kinda posted a youtube thingy about it :O.4 k5 e- T& c c+ i! l+ [- d H
9 ?9 |; F% A1 Y% x
Find this in DPSrv.cpp @ worldserver% o. A P0 N' [. d8 N( {7 d( F
7 o) ?2 F9 V$ C4 E8 F; S3 k/ BCode:
% V' {. k, v: H" Y' v2 D3 E4 ~$ X+ Bvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
: R1 w- [# ?7 H- ~3 n7 h{
/ ^: S5 b$ j7 I, R$ Y; G DWORD nId;
$ R g) _. K8 u, l% b: ? int nPart;
/ g: B* i1 o# E1 y; p& z1 h: j9 G: {) F o
ar >> nId;
% G- C7 B& b2 b9 o5 M h ar >> nPart; $ E% c# R* D/ \
! K' p* ^0 v3 J( _( c; }
if( nPart >= MAX_HUMAN_PARTS )
* U/ E2 g4 }8 ` return;
3 I2 ]" r2 c* }' i* W
4 u5 C; |" E9 k0 s: t CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it ] C3 B5 B. D& {2 T+ H \+ m- f
. K1 O; L' n% c2 S. w L
5 E6 |/ q x% U5 @" ~3 P: tCode:* X0 }, N3 ^3 C
#ifdef __QUGET_SWAP_FIX
4 {1 j' j) x- R- p8 \9 T. ^& r. W- P4 c, C( w' R
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ), G" n# }& h! D* Z
pUser->SetHitPoint( pUser->GetMaxHitPoint());9 _ P$ T; T+ J5 b0 ?9 \/ h
1 [0 S0 _: k9 h4 {4 q8 W
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
, s* R* A) [1 Z6 y pUser->SetManaPoint( pUser->GetMaxManaPoint() );
# C4 L# f i e! l. g
/ @) b Q' E: j. B# o. @4 C: W if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )' c! D0 l0 Z `* ]$ O
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
' _' K3 ]3 `9 ?! {* {
' r/ [, h/ K; k, V4 ~" q#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
f5 T6 I6 q$ _) Eand add under2 X7 y$ ~( R5 g5 x! @3 @* z
1 M( `8 D- y: |) [
Code:% |: L' ?( a" {2 v% |# A
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )& K! o6 b2 X' a$ z Z: C/ v
{
* d& s f4 r- z7 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 );& ]7 ~8 U5 r* R6 [- b" a
}this
H, @3 W9 g* [% }9 v) J7 y
]. o- O8 z J& |Code:. D) w# H+ s/ ?4 Y1 [) J) }
#ifdef __QUGET_SWAP_FIX
# p5 z2 i5 \: c if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
4 V5 B0 k8 H( z l$ j# R1 Z pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());. X0 p# T/ Y/ J+ J
, ~5 I9 d' [2 V1 @; t c3 e
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )& h+ l% X" e# ~' _
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );" z( k0 x. e# }$ o8 `# s4 j% L' q6 K
; h; j. M, z$ J$ p. u7 ~9 x+ S
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )+ N6 J, [: Y* d2 x' D$ w
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
8 |& k7 w, X, ]( R) C# A
- }: ~2 |0 s/ l#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
) o# l3 g1 u0 t3 R
( M: Y, V. }: v: `: e6 l& J. B4 B' |) Y% F: x r
|
|