|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked 1 ^% m9 ?5 w$ i2 J& j% }) a
I posted this because someone kinda posted a youtube thingy about it :O.
4 H/ _9 z9 l) N. n4 P3 o% x9 [0 Q- M. l* ~/ r4 V( A
Find this in DPSrv.cpp @ worldserver/ P X G' E' T: W2 E S8 ^ j
5 ]: N$ H" o+ g( I& ~
Code:
6 ]& P8 h' e) i1 H( |void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
0 k. y: G' f* U; |" B1 Q! b2 x{! E5 j" U5 h; Y8 @1 L+ e3 Y& Z
DWORD nId;
& M* r) {, i( x0 a( d! Y6 L int nPart;
- B/ j6 G6 ~2 J! ^' B7 W# U
' d5 [/ }& y, P6 `) _1 `2 ?2 m ar >> nId;
7 z! W2 ]- x9 M; W( G8 `4 Y- T ar >> nPart; & f+ B- G; B& e+ ^4 Q
/ x. T! b& n; t. c/ B
if( nPart >= MAX_HUMAN_PARTS )
$ T" q: b; f# I" | return;3 n: v+ j o( _1 S) b
& B K8 c V$ K+ o! w
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it4 G. d/ L7 }; |* W+ g/ ?( r& v
, T& B/ `" T3 N. M8 m
2 B3 p4 G' C* M8 W, p
Code:
5 `& ~$ R4 q2 v3 J6 l#ifdef __QUGET_SWAP_FIX
5 m8 h O4 Q% c- R2 ~- a7 J. @3 E5 |6 k* R- k
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )* P( b8 I6 x! e' o5 P* Q
pUser->SetHitPoint( pUser->GetMaxHitPoint());# l3 Q( e: T2 a+ A7 n
6 }9 Q" w2 Z) c% W9 z if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
) ]' N; b6 K8 ~ G* W6 L pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ l% K& @( A' H7 h/ H
9 ?" [' E4 L0 @# P: ?$ L: q
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )$ h5 X S; q2 T( \& t
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );( U+ d6 B, r8 U& S
6 H- p: E$ {0 N: i0 a+ d5 J#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp. y0 ~) } n" x9 g
and add under
) T6 Y+ c! m8 }' w% y
. P6 Y2 z! I6 Q( J/ C3 [! V& cCode:
( n9 h) [& w/ ~8 c2 zif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
6 U ] b+ c: @4 F8 h: P% u {
/ Q1 c: @$ O- k 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 );
% j7 O r$ \6 \$ I& i1 {8 s }this# D4 @- ^% J* N/ d. B- R; m9 T6 d
q9 F7 D- P; J" O( I* Z* |
Code:
- B- X+ U2 z7 Y7 r. V2 X) G6 k#ifdef __QUGET_SWAP_FIX' L, P3 }' D* Y
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
l5 z( q' l$ _6 S% k pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
8 \) v& x1 Y% h6 n5 |% [! E
4 f2 y; z. O4 [6 S0 X4 ] if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
! ]2 h: S" b- F; a! @! _ pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
% T( O* i% _0 X; i& G" l
' `; f8 I# S) R0 I. W2 w if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
2 i. Z& F3 q5 ?% Q pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
m- j' I1 _ r |3 V9 F! q: A: X6 _( ~! O$ ~# V
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 c3 r) q% {- k& G2 N+ c; f8 |
; [& B5 ?1 K, p! Q3 }
# P- F& _/ F! K( W8 K |
|