Core/Objects: Added GameObject type parameter to FindGameObjectOptions

Port From (https://github.com/TrinityCore/TrinityCore/commit/52102a6395bc6244bdcfa55e357425bd5c9aefc4)
This commit is contained in:
hondacrx
2024-02-01 10:12:19 -05:00
parent d68f52bdc3
commit c8ccacf6c6
2 changed files with 4 additions and 0 deletions
@@ -4088,5 +4088,6 @@ namespace Game.Entities
public ObjectGuid? OwnerGuid;
public ObjectGuid? PrivateObjectOwnerGuid;
public GameObjectTypes? GameObjectType;
}
}
+3
View File
@@ -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;
}