Game/AI: Implement new targettype SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT
Port From (https://github.com/TrinityCore/TrinityCore/commit/db825c3221de16cdb757711781318d76b414213f)
This commit is contained in:
@@ -1540,6 +1540,15 @@ namespace Game.Entities
|
||||
return searcher.GetTarget();
|
||||
}
|
||||
|
||||
public GameObject FindNearestUnspawnedGameObject(uint entry, float range)
|
||||
{
|
||||
NearestUnspawnedGameObjectEntryInObjectRangeCheck checker = new(this, entry, range);
|
||||
GameObjectLastSearcher searcher = new(this, checker);
|
||||
|
||||
Cell.VisitGridObjects(this, searcher, range);
|
||||
return searcher.GetTarget();
|
||||
}
|
||||
|
||||
public GameObject FindNearestGameObjectOfType(GameObjectTypes type, float range)
|
||||
{
|
||||
var checker = new NearestGameObjectTypeInObjectRangeCheck(this, type, range);
|
||||
|
||||
Reference in New Issue
Block a user