mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +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:
@@ -2533,10 +2533,10 @@ Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive
|
||||
return creature;
|
||||
}
|
||||
|
||||
GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range) const
|
||||
GameObject* WorldObject::FindNearestGameObject(uint32 entry, float range, bool onlySpawned /*= false*/) const
|
||||
{
|
||||
GameObject* go = nullptr;
|
||||
Acore::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range);
|
||||
Acore::NearestGameObjectEntryInObjectRangeCheck checker(*this, entry, range, onlySpawned);
|
||||
Acore::GameObjectLastSearcher<Acore::NearestGameObjectEntryInObjectRangeCheck> searcher(this, go, checker);
|
||||
Cell::VisitGridObjects(this, searcher, range);
|
||||
return go;
|
||||
@@ -2816,7 +2816,8 @@ void WorldObject::GetContactPoint(const WorldObject* obj, float& x, float& y, fl
|
||||
// angle to face `obj` to `this` using distance includes size of `obj`
|
||||
GetNearPoint(obj, x, y, z, obj->GetObjectSize(), distance2d, GetAngle(obj));
|
||||
|
||||
if (fabs(this->GetPositionZ() - z) > 3.0f || !IsWithinLOS(x, y, z))
|
||||
// Exclude gameobjects from LoS calculations
|
||||
if (fabs(this->GetPositionZ() - z) > 3.0f || (GetTypeId() != TYPEID_GAMEOBJECT && !IsWithinLOS(x, y, z)))
|
||||
{
|
||||
x = this->GetPositionX();
|
||||
y = this->GetPositionY();
|
||||
|
||||
Reference in New Issue
Block a user