feat(Core): GetDeadCreatureListInGrid helper added, for aoe loot (#8445)

This commit is contained in:
acidmanifesto
2021-10-13 10:32:01 -04:00
committed by GitHub
parent b5f8b485a8
commit 430157f71d
5 changed files with 38 additions and 0 deletions

View File

@@ -2503,6 +2503,13 @@ void WorldObject::GetCreatureListWithEntryInGrid(std::list<Creature*>& creatureL
Cell::VisitGridObjects(this, searcher, maxSearchRange);
}
void WorldObject::GetDeadCreatureListInGrid(std::list<Creature*>& creaturedeadList, float maxSearchRange, bool alive /*= false*/) const
{
Acore::AllDeadCreaturesInRange check(this, maxSearchRange, alive);
Acore::CreatureListSearcher<Acore::AllDeadCreaturesInRange> searcher(this, creaturedeadList, check);
Cell::VisitGridObjects(this, searcher, maxSearchRange);
}
/*
namespace Acore
{