|
|
Hi I fixed the swap bug a long time ago it got tested on my server and it worked
% b! Z/ F2 K5 e" T$ R, hI posted this because someone kinda posted a youtube thingy about it :O.. J, _1 T! h5 }- y' X+ j( \ t
: ~! g) L, f- S& u, x/ Q& r7 CFind this in DPSrv.cpp @ worldserver. p2 G: j& t0 J* S) c0 R' x9 z$ x
0 t+ @8 I# p2 p2 y3 [Code:
3 K6 w+ \* c$ v. Kvoid CDPSrvr::OnDoEquip( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE lpBuf, u_long uBufSize )
9 v" t% D' ~3 f7 d. B6 s6 r{
5 G# ^+ k2 N' [: ?2 {1 U0 y5 V DWORD nId;, K' t( B* G/ T
int nPart;6 Y+ O1 r/ _4 H! f- w
+ b6 }2 c6 ^$ h* w; S$ m ar >> nId;# W: d, x# G% w! h; g: s N, O6 r
ar >> nPart; 0 s* B; y0 h N V5 Q2 `. m3 S
3 @, O* u; ~( }4 k9 M! d$ X if( nPart >= MAX_HUMAN_PARTS ) - U6 @5 n8 r s5 c: w0 H# u
return;
$ @1 F+ w2 h/ F' ?
4 [; d9 `5 V7 y0 h; {4 e5 ~/ t! w CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );And put this under it
( |; J. w$ n. j& x
& B% g& `" Y' U# Y5 K) W6 c0 S8 e8 i0 f7 F6 G8 P% Y7 x
Code:
" ^5 |$ N; }$ Y#ifdef __QUGET_SWAP_FIX/ @3 x* f! h1 P) R& q# b
) f8 t; V) A1 Z, l, K
if( pUser->GetHitPoint() > pUser->GetMaxHitPoint() ): D5 c( o( _% S- w. {2 x
pUser->SetHitPoint( pUser->GetMaxHitPoint());5 I* N- @% Z. D8 F% o
6 s) n9 r2 l+ D$ W- B {
if( pUser->GetManaPoint() > pUser->GetMaxManaPoint() ) l8 R7 ]/ L8 P }, ~8 z6 f. p
pUser->SetManaPoint( pUser->GetMaxManaPoint() );* S4 F5 q h* H7 }
5 _7 ]: x% d8 L0 e/ H if( pUser->GetFatiguePoint() > pUser->GetMaxFatiguePoint() )% u! V- S* c& R7 @! o
pUser->SetFatiguePoint( pUser->GetMaxFatiguePoint() ); B; c0 z6 G ^& a% z6 t' p
7 [1 E- ~! p% M, [- \4 n#endiffind this in function void CDPClient::OnDoEquip( OBJID objid, CAr & ar ) @ DPClient.cpp/ W n! l. N6 m6 S
and add under9 f* N+ E9 P& g
2 _% T. n( W3 R% v5 R, b
Code:
, w. j& i }, p2 }3 r; f( r8 ^1 k* Yif( g_WndMng.m_pWndBeautyShop && g_WndMng.m_pWndBeautyShop->m_pModel )% @8 w# T6 g8 m. \2 S1 y/ `
{
5 i3 }/ C8 X; M5 V: o y7 s2 u! u$ O5 B 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 );2 _ j6 ^2 e( I' l4 ~
}this( E- x* U1 t) B [
, o( d/ i# ^0 d; r' O. fCode:
& }; g6 E; Y+ ^#ifdef __QUGET_SWAP_FIX( I* k, \! g$ f" d& q2 y/ D7 J
if( pPlayer->GetHitPoint() > pPlayer->GetMaxHitPoint() )) G7 y& J7 H! R3 d/ r& {8 }7 h: ?6 y
pPlayer->SetHitPoint( pPlayer->GetMaxHitPoint());
" I+ a6 C U1 Q0 L2 m" }1 ]
7 q* s# A, H' Q& b if( pPlayer->GetManaPoint() > pPlayer->GetMaxManaPoint() )
1 h$ A, ~9 {0 R' ~+ d pPlayer->SetManaPoint( pPlayer->GetMaxManaPoint() );+ c8 {4 L4 [" j
0 \( S# C! V8 I$ h+ R' M! _ if( pPlayer->GetFatiguePoint() > pPlayer->GetMaxFatiguePoint() )% D" b! k% H( k5 V* e6 b
pPlayer->SetFatiguePoint( pPlayer->GetMaxFatiguePoint() );1 u x$ S& l4 U4 g
; p" z) N. O. L; z
#endifand then define __QUGET_SWAP_FIX in versioncommon.h @neuz and worldserver
+ C2 m8 I+ G$ i9 I# M, C; X- X Y/ G6 N' n
$ z* P# H% x3 h5 a" Y |
|