1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-14 09:08:32 -05:00

Additional zombie stast work

This commit is contained in:
RaidMax
2024-02-11 22:10:12 -06:00
parent 122b6dc79d
commit e1461582fa
45 changed files with 7663 additions and 292 deletions

View File

@ -1,10 +1,20 @@
using Data.Models.Client.Stats;
using System.Linq;
using Data.Models.Client.Stats;
namespace Stats.Helpers
{
public static class WeaponNameExtensions
{
public static string RebuildWeaponName(this EFClientHitStatistic stat) =>
$"{stat.Weapon?.Name}{string.Join("_", stat.WeaponAttachmentCombo?.Attachment1?.Name, stat.WeaponAttachmentCombo?.Attachment2?.Name, stat.WeaponAttachmentCombo?.Attachment3?.Name)}";
public static string RebuildWeaponName(this EFClientHitStatistic stat)
{
var attachments =
new[]
{
stat.WeaponAttachmentCombo?.Attachment1?.Name, stat.WeaponAttachmentCombo?.Attachment2?.Name,
stat.WeaponAttachmentCombo?.Attachment3?.Name
}.Where(a => !string.IsNullOrEmpty(a));
return $"{stat.Weapon?.Name?.Replace("zombie_", "").Replace("_zombie", "")}{string.Join("_", attachments)}";
}
}
}
}