changeset 96:1fbbe3b53f6e

API: added IAapi.GetItemCost
author Asa Ayers <Asa.Ayers@Gmail.com>
date Thu, 12 Aug 2010 07:11:57 -0700
parents 63823b6b5e28
children 028c02f1d47f
files CHANGELOG.txt Modules/Api.lua
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG.txt	Thu Aug 12 00:54:00 2010 -0700
+++ b/CHANGELOG.txt	Thu Aug 12 07:11:57 2010 -0700
@@ -1,3 +1,7 @@
+2010-08-12  Asa Ayers  <Asa.Ayers@Gmail.com>
+
+- API: added IAapi.GetItemCost
+
 2010-08-11  Asa Ayers  <Asa.Ayers@Gmail.com>
 
 - Fixed an issue where trading an item and gold in exchange for a different item was not considering the gold in the price of the new item.
--- a/Modules/Api.lua	Thu Aug 12 00:54:00 2010 -0700
+++ b/Modules/Api.lua	Thu Aug 12 07:11:57 2010 -0700
@@ -42,6 +42,13 @@
 	Crafting.UnRegisterQueueDestination(name)
 end
 
+function IAapi.GetItemCost(link)
+	assert(link, 'usage: IAapi.GetItemCost(itemLink)')
+	return ItemAuditor:GetItemCost(link)
+end
+
+
+
 local function registerLoadedAddons()
 	return ItemAuditor_RegisterAPI and ItemAuditor_RegisterAPI()
 end