|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
* d' X1 U5 g+ Z9 j8 d. M1 [: D5 K5 EI posted this because someone kinda posted a youtube thingy about it :O./ A. c/ j( ]6 h3 P1 d
, B1 L" I9 c9 P) p% e7 j/ J4 e- t
Find this in DPSrv.cpp @ worldserver% I* Z& W: o# `
' H6 Q4 b+ s$ a' `9 P$ pCode:! a$ b, {) M" O& ~0 F( n
void CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize ); V& i4 _5 z1 ~. |( O* y
{
, s1 u1 d7 _& ]& E9 Q$ K5 b7 r DWORD nId;+ \1 I2 T3 y( v$ O/ l5 m
int nPart;4 X" ]; _% V/ ~$ w+ s! t
3 i. n0 _% ~$ O ar >> nId;
6 [( h/ K6 U o ar >> nPart; 0 S, T/ [9 w. }8 q) R7 W" \5 t
$ A1 i5 J' C4 `
if( nPart >= MAX_HUMAN_PARTS )
3 N. ]* k9 X$ h4 ?7 f _ return;
9 w( I4 b7 Y8 E7 h0 S' L4 k6 S5 K! t+ A3 s0 \4 x9 @4 u7 b
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it; Z8 n# g8 S$ z8 s7 v4 A. f* y
1 P. |) k$ A% T
" f) S+ b" c9 `( D$ a5 CCode:
. u' ?: u$ d7 F9 \4 s- J. Q6 R. \#ifdef __QUGET_SWAP_FIX( F3 U3 B2 Q. L. S
6 i/ P! s) D3 D9 E5 O$ p; g2 b' w
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() )3 l1 _5 @1 s9 |& `1 T
pUser->SetHitPoint( pUser->GetMaxHitPoint());
' ]: e5 t# n4 F K# n2 U3 X: Y' }; @, a z$ F% z* X1 D
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() )
3 o( [# S" K5 `3 E* C pUser->SetManaPoint( pUser->GetMaxManaPoint() );
/ S8 Q" R( d4 v9 P* N5 c5 D2 {6 x# m$ N+ j3 J" _
if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )7 l8 g4 F7 H( e7 u m
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() );. F6 l8 M, t& n: N; Y% X! M' Q
& i/ C" F9 D; V3 k* M#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp8 g* e# Q( c9 U. Y( F
and add under
3 q) J1 y/ I( k9 }. y( b& Y( ]6 W# r# l6 x1 B( B' q9 D2 v" v
Code:
* d* H+ k. d( lif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )
! @' d4 D$ z( M& j {
" w" E: i9 B8 y 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 );
& p) c& \5 K2 V; M1 ^4 b" A1 g }this2 N3 h; s2 ]7 k! q2 V, v
* E$ e4 ]" k2 R4 N, o
Code:, G: v, b7 K! e2 G0 I
#ifdef __QUGET_SWAP_FIX
3 V+ b4 a6 F$ P3 t if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )# v( F- T1 I8 ~0 X9 }' }9 a
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
9 I6 F/ j/ v8 r" [
3 ^, D) x& x7 d, S if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )* J4 s! M! Z" S+ W3 s1 c
pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );
2 b$ n0 W* k" B( \ x1 j! S7 J& U) v# X% C
if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )3 |; R* D& |' a2 t) S: W
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );
: ? x) u' A* H; u9 S8 T6 K$ |" J# P \' }. w" A/ H3 i
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver 3 c3 a2 M8 p f+ u G+ H
; h# h0 G! r) r0 G% ~/ ?
5 @$ W, l+ F1 W5 h% R) ^8 G$ v
|
|