diff --git a/Components/Core/Common/Item.lua b/Components/Core/Common/Item.lua index 11445601..8371106b 100644 --- a/Components/Core/Common/Item.lua +++ b/Components/Core/Common/Item.lua @@ -17,14 +17,18 @@ local TMW = TMW local L = TMW.L local print = TMW.print -local IsEquippedItem, GetItemCount, GetItemInfo, GetItemIcon, IsItemInRange - = IsEquippedItem, GetItemCount, GetItemInfo, GetItemIcon, IsItemInRange local GetInventoryItemTexture, GetInventoryItemCooldown, GetInventoryItemID, GetInventoryItemLink = GetInventoryItemTexture, GetInventoryItemCooldown, GetInventoryItemID, GetInventoryItemLink local tonumber, type, pairs, strfind, strmatch, ipairs, strtrim, error = tonumber, type, pairs, strfind, strmatch, ipairs, strtrim, error -local GetItemCooldown = GetItemCooldown or (C_Container and C_Container.GetItemCooldown) +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) +local IsEquippedItem = IsEquippedItem or (C_Item and C_Item.IsEquippedItem) +local GetItemCount = GetItemCount or (C_Item and C_Item.GetItemCount) +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) +local IsItemInRange = IsItemInRange or (C_Item and C_Item.IsItemInRange) +local GetItemCooldown = GetItemCooldown or (C_Item and C_Item.GetItemCooldown) or (C_Container and C_Container.GetItemCooldown) +local GetItemSpell = GetItemSpell or (C_Item and C_Item.GetItemSpell) local INVSLOT_LAST_EQUIPPED = INVSLOT_LAST_EQUIPPED diff --git a/Components/Core/Conditions/Categories/Spells.lua b/Components/Core/Conditions/Categories/Spells.lua index 913968a4..15e259c0 100644 --- a/Components/Core/Conditions/Categories/Spells.lua +++ b/Components/Core/Conditions/Categories/Spells.lua @@ -39,7 +39,7 @@ Env.GetSpellCooldown = GetSpellCooldown local GetSpellName = TMW.GetSpellName local GetSpellInfo = TMW.GetSpellInfo -local GetItemCooldown = GetItemCooldown or (C_Container and C_Container.GetItemCooldown) +local GetItemCooldown = GetItemCooldown or (C_Item and C_Item.GetItemCooldown) or (C_Container and C_Container.GetItemCooldown) function Env.CooldownDuration(spell, gcdAsUnusable) if spell == "gcd" then diff --git a/Components/Core/Spells/ItemCache.lua b/Components/Core/Spells/ItemCache.lua index 83328b5f..2f4106d4 100644 --- a/Components/Core/Spells/ItemCache.lua +++ b/Components/Core/Spells/ItemCache.lua @@ -31,6 +31,7 @@ local currentTimestamp = time() local doUpdateCache = true +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) local GetContainerNumSlots = C_Container and C_Container.GetContainerNumSlots or GetContainerNumSlots local GetContainerItemID = C_Container and C_Container.GetContainerItemID or GetContainerItemID local GetContainerItemLink = C_Container and C_Container.GetContainerItemLink or GetContainerItemLink diff --git a/Components/Core/Suggester/Suggester.lua b/Components/Core/Suggester/Suggester.lua index f9af42a6..a4739a30 100644 --- a/Components/Core/Suggester/Suggester.lua +++ b/Components/Core/Suggester/Suggester.lua @@ -29,8 +29,9 @@ local tonumber, tostring, type, pairs, ipairs, tinsert, tremove, sort, wipe, nex tonumber, tostring, type, pairs, ipairs, tinsert, tremove, sort, wipe, next, getmetatable, setmetatable, assert, rawget, rawset, unpack, select local strfind, strmatch, strbyte, format, gsub, strsub, strtrim, strlen, strsplit, strlower, max, min, floor, ceil, log10 = strfind, strmatch, strbyte, format, gsub, strsub, strtrim, strlen, strsplit, strlower, max, min, floor, ceil, log10 -local GetItemInfo, GetItemIcon = - GetItemInfo, GetItemIcon + +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) -- GLOBALS: GameTooltip, GameTooltip_SetDefaultAnchor diff --git a/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.lua b/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.lua index 14b2b2cc..faae28c0 100644 --- a/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.lua +++ b/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.lua @@ -17,6 +17,8 @@ local TMW = TMW local L = TMW.L local print = TMW.print +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) local SUG = TMW.SUG diff --git a/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.xml b/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.xml index 93f9dff0..8c57f745 100644 --- a/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.xml +++ b/Components/IconDataProcessorHooks/IconDataProcessorHook_Texture_CustomTex/Config.xml @@ -24,6 +24,7 @@ end) + local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) local GetSpellBookItemInfo = TMW.GetSpellBookItemInfo function self:DragReceived(icon, t, data, subType) local ics = icon:GetSettings() diff --git a/Components/IconTypes/IconType_cleu/cleu.lua b/Components/IconTypes/IconType_cleu/cleu.lua index 0aee8cce..2acfd9aa 100644 --- a/Components/IconTypes/IconType_cleu/cleu.lua +++ b/Components/IconTypes/IconType_cleu/cleu.lua @@ -18,12 +18,13 @@ local print = TMW.print local _G = _G local bit_band, bit_bor, tinsert, tremove, unpack, wipe = bit.band, bit.bor, tinsert, tremove, unpack, wipe -local UnitGUID, GetItemIcon, CombatLogGetCurrentEventInfo = - UnitGUID, GetItemIcon, CombatLogGetCurrentEventInfo +local UnitGUID, CombatLogGetCurrentEventInfo = + UnitGUID, CombatLogGetCurrentEventInfo local GetSpellInfo = TMW.GetSpellInfo local GetSpellTexture = TMW.GetSpellTexture local GetSpellLink = C_Spell and C_Spell.GetSpellLink or GetSpellLink +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) local pGUID = nil -- This can't be defined at load. local clientVersion = select(4, GetBuildInfo()) diff --git a/Components/IconTypes/IconType_conditionicon/conditionicon.lua b/Components/IconTypes/IconType_conditionicon/conditionicon.lua index 2dd5c326..903a4009 100644 --- a/Components/IconTypes/IconType_conditionicon/conditionicon.lua +++ b/Components/IconTypes/IconType_conditionicon/conditionicon.lua @@ -15,9 +15,8 @@ if not TMW then return end local L = TMW.L local print = TMW.print -local GetItemIcon = - GetItemIcon +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) local GetSpellBookItemInfo = TMW.GetSpellBookItemInfo local Type = TMW.Classes.IconType:New("conditionicon") diff --git a/Components/IconTypes/IconType_item/item.lua b/Components/IconTypes/IconType_item/item.lua index 02db909d..7aa5866e 100644 --- a/Components/IconTypes/IconType_item/item.lua +++ b/Components/IconTypes/IconType_item/item.lua @@ -17,11 +17,10 @@ local L = TMW.L local print = TMW.print local pairs, ipairs = pairs, ipairs -local GetItemInfo = - GetItemInfo local OnGCD = TMW.OnGCD local GetSpellTexture = TMW.GetSpellTexture +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) diff --git a/Components/IconTypes/IconType_unitcondition/unitcondition.lua b/Components/IconTypes/IconType_unitcondition/unitcondition.lua index 4236d235..eb89e095 100644 --- a/Components/IconTypes/IconType_unitcondition/unitcondition.lua +++ b/Components/IconTypes/IconType_unitcondition/unitcondition.lua @@ -15,9 +15,8 @@ if not TMW then return end local L = TMW.L local print = TMW.print -local GetItemIcon = - GetItemIcon +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) local GetSpellBookItemInfo = TMW.GetSpellBookItemInfo local Type = TMW.Classes.IconType:New("unitcondition") diff --git a/Components/IconTypes/IconType_wpnenchant/Config.lua b/Components/IconTypes/IconType_wpnenchant/Config.lua index 5dd3e658..a8144e01 100644 --- a/Components/IconTypes/IconType_wpnenchant/Config.lua +++ b/Components/IconTypes/IconType_wpnenchant/Config.lua @@ -20,6 +20,8 @@ local print = TMW.print local SUG = TMW.SUG local strlowerCache = TMW.strlowerCache local GetSpellTexture = TMW.GetSpellTexture +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) +local GetItemIcon = GetItemIcon or (C_Item and C_Item.GetItemIcon) local Type = rawget(TMW.Types, "wpnenchant") diff --git a/Components/IconTypes/IconType_wpnenchant/wpnenchant.lua b/Components/IconTypes/IconType_wpnenchant/wpnenchant.lua index e7cce9b5..990c7ac5 100644 --- a/Components/IconTypes/IconType_wpnenchant/wpnenchant.lua +++ b/Components/IconTypes/IconType_wpnenchant/wpnenchant.lua @@ -17,8 +17,10 @@ local L = TMW.L local print = TMW.print local _G, strmatch, strtrim, select, floor, ceil, pairs, wipe, type, max = _G, strmatch, strtrim, select, floor, ceil, pairs, wipe, type, max -local GetInventoryItemTexture, GetInventorySlotInfo, GetInventoryItemID, GetItemInfo, GetWeaponEnchantInfo = - GetInventoryItemTexture, GetInventorySlotInfo, GetInventoryItemID, GetItemInfo, GetWeaponEnchantInfo +local GetInventoryItemTexture, GetInventorySlotInfo, GetInventoryItemID, GetWeaponEnchantInfo = + GetInventoryItemTexture, GetInventorySlotInfo, GetInventoryItemID, GetWeaponEnchantInfo + +local GetItemInfo = GetItemInfo or (C_Item and C_Item.GetItemInfo) local strlowerCache = TMW.strlowerCache diff --git a/TellMeWhen.lua b/TellMeWhen.lua index 2ac01b0c..0bdb62da 100644 --- a/TellMeWhen.lua +++ b/TellMeWhen.lua @@ -1106,17 +1106,17 @@ function TMW:PLAYER_LOGIN() TMW:UnregisterEvent("PLAYER_LOGIN") TMW.PLAYER_LOGIN = nil - if not LibStub("DRList-1.0", true) then - StaticPopupDialogs["TMW_RESTARTNEEDED"] = { - text = L["ERROR_MISSINGFILE_NOREQ"], - button1 = OKAY, - timeout = 0, - showAlert = true, - whileDead = true, - preferredIndex = 3, -- http://forums.wowace.com/showthread.php?p=320956 - } - StaticPopup_Show("TMW_RESTARTNEEDED", TELLMEWHEN_VERSION_FULL, "TellMeWhen/Lib/DRList-1.0/DRList-1.0.lua") -- arg3 could also be L["ERROR_MISSINGFILE_REQFILE"] - end + -- if not LibStub("DRList-1.0", true) then + -- StaticPopupDialogs["TMW_RESTARTNEEDED"] = { + -- text = L["ERROR_MISSINGFILE_NOREQ"], + -- button1 = OKAY, + -- timeout = 0, + -- showAlert = true, + -- whileDead = true, + -- preferredIndex = 3, -- http://forums.wowace.com/showthread.php?p=320956 + -- } + -- StaticPopup_Show("TMW_RESTARTNEEDED", TELLMEWHEN_VERSION_FULL, "TellMeWhen/Lib/DRList-1.0/DRList-1.0.lua") -- arg3 could also be L["ERROR_MISSINGFILE_REQFILE"] + -- end