diff --git a/AtlasLoot.toc b/AtlasLoot.toc index 7026087..362577f 100644 --- a/AtlasLoot.toc +++ b/AtlasLoot.toc @@ -1,9 +1,9 @@ ## Interface: 11200 ## Title: AtlasLoot |cff7fff7f TurtleWOW|r ## Notes: Shows possible loot from dungeon bosses and other sources. -## Author: Shagu (pfUI update code), Lexie (Turtle WoW fixes/updates), Otari (overhaul/revamp, menu changes, bugfixes/updates) +## Author: Otari (overhaul/revamp, menu changes, bugfixes/updates), Lexie (Turtle WoW fixes/updates), Pepopo, MarcelineVQ (Kara40 loot) ## LegacyAuthor: Daviesh, Pompa (Turtle WoW World Bosses), Xerron (Turtle WoW World Bosses), Gurky (Turtle WoW 1.16/1.16.1 Dungeons) -## Version: 3.1.8 +## Version: 3.1.9 ## SavedVariablesPerCharacter: AtlasLootCharDB ## OptionalDeps: Alphamap, AtlasLoader, LootLink, ItemSync, HewdropLib, Ace2, EquipCompare, EQCompare diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index 1a9a530..c6629d8 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -3310,32 +3310,6 @@ function AtlasLootItem_OnClick(arg1) end end -function AtlasLoot_IDFromLink(link) - if not link then - return nil - end - - local strsplit = function(str, delimiter) - local result = {} - local from = 1 - local delim_from, delim_to = string.find(str, delimiter, from, true) - while delim_from do - table.insert(result, string.sub(str, from, delim_from - 1)) - from = delim_to + 1 - delim_from, delim_to = string.find(str, delimiter, from, true) - end - table.insert(result, string.sub(str, from)) - return result - end - local itemSplit = strsplit(link, ":") - - if itemSplit[2] and tonumber(itemSplit[2]) then - return tonumber(itemSplit[2]) - end - - return nil -end - function AtlasLoot_CacheItem(linkOrID) if not linkOrID or linkOrID == 0 then return false @@ -3353,9 +3327,9 @@ function AtlasLoot_CacheItem(linkOrID) return false end if string.find(linkOrID, "|", 1, true) then - local _, _, itemLink = string.find(linkOrID, "(item:%d+:%d+:%d+:%d+)") - linkOrID = itemLink - if GetItemInfo(AtlasLoot_IDFromLink(linkOrID)) then + local _, _, id = string.find(linkOrID or "", "item:(%d+)") + linkOrID = tonumber(id) + if GetItemInfo(linkOrID) then return true end end