Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 17:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PackItem BUG ! TESTED ON V15 -> You have the bug too

Discussion on PackItem BUG ! TESTED ON V15 -> You have the bug too within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
PackItem BUG ! TESTED ON V15 -> You have the bug too

Take a box with 4 items inside


After, open it -> Error Ok

If you have 1 free slot


2 free slots:


The box with 4 item is now open and the 2 last items are not created

The function :
Code:
void CUser::DoUsePackItem( CItemElem* pItemElem, PPACKITEMELEM pPackItemElem )
{
	time_t t	= 0;
	if( pPackItemElem->nSpan )	// minutes
	{
		CTime time	= CTime::GetCurrentTime() + CTimeSpan( 0, 0, pPackItemElem->nSpan, 0 );
		t	= (time_t)( time.GetTime() );
	}

	if( m_Inventory.GetEmptyCount() >= pPackItemElem->nSize )
	{
		for( int i = 0; i < pPackItemElem->nSize; i++ )
		{
			CItemElem itemElem;
			itemElem.m_dwItemId	= pPackItemElem->adwItem[i];
			itemElem.SetAbilityOption( pPackItemElem->anAbilityOption[i] );
			itemElem.m_nItemNum	= pPackItemElem->anNum[i];
			itemElem.m_bCharged		= itemElem.GetProp()->bCharged;
			itemElem.m_dwKeepTime	= (DWORD)t;

//			if( pItemElem->IsFlag( CItemElem::binds ) )
			if( pItemElem->IsBinds() )
				itemElem.SetFlag( CItemElem::binds );

			if( CreateItem( &itemElem ) )
			{
				AddDefinedText( TID_GAME_REAPITEM, "\"%s\"", itemElem.GetProp()->szName );
				g_DPSrvr.PutCreateItemLog( this, &itemElem , "E", "PACK" );
//				ItemProp* pItemProp		= itemElem.GetProp();
//				if( pItemProp->dwSfxObj3 != -1 )
//					g_UserMng.AddCreateSfxObj( this, pItemProp->dwSfxObj3, GetPos().x, GetPos().y, GetPos().z );
			}
		}
		OnAfterUseItem( pItemElem->GetProp() );
		UpdateItem( (BYTE)( pItemElem->m_dwObjId ), UI_NUM, pItemElem->m_nItemNum - 1 );
	}
	else
		AddDefinedText( TID_GAME_LACKSPACE );			
}
Anyone have a solution?
sebariio is offline  
Old 04/01/2016, 12:40   #2

 
elite*gold: 28
Join Date: Feb 2010
Posts: 463
Received Thanks: 277
Te fait pas chier et remplace

if( m_Inventory.GetEmptyCount() >= pPackItemElem->nSize )

par if( m_Inventory.GetEmptyCount() >= 5 )
ZeroTwo02 is offline  
Old 04/01/2016, 13:57   #3
 
sebariio's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 98
Received Thanks: 76
Si je fais ça les boîtes qui ont + de 5 objets sont niquées xD

Ok avec ce code la ça fonctionne bien :
void CUser:oUsePackItem( CItemElem* pItemElem, PPACKITEMELEM pPackItemElem )
{
time_t t = 0;
if( pPackItemElem->nSpan ) // minutes
{
CTime time = CTime::GetCurrentTime() + CTimeSpan( 0, 0, pPackItemElem->nSpan, 0 );
t = (time_t)( time.GetTime() );
}

if( ( m_Inventory.GetEmptyCount() -1 ) <= pPackItemElem->nSize )
{
AddDefinedText( TID_GAME_LACKSPACE );
return;
}
else
{
for( int i = 0; i < pPackItemElem->nSize; i++ )
{
CItemElem itemElem;
itemElem.m_dwItemId = pPackItemElem->adwItem[i];
itemElem.SetAbilityOption( pPackItemElem->anAbilityOption[i] );
itemElem.m_nItemNum = pPackItemElem->anNum[i];
itemElem.m_bCharged = itemElem.GetProp()->bCharged;
itemElem.m_dwKeepTime = (DWORD)t;

// if( pItemElem->IsFlag( CItemElem::binds ) )
if( pItemElem->IsBinds() )
itemElem.SetFlag( CItemElem::binds );

if( CreateItem( &itemElem ) )
{
AddDefinedText( TID_GAME_REAPITEM, "\"%s\"", itemElem.GetProp()->szName );
g_DPSrvr.PutCreateItemLog( this, &itemElem , "E", "PACK" );
// ItemProp* pItemProp = itemElem.GetProp();
// if( pItemProp->dwSfxObj3 != -1 )
// g_UserMng.AddCreateSfxObj( this, pItemProp->dwSfxObj3, GetPos().x, GetPos().y, GetPos().z );
}
}
OnAfterUseItem( pItemElem->GetProp() );
UpdateItem( (BYTE)( pItemElem->m_dwObjId ), UI_NUM, pItemElem->m_nItemNum - 1 );
}
}
sebariio is offline  
Reply


Similar Threads Similar Threads
[Selling] ★ M9 Bayonet | Night (Field-Tested) & ★ Karambit | Scorched (Field-Tested) for Paypal
03/09/2015 - Counter-Strike Trading - 2 Replies
#closed
[Trading] [H] Flip Knife | Blue Steel (Field-Tested) [W] AWP Asiimov (Field-Tested)
03/03/2015 - Counter-Strike Trading - 0 Replies
Hi hab nen mega gutes Flip Knife Blue Steel würde es gerne tauschen gegen eine AWP asiimov Fied Tested Bild 1 : http://puu.sh/gjkg2/fa44ebee60.jpg Bild 2 : http://puu.sh/gjkf2/0e57e2cd74.jpg bei intresse einfach unterm beitrag schreiben oder mir ne pn :)
[Selling] M4A4 | Bullet Rain (Field-Tested) & AK-47 | Redline (Field-Tested)
01/24/2015 - Counter-Strike Trading - 0 Replies
Looking for elite*gold. If you have a Paysafecard / Paypal etc. you can exchange it to elite*gold in the elite*gold Trading http://i.epvpimg.com/L5MCg.png http://i.epvpimg.com/QF0pf.png Steam Community :: Ares3ÐA :: Item Inventory Also selling: ★ Flip Knife | Fade (Factory New)
Who tested this?
06/28/2013 - Need for Speed World - 8 Replies
BotTeamEscape Public test from Vitaleks
AFK Bot Tested by me <3
05/31/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 18 Replies
Features: -Automatically goes into active games -Prevents inactivity boots -Doesn't get stuck from boots, invites, etc. -Gain EXP while doing nothing Instructions: 1.Download and extract the attached file. 2.Run the .exe file. 3.Start the bot by pressing the "F9" key while in the lobby



All times are GMT +1. The time now is 17:03.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.