mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Objects: Added GameObject type parameter to FindGameObjectOptions (#29356)
This commit is contained in:
@@ -468,6 +468,7 @@ struct FindGameObjectOptions
|
||||
|
||||
Optional<ObjectGuid> OwnerGuid;
|
||||
Optional<ObjectGuid> PrivateObjectOwnerGuid;
|
||||
Optional<GameobjectTypes> GameObjectType;
|
||||
};
|
||||
|
||||
class TC_GAME_API WorldObject : public Object, public WorldLocation
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user