mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
better optimized db and function for QuestItemStarterDB
Thanks @Loaal
This commit is contained in:
@@ -560,32 +560,27 @@ function GetThreatStatus(currentThreat, maxThreat)
|
||||
end
|
||||
end
|
||||
|
||||
function GetQuestItemStarterInfo(link)
|
||||
function GetQuestItemStarterInfo(itemLink)
|
||||
local isQuestItem, isQuestStarter, invalidQuestItem = false, false, false
|
||||
|
||||
if link then
|
||||
local itemType = select(6, GetItemInfo(match(link, "item:(%d+)")))
|
||||
if itemLink then
|
||||
local _, _, itemID = find(itemLink, "(%d+):")
|
||||
|
||||
if itemType and itemType == "Quest" then
|
||||
if QIS.QuestItemKeyIDs[itemID] then
|
||||
isQuestItem = true
|
||||
end
|
||||
|
||||
for _, info in pairs(QIS.QuestItemKeyIDs) do
|
||||
if match(link, "item:(%d+):") == info then
|
||||
else
|
||||
local _, _, _, _, _, itemType = GetItemInfo(itemID)
|
||||
if itemType == "Quest" then
|
||||
isQuestItem = true
|
||||
end
|
||||
end
|
||||
|
||||
for _, info in pairs(QIS.QuestItemStarterIDs) do
|
||||
if (match(link, "item:(%d+):") == info) then
|
||||
isQuestStarter = true
|
||||
end
|
||||
if QIS.QuestItemStarterIDs[itemID] then
|
||||
isQuestStarter = true
|
||||
end
|
||||
|
||||
for _, info in pairs(QIS.InvalidQuestItemIDs) do
|
||||
if match(link, "item:(%d+):") == info then
|
||||
invalidQuestItem = true
|
||||
end
|
||||
if QIS.InvalidQuestItemIDs[itemID] then
|
||||
invalidQuestItem = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user