Fixed bug where items with zero quantity have active children

This commit is contained in:
Stefan Zermatten
2022-10-09 10:10:21 +02:00
parent d4b7d22b5f
commit baecdeff24

View File

@@ -29,8 +29,8 @@ function childrenActive(prop){
// Children of disabled properties are always inactive
if (prop.disabled) return false;
switch (prop.type){
// Only equipped items have active children
case 'item': return !!prop.equipped;
// Only equipped items with non-zero quantity have active children
case 'item': return !!prop.equipped && prop.quantity !== 0;
// The children of actions, spells, and triggers are always inactive
case 'action': return false;
case 'spell': return false;