Module:Items: Difference between revisions

_getItemStat: Fix silly mistake with default attackSpeed value
(_getItemStat: Use default attack speed for weapons without the attackSpeed property)
(_getItemStat: Fix silly mistake with default attackSpeed value)
Line 45: Line 45:
     if item.equipmentStats ~= nil and item.equipmentStats[StatName] ~= nil then
     if item.equipmentStats ~= nil and item.equipmentStats[StatName] ~= nil then
result = item.equipmentStats[StatName]
result = item.equipmentStats[StatName]
     elseif StatName == 'attackSpeed' and item.validSlots ~= nil and not Shared.contains(item.validSlots, 'Weapon') then
     elseif StatName == 'attackSpeed' and item.validSlots ~= nil and Shared.contains(item.validSlots, 'Weapon') then
-- Item can be equipped as a weapon but has no attack speed, so use default of 4000ms
-- Item can be equipped as a weapon but has no attack speed, so use default of 4000ms
result = 4000
result = 4000