Esempio n. 1
0
//=============================================================================
Buff* CreatureObject::GetBuff(uint32 BuffIcon)
{
	//Cycle through all buffs for the creature
	BuffList::iterator it = mBuffList.begin();
	//Check if the Icon CRCs Match (ie Duplication)
	while(it != mBuffList.end())
	{
		Buff* temp = *it;
		if(temp->GetIcon() == BuffIcon)
		{
			return temp;
		}
		it++;
	}
	return 0;
}
Esempio n. 2
0
bool CreatureObject::GetBuffExists(uint32 BuffIcon)
{
	//Cycle through all buffs for the creature
	BuffList::iterator it = mBuffList.begin();
	while(it != mBuffList.end())
	{
		//Check if the Icon CRCs Match (ie Duplication)
		Buff* temp = *it;
		if(temp->GetIcon() == BuffIcon)
		{
			//Check if the duplicate isn't marked for deletion
			if(!temp->GetIsMarkedForDeletion())
			{
				return true;
			}
		}
		it++;
	}
	return false;
}