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:
@ -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)}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user