diff --git a/Plugin/Extensions/ItemExtensions.cs b/Plugin/Extensions/ItemExtensions.cs index 937425c..f7266e1 100644 --- a/Plugin/Extensions/ItemExtensions.cs +++ b/Plugin/Extensions/ItemExtensions.cs @@ -4,7 +4,7 @@ using System.Text; using KeycardTemplate = GClass2623; using ArmorTemplate = GClass2550; using ArmoredRigTemplate = GClass2602; -using SimpleMedClass = GClass2631; +using MagazineTemplate = GClass2586; namespace LootValueEX.Extensions { @@ -30,6 +30,10 @@ namespace LootValueEX.Extensions return string.Empty; StringBuilder prehashString = new StringBuilder(); item.GetAllItems().Where(prop => !prop.Equals(item)).ExecuteForEach(prop => prehashString.Append(prop.GetCustomHash())); + if (item.Template.Equals(typeof(MagazineTemplate))){ + MagazineTemplate magTemplate = (MagazineTemplate)item.Template; + magTemplate.Cartridges.ExecuteForEach(prop => prop.Items.ExecuteForEach(ammo => prehashString.Append(ammo.GetCustomHash()))); + } string itemHashTemplate = string.Format("{0}|{1}|{2}|{3}", prehashString.ToString(), item.TemplateId, item.GetDurability(), item.GetUses()); return Utils.HashingUtils.ConvertToSha256(itemHashTemplate); }