fix: fixed ammo count on magazines

This commit is contained in:
Yui 2024-10-29 19:19:16 -03:00
parent ee5bbbb098
commit 313763cfc4
Signed by: yui
GPG Key ID: F368D23A0ABA04B4

View File

@ -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;
}