fix: fixed ammo count on magazines
This commit is contained in:
parent
ee5bbbb098
commit
313763cfc4
|
@ -77,6 +77,12 @@ namespace LootValueEX.Extensions
|
||||||
if (item.TryGetItemComponent(out MedKitComponent medKitComponent))
|
if (item.TryGetItemComponent(out MedKitComponent medKitComponent))
|
||||||
return medKitComponent.HpResource;
|
return medKitComponent.HpResource;
|
||||||
return -1f;
|
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:
|
default:
|
||||||
return -1f;
|
return -1f;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user