progress on vendor database

This commit is contained in:
Manuel Simon Hirsig
2016-03-20 18:40:18 +01:00
parent acc3da3f25
commit 83c9ba5bdb
5 changed files with 55 additions and 10 deletions
+5 -2
View File
@@ -47,6 +47,7 @@ function Aux.on_load()
end)
end
Aux.merchant.on_load()
Aux.item_cache.on_load()
Aux.persistence.on_load()
Aux.tooltip.on_load()
@@ -98,7 +99,8 @@ function Aux.on_addon_loaded()
for i=1,reagent_count do
local item_id, suffix_id = Aux.info.parse_hyperlink(GetCraftReagentItemLink(id, i))
local count = ({GetCraftReagentInfo(id, i)})[3]
local value = Aux.history.value(item_id..':'..suffix_id)
local _, price, unlimited = Aux.merchant.info(item_id)
local value = price and unlimited and price or Aux.history.value(item_id..':'..suffix_id)
if not value then
total_cost = nil
break
@@ -124,7 +126,8 @@ function Aux.on_addon_loaded()
for i=1,reagent_count do
local item_id, suffix_id = Aux.info.parse_hyperlink(GetTradeSkillReagentItemLink(id, i))
local count = ({GetTradeSkillReagentInfo(id, i)})[3]
local value = Aux.history.value(item_id..':'..suffix_id)
local _, price, unlimited = Aux.merchant.info(item_id)
local value = price and unlimited and price or Aux.history.value(item_id..':'..suffix_id)
if not value then
total_cost = nil
break