IW4M-Admin/SharedLibraryCore/Commands/CommandExtensions.cs

15 lines
427 B
C#
Raw Permalink Normal View History

2022-01-26 11:32:16 -05:00
namespace SharedLibraryCore.Commands
{
public static class CommandExtensions
{
2022-01-26 11:32:16 -05:00
public static bool IsTargetingSelf(this GameEvent gameEvent)
{
return gameEvent.Origin?.Equals(gameEvent.Target) ?? false;
}
2022-01-26 11:32:16 -05:00
public static bool CanPerformActionOnTarget(this GameEvent gameEvent)
{
return gameEvent.Origin?.Level > gameEvent.Target?.Level;
}
}
2022-01-26 11:32:16 -05:00
}