Scripts/Icecrown Citadel: Only one Mutated Abomination can exist during Professor Putricide encounter

Scripts/Spells: Added blizzlike error messages for certain spells
Scripts/Items: Removed obsolete scripts
This commit is contained in:
Shauren
2011-03-04 23:53:11 +01:00
parent 22cd262e6c
commit 36f848a4c2
13 changed files with 260 additions and 130 deletions
@@ -81,6 +81,33 @@ void SummonList::DespawnAll()
}
}
void SummonList::RemoveNotExisting()
{
for (iterator i = begin(); i != end();)
{
if (Unit::GetCreature(*me, *i))
++i;
else
erase(i++);
}
}
bool SummonList::HasEntry(uint32 entry)
{
for (iterator i = begin(); i != end();)
{
Creature* summon = Unit::GetCreature(*me, *i);
if (!summon)
erase(i++);
else if (summon->GetEntry() == entry)
return true;
else
++i;
}
return false;
}
ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature),
me(pCreature),
IsFleeing(false),