From 313763cfc4c66bb891f3c37d39781c0866f36e09 Mon Sep 17 00:00:00 2001 From: Yui Date: Tue, 29 Oct 2024 19:19:16 -0300 Subject: [PATCH] fix: fixed ammo count on magazines --- Plugin/Extensions/ItemExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugin/Extensions/ItemExtensions.cs b/Plugin/Extensions/ItemExtensions.cs index f7266e1..32134af 100644 --- a/Plugin/Extensions/ItemExtensions.cs +++ b/Plugin/Extensions/ItemExtensions.cs @@ -77,6 +77,12 @@ namespace LootValueEX.Extensions if (item.TryGetItemComponent(out MedKitComponent medKitComponent)) return medKitComponent.HpResource; return -1f; + case MagazineTemplate: + MagazineClass? magazineClass = item as MagazineClass; + return magazineClass != null ? magazineClass.Count : -1f; + case AmmoBoxTemplate: + AmmoBox? ammoBox = item as AmmoBox; + return ammoBox != null ? ammoBox.Count : -1f; default: return -1f; }