mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-11 11:40:31 +00:00
feat(Core/WorldState): init Scourge Invasion pre-wrath event (#22286)
Co-authored-by: Orozxy <crusadermeile@gmail.com> Co-authored-by: Killerwife <killerwife@gmail.com> Co-authored-by: Ryan Turner <AugustoMendes4426@gmail.com>
This commit is contained in:
@@ -1447,6 +1447,24 @@ namespace Acore
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class AllGameObjectsMatchingOneEntryInRange
|
||||
{
|
||||
public:
|
||||
AllGameObjectsMatchingOneEntryInRange(WorldObject const* object, std::vector<uint32> entries, float maxRange) : m_pObject(object), m_uiEntries(entries), m_fRange(maxRange) {}
|
||||
bool operator()(GameObject *go)
|
||||
{
|
||||
if (std::ranges::any_of( m_uiEntries, [go](uint32 entry) { return go->GetEntry() == entry; }) && m_pObject->IsWithinDist(go, m_fRange, false))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
WorldObject const* m_pObject;
|
||||
std::vector<uint32> m_uiEntries;
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class AllCreaturesOfEntryInRange
|
||||
{
|
||||
public:
|
||||
@@ -1465,6 +1483,24 @@ namespace Acore
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class AllCreaturesMatchingOneEntryInRange
|
||||
{
|
||||
public:
|
||||
AllCreaturesMatchingOneEntryInRange(WorldObject const* object, std::vector<uint32> entries, float maxRange) : m_pObject(object), m_uiEntries(entries), m_fRange(maxRange) {}
|
||||
bool operator()(Unit* unit)
|
||||
{
|
||||
if (std::ranges::any_of(m_uiEntries, [unit](uint32 entry) { return unit->GetEntry() == entry; }) && m_pObject->IsWithinDist(unit, m_fRange, false))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
WorldObject const* m_pObject;
|
||||
std::vector<uint32> m_uiEntries;
|
||||
float m_fRange;
|
||||
};
|
||||
|
||||
class MostHPMissingGroupInRange
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user