Core/Objects: Added GameObject type parameter to FindGameObjectOptions (#29356)

This commit is contained in:
Jeremy
2023-10-08 19:59:21 +02:00
committed by GitHub
parent 3db182b46f
commit 52102a6395
2 changed files with 4 additions and 0 deletions

View File

@@ -468,6 +468,7 @@ struct FindGameObjectOptions
Optional<ObjectGuid> OwnerGuid;
Optional<ObjectGuid> PrivateObjectOwnerGuid;
Optional<GameobjectTypes> GameObjectType;
};
class TC_GAME_API WorldObject : public Object, public WorldLocation

View File

@@ -1503,6 +1503,9 @@ namespace Trinity
if (i_args.IgnoreNotOwnedPrivateObjects && !go->CheckPrivateObjectOwnerVisibility(&i_obj))
return false;
if (i_args.GameObjectType && go->GetGoType() != i_args.GameObjectType)
return false;
i_customizer.Update(go);
return true;
}