mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 12:47:07 +00:00
feat(Core): GetDeadCreatureListInGrid helper added, for aoe loot (#8445)
This commit is contained in:
@@ -1327,6 +1327,30 @@ namespace Acore
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class AllDeadCreaturesInRange
|
||||
{
|
||||
public:
|
||||
AllDeadCreaturesInRange(WorldObject const* obj, float range, bool reqAlive = true) : _obj(obj), _range(range), _reqAlive(reqAlive) {}
|
||||
|
||||
bool operator()(Unit* unit) const
|
||||
{
|
||||
if (_reqAlive && unit->IsAlive())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!_obj->IsWithinDistInMap(unit, _range))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
WorldObject const* _obj;
|
||||
float _range;
|
||||
bool _reqAlive;
|
||||
};
|
||||
|
||||
class PlayerAtMinimumRangeAway
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user