Core/Creatures: Implement StringId for Creatures, a custom identifier to make finding specific creatures in script easier

Port From (https://github.com/TrinityCore/TrinityCore/commit/61c51b76c00d932a9180bc6781a244dc18375ef7)
This commit is contained in:
hondacrx
2023-01-05 16:44:30 -05:00
parent 23c3084f00
commit 0c782c60c2
11 changed files with 110 additions and 22 deletions
+5
View File
@@ -456,6 +456,11 @@ namespace Game.AI
return source.FindNearestCreature(entry, maxSearchRange, alive);
}
public static Creature GetClosestCreatureWithOptions(WorldObject source, float maxSearchRange, FindCreatureOptions options)
{
return source.FindNearestCreatureWithOptions(maxSearchRange, options);
}
public static GameObject GetClosestGameObjectWithEntry(WorldObject source, uint entry, float maxSearchRange, bool spawnedOnly = true)
{
return source.FindNearestGameObject(entry, maxSearchRange, spawnedOnly);