mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/BlackrockSpire): Rend Blackhand improvements (#8826)
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user