mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +00:00
feat(Core/Formations): Implement GROUP_AI_FLAG_DONT_RESPAWN_LEADER_ON… (#12128)
This commit is contained in:
@@ -103,35 +103,6 @@ public:
|
||||
zealot->ResetFaction();
|
||||
}
|
||||
|
||||
// TODO: do this in formations, once a flag is added to prevent leaders from respawning as well.
|
||||
std::list<Creature*> creatureList;
|
||||
GetCreatureListWithEntryInGrid(creatureList, me, NPC_ZULGURUB_TIGER, 15.0f);
|
||||
|
||||
if (_catGuids.empty())
|
||||
{
|
||||
for (Creature* creature : creatureList)
|
||||
{
|
||||
_catGuids.push_back(creature->GetGUID());
|
||||
if (!creature->IsAlive())
|
||||
{
|
||||
creature->Respawn(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ObjectGuid guid : _catGuids)
|
||||
{
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, guid))
|
||||
{
|
||||
if (!creature->IsAlive())
|
||||
{
|
||||
creature->Respawn(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_scheduler.SetValidator([this]
|
||||
{
|
||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
||||
|
||||
Reference in New Issue
Block a user