|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked * E4 ]- [* k& J( X+ h3 R! S
I posted this because someone kinda posted a youtube thingy about it :O.& Y3 G S# y5 |( P: m
y" ?: F: f4 cFind this in DPSrv.cpp @ worldserver
, p" ]5 [! P1 l* Z/ J# u& a, o7 ^$ J0 m! C, g
Code:
% ]) N/ L5 K" k6 c0 W. D: z# @void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )& k6 m: ^$ r/ ^5 {2 Q
{ z+ s4 S; _/ X; b
DWORD nId;
6 S* p" K2 O( C8 D5 V int nPart;
0 i7 g; S- ?0 i7 g
* E, ^) j% a) E) F- _* T- x ar >> nId;- G7 g; } F; H. X _( m. J& T
ar >> nPart; 5 Y, ], }: |, G) Q$ }$ V1 q3 `
1 ?8 ?8 g/ E4 s2 T
if( nPart >= MAX_HUMAN_PARTS ) $ f$ I9 O. o$ J5 D% w
return;- a2 H: U2 M# h# i1 g p1 i
" T5 ^' x$ m5 S+ M
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( o) U+ x! z' `
) e6 x! j! Y O Q
6 A4 }% K' V2 Q$ |) qCode:
8 E% Y; [( t3 f: m: h) b# ~#ifdef __QUGET_SWAP_FIX4 e" r* ]% J( u' \2 N/ {
! v2 N7 J) S- e f6 H
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )& F& ~$ s/ |+ B, N+ p3 ]
pUser->SetHitPoint( pUser->GetMaxHitPoint());
% F. c' u3 g0 k& Q1 Y3 R/ v. G
: W* @" ?1 t8 V( j, }! m if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )* J2 g5 k% {, ?: s3 I# R1 q
pUser->SetManaPoint( pUser->GetMaxManaPoint() );
7 Q# ?1 ]2 o4 C
) h9 _3 Q# i# O- ]8 M l% Y if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )# ?% A" z! D/ L: K0 o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
+ \# E0 B! A1 T6 O1 I9 q, f
! X9 C, B/ J- V. R: |/ b; `#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp( V* j4 g" E% U3 Q U& p
and add under" Z* U3 E, w7 y& G- T0 Q; ~
( Y1 A2 c: s1 h% W6 jCode:
) o* r9 Y; X1 u) [! H2 kif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )6 F7 J- @1 k( _" S: Q* \+ m" a
{, I% Z4 X1 Z/ }9 e; d
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 );; R, b) S" x. C0 Y/ t
}this
0 K% E- Y( K M# u
! m& M7 }3 z5 K. X. zCode:, M( F! t* h& o3 `, Z
#ifdef __QUGET_SWAP_FIX
0 I: K8 {0 Z) U if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() ); R7 x1 u% A1 F& r0 o% s5 T" E
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
. u. E R1 }" \8 a T; _0 m0 |/ s
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* A3 p, F% Q/ j5 V1 @1 [
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
( g" _2 k* I. W4 x$ A) s F1 m( [" k1 \, e* G
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )2 C- h- Y; k# e
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );+ m5 a6 H: s8 z* W! z/ W. V: e( K
W* c# Z4 U. W$ B* P3 y- y3 @7 @
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
5 {- L& P& ^. ~1 J$ `$ x0 h3 S0 F; D y3 n
# Z8 q* f7 {5 W2 O1 c |
|