fix(Scripts/BlackrockSpire): Rend Blackhand improvements (#8826)
This commit is contained in:
parent
d35c6b6022
commit
1ed0a67ed1
6 changed files with 169 additions and 130 deletions
|
|
@ -135,6 +135,38 @@ Creature* SummonList::GetCreatureWithEntry(uint32 entry) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool SummonList::IsAnyCreatureAlive() const
|
||||
{
|
||||
for (auto const& guid : storage_)
|
||||
{
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
if (summon->IsAlive())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SummonList::IsAnyCreatureInCombat() const
|
||||
{
|
||||
for (auto const& guid : storage_)
|
||||
{
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
if (summon->IsInCombat())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature),
|
||||
me(creature),
|
||||
IsFleeing(false),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue