|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked # O: }5 \: f+ \ f% t* J9 t# _4 m& Y
I posted this because someone kinda posted a youtube thingy about it :O.: a# N4 V+ }. o
8 r% H5 D' }+ @
Find this in DPSrv.cpp @ worldserver, M/ k. G/ I8 j- c
* h% X$ x1 e* a; x
Code:
" d6 K8 W! x9 X/ K* }" |/ h. Svoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); _, l+ D" C: r9 r
{
# E/ E0 s5 y, B6 @, N. Q% Q6 y DWORD nId;% `/ P7 ^: T. x4 u( e
int nPart;$ s2 B+ I, ?2 {4 O. Y- g* Y2 H
' H! p# S7 |- u5 Y7 u. E0 h& D
ar >> nId;2 J( J! L4 C$ ^8 m: K n: Q8 L
ar >> nPart; 8 w' S' ~- \. J. _- q, f
' J' p! O) ]& \2 y3 o: I6 H; n) b
if( nPart >= MAX_HUMAN_PARTS ) 7 S7 \8 ]8 h# A
return;
" m; s, [. J9 X5 Z$ s } ]- u" P
( K9 `3 Z4 I# O# R1 k. Z CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
+ l/ i1 l* [! p8 h( a! \
7 a7 G& v5 d( c3 Z5 J8 @5 W8 o7 {
Code: R! d" Q$ T8 G! }5 i
#ifdef __QUGET_SWAP_FIX
I4 t _5 A, l
1 }2 c. j6 `- k& [! K7 f% t) [ if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )
, {& _2 q; ]( B: M! T6 `3 O' x pUser->SetHitPoint( pUser->GetMaxHitPoint());( n+ Z2 u8 _3 ?3 [3 u" R5 i4 {" D' m; E2 o6 {
* u3 @. N% G6 ]$ C _# k& R
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ). ]7 B) P+ ^& S6 g' e
pUser->SetManaPoint( pUser->GetMaxManaPoint() );$ Y, H$ h- h$ `# D. n- w* D9 T
6 a- D" y* {9 s$ K if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )
5 z0 c! o) u8 E' F0 M3 X pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );
# N0 J, Y9 o( k) o+ _% O
# \% o/ G1 ]* i# V+ x1 h. k#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp
; p. Y" d% p) p9 r- l: aand add under
* ], H7 e$ p! s( s8 r% E
; N1 U! v! `! d) rCode:
0 |9 J }0 B' O" C* V+ [if( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )2 i- Q/ L' z7 D( V, S9 W
{7 l4 b# W. m- }7 A/ E3 L
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 _% ^" \2 b |1 d; B( a4 {# n3 Q& \* n$ H
}this
+ D& Z( r6 V* _1 t
+ o' F( [# x4 `6 ]0 [Code:! P3 @0 }& Y5 T% v; f
#ifdef __QUGET_SWAP_FIX D8 [! s G& h3 @; I2 C) w# w
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )
0 p" Z# S2 C& s pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
~6 ~6 U5 y) q. `' R; @* K; C8 m0 Z! K
' p/ g) f+ K, n# u if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )' @/ A+ ^' K/ D4 n, P" y; ^
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
) X" \0 S. e6 L+ h5 U+ m4 H, ?+ y8 X7 P, B
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )
$ c/ A. t. B) e) _1 a pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
. @1 p- ]9 I1 [0 N% m- z* R8 G- Q( }5 A+ }2 v) h2 c2 }
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
6 e) n' v/ L3 a5 K9 _7 V6 b- ]2 x M) z$ ^' V8 z
( f W) f* s# ~, f; Y8 J u
|
|