|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked / u+ k/ c0 M' f1 O& S/ M. I) Q
I posted this because someone kinda posted a youtube thingy about it :O.7 `9 Q/ S. b G9 n
6 g6 c6 l5 O& Q" x6 R: N/ r
Find this in DPSrv.cpp @ worldserver4 ]( O! P4 k( k
, r( }% U0 `- U/ x, S4 r4 Z* CCode:
1 `" L) v9 I, w1 P( kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
7 O7 E* X) G& I, |$ h7 B{
$ ?" r2 \+ c& o3 N1 r! @! M3 q# Y4 C DWORD nId;
b3 l1 K5 F5 ~1 o$ ?) Q int nPart;
7 @( q) f2 G# m. r) f7 ?' X) I d1 ?" Q: ~* ^/ z
ar >> nId;
6 P) W7 k; b. P- h. l/ k/ K" w ar >> nPart;
8 s! g9 z$ R# o3 m 8 z/ g c& `$ g$ B; o0 r
if( nPart >= MAX_HUMAN_PARTS )
1 J, Z0 W" T" C4 W return;
, G; Y+ r5 L+ E( j4 J$ s
& z# S7 q( N- N. x CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
7 ` B. V' Z0 s; F; W$ {
% E; B2 S) E' [7 ^ C+ D& x, I9 R9 J0 p0 c
Code:: a E# P$ X/ Q+ e Y( {
#ifdef __QUGET_SWAP_FIX& a. U+ U$ s" }' V- x
) M: I& Q2 ?! X/ o7 c3 @+ X if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )% N9 L; F7 I, {- |% }( l7 I9 f$ Q
pUser->SetHitPoint( pUser->GetMaxHitPoint());% ?7 A0 l' d1 O! T2 q2 I [- \9 v
* h2 l6 u1 L" t; p# w+ t7 \ e' ^3 j+ A if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
- \0 Q9 K% G: [6 H( x- Q0 W pUser->SetManaPoint( pUser->GetMaxManaPoint() );
3 H& Z b$ Z; q" N" z
9 c" e+ C4 {- R) M* | if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
' [' z9 |4 C& D2 {7 h3 l* a- Q! s pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
: j* r9 n4 ^. k4 V L; S6 C( w) n9 G" `' P) E: S$ o5 a
#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp$ R# M4 ^5 \/ \$ ^$ Z# C
and add under' Z" y1 g0 W% E' O; o: {, `" \/ ^
" ?+ r4 a( j1 h$ h: PCode:9 ~( k) t! Z2 T& w; r
if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )1 x& Y6 d/ p. f
{
, }- y! E- Y n+ t; Z# F 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 );) o4 J$ Z! T6 B% O+ P
}this0 L* G* P" }8 b. c, u
2 l* f T1 K$ ]4 w; i' NCode:+ W1 F( b7 a1 B, J) O4 q
#ifdef __QUGET_SWAP_FIX: X6 Q$ }0 B |( J6 l9 e
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )8 H3 a; g) {9 T
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());, s4 n1 N C5 A' ^( g8 q$ I. x0 N5 x
/ ~& d1 `: w- x: G3 \& A; ?
if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
( y |1 T9 e. @5 d pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );# W, ^2 @: C$ \
1 {( c& m' s/ m0 U; o% x
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
9 ~( ?, g) O" h1 d0 ^6 y' _7 ~ pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
; ^- `1 V0 A6 G7 ~! X6 v+ c+ ~. h8 P; |% Y' m7 S& p
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 4 O4 o( }0 Z& K T3 K& Z' F
" i$ g6 P( _7 N( d& p9 F9 i# |% L. v
# s0 ?- C; B1 ~4 H" B7 r) G2 A* P
|
|