Mercurial > wow > inventory
diff Modules/Scanner.lua @ 240:24e71ed0a422
Added a default for when no addon was selected.
Scanner is now disabled when the item count addon returns an error code.
author | Zerotorescue |
---|---|
date | Sat, 12 Feb 2011 20:15:31 +0100 |
parents | 07263a435f3c |
children |
line wrap: on
line diff
--- a/Modules/Scanner.lua Wed Feb 09 21:53:26 2011 +0100 +++ b/Modules/Scanner.lua Sat Feb 12 20:15:31 2011 +0100 @@ -381,6 +381,12 @@ -- When restocking use the global item count, when refilling use the local local currentItemCount = ((isRestock and addon:GetItemCount(itemId, groupName)) or addon:GetLocalItemCount(itemId, groupName)); + if currentItemCount < 0 then + addon:Print("Inventorium auto refill from storage could not be executed; no valid item count addon detected.", addon.Colors.Red); + + return; + end + -- Check if we have enough items local (but only do so if this location also has enough available) local missingItems = (requiredItems - currentItemCount);