mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-06 12:27:48 +00:00
fix(Scripts/BlackrockSpire): Urok Doomhowl - improvements: (#9067)
The mobs should attack the pike if there is no players around The boss should not despawning after summon Urok's Tribute Pile with Pike and Head should disapear after Urok appear Fixes #9023
This commit is contained in:
@@ -690,10 +690,12 @@ namespace Acore
|
||||
class NearestGameObjectEntryInObjectRangeCheck
|
||||
{
|
||||
public:
|
||||
NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range) : i_obj(obj), i_entry(entry), i_range(range) {}
|
||||
NearestGameObjectEntryInObjectRangeCheck(WorldObject const& obj, uint32 entry, float range, bool onlySpawned = false) :
|
||||
i_obj(obj), i_entry(entry), i_range(range), i_onlySpawned(onlySpawned) { }
|
||||
|
||||
bool operator()(GameObject* go)
|
||||
{
|
||||
if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range))
|
||||
if (go->GetEntry() == i_entry && i_obj.IsWithinDistInMap(go, i_range) && (!i_onlySpawned || go->isSpawned()))
|
||||
{
|
||||
i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
|
||||
return true;
|
||||
@@ -704,6 +706,7 @@ namespace Acore
|
||||
WorldObject const& i_obj;
|
||||
uint32 i_entry;
|
||||
float i_range;
|
||||
bool i_onlySpawned;
|
||||
|
||||
// prevent clone this object
|
||||
NearestGameObjectEntryInObjectRangeCheck(NearestGameObjectEntryInObjectRangeCheck const&);
|
||||
|
||||
Reference in New Issue
Block a user