Co-authored-by: RomanNovo <roman.novo.95@gmail.com>
This commit is contained in:
RomanNovo
2020-09-28 19:36:13 +03:00
committed by GitHub
parent 6770de75bf
commit 06d6bfe5e0

View File

@@ -352,6 +352,13 @@ namespace Content.Server.GameObjects.EntitySystems.Click
return;
}
// If in a container
if (ContainerHelpers.IsInContainer(player))
{
return;
}
// In a container where the attacked entity is not the container's owner
if (ContainerHelpers.TryGetContainer(player, out var playerContainer) &&
attacked != playerContainer.Owner)