Changed getKeyedItem, isKeyedItem to public functions
Deome [04-12-16 - 04:45]
Changed getKeyedItem, isKeyedItem to public functions
diff --git a/ddDataDaedra.lua b/ddDataDaedra.lua
index 74abf31..0450328 100644
--- a/ddDataDaedra.lua
+++ b/ddDataDaedra.lua
@@ -90,6 +90,7 @@ ddDataDaedra = {
["displayMsg"] = function() end,
["hooks"] = function() end,
["liminalBridge"] = function() end,
+ ["getKeyedItem"] = function() end,
}
@@ -277,42 +278,6 @@ local function getItemLinkFromSlotControl(slotControl)
end
end
-local function getKeyedItem(itemLink)
- local codex = ddDataDaedra.dataCairn.codex
- local PRICES = ddDataDaedra.dataCairn.prices
- local ItemId = parseLinkValue(itemLink, 3)
- local EnchtId = parseLinkValue(itemLink, 6)
- local Trait = parseItemLinkTrait(itemLink)
- local Level, VetRank = parseItemLinkLevel(itemLink)
- local Quality = parseItemLinkQuality(itemLink)
-
- if PRICES[ItemId] then
- if PRICES[ItemId][Trait] then
- if PRICES[ItemId][Trait][Quality] then
- if PRICES[ItemId][Trait][Quality][Level] then
- if PRICES[ItemId][Trait][Quality][Level][VetRank] then
- if PRICES[ItemId][Trait][Quality][Level][VetRank][EnchtId] then
- return PRICES[ItemId][Trait][Quality][Level][VetRank][EnchtId]
- end
- end
- end
- end
- end
- end
-
- return nil
-end
-
-local function isKeyedItem(itemLink)
- local KeyedItem = getKeyedItem(itemLink)
-
- if not KeyedItem then
- return false
- else
- return true
- end
-end
-
local function pendListing()
local twAvgSalePrice = ddDataDaedra.dataCairn.codex.cwAvgSalePrice.getFunc()
local tSaveSalePrice = ddDataDaedra.dataCairn.codex.cSaveSalePrice.getFunc()
@@ -1280,6 +1245,41 @@ end
---------------------------------------------------------------------------------------------------
+function ddDataDaedra:getKeyedItem(itemLink)
+ local codex = ddDataDaedra.dataCairn.codex
+ local PRICES = ddDataDaedra.dataCairn.prices
+ local ItemId = parseLinkValue(itemLink, 3)
+ local EnchtId = parseLinkValue(itemLink, 6)
+ local Trait = parseItemLinkTrait(itemLink)
+ local Level, VetRank = parseItemLinkLevel(itemLink)
+ local Quality = parseItemLinkQuality(itemLink)
+
+ if PRICES[ItemId] then
+ if PRICES[ItemId][Trait] then
+ if PRICES[ItemId][Trait][Quality] then
+ if PRICES[ItemId][Trait][Quality][Level] then
+ if PRICES[ItemId][Trait][Quality][Level][VetRank] then
+ if PRICES[ItemId][Trait][Quality][Level][VetRank][EnchtId] then
+ return PRICES[ItemId][Trait][Quality][Level][VetRank][EnchtId]
+ end
+ end
+ end
+ end
+ end
+ end
+
+ return nil
+end
+
+function ddDataDaedra:isKeyedItem(itemLink)
+ local KeyedItem = self:getKeyedItem(itemLink)
+
+ if not KeyedItem then
+ return false
+ else
+ return true
+ end
+end
function ddDataDaedra:displayMsg(msgString, boolDebug)
local CODEX = self.dataCairn.codex