From c8ccacf6c6b709559ab26e3be776b46178794aa2 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 1 Feb 2024 10:12:19 -0500 Subject: [PATCH] Core/Objects: Added GameObject type parameter to FindGameObjectOptions Port From (https://github.com/TrinityCore/TrinityCore/commit/52102a6395bc6244bdcfa55e357425bd5c9aefc4) --- Source/Game/Entities/Object/WorldObject.cs | 1 + Source/Game/Maps/GridNotifiers.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index 7a3a1e656..e1a649788 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -4088,5 +4088,6 @@ namespace Game.Entities public ObjectGuid? OwnerGuid; public ObjectGuid? PrivateObjectOwnerGuid; + public GameObjectTypes? GameObjectType; } } \ No newline at end of file diff --git a/Source/Game/Maps/GridNotifiers.cs b/Source/Game/Maps/GridNotifiers.cs index a1b2e217c..38aee94c3 100644 --- a/Source/Game/Maps/GridNotifiers.cs +++ b/Source/Game/Maps/GridNotifiers.cs @@ -2525,6 +2525,9 @@ namespace Game.Maps if (_args.IgnoreNotOwnedPrivateObjects && !go.CheckPrivateObjectOwnerVisibility(_obj)) return false; + if (_args.GameObjectType.HasValue && go.GetGoType() != _args.GameObjectType) + return false; + _customizer.Update(go); return true; }