mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update QuestItemStarterDB.lua
This commit is contained in:
@@ -561,19 +561,41 @@ function GetThreatStatus(currentThreat, maxThreat)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GetQuestItemStarterInfo(link)
|
function GetQuestItemStarterInfo(link)
|
||||||
for _, info in pairs(QIS.QuestItemStarterIDs) do
|
local isQuestItem, isQuestStarter, invalidQuestItem = false, false, false
|
||||||
if match(link, "item:(%d+):") == info then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function GetInvalidQuestItemInfo(link)
|
if link then
|
||||||
for _, info in pairs(QIS.InvalidQuestItemIDs) do
|
local itemType = select(6, GetItemInfo(link))
|
||||||
if match(link, "item:(%d+):") == info then
|
|
||||||
return true
|
if itemType and itemType == "Quest" then
|
||||||
|
isQuestItem = true
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, info in pairs(QIS.QuestItemIDs) do
|
||||||
|
if match(link, "item:(%d+):") == info then
|
||||||
|
isQuestItem = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, info in pairs(QIS.QuestItemKeyIDs) do
|
||||||
|
if match(link, "item:(%d+):") == info then
|
||||||
|
isQuestItem = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, info in pairs(QIS.QuestItemStarterIDs) do
|
||||||
|
if (match(link, "item:(%d+):") == info) then
|
||||||
|
isQuestStarter = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, info in pairs(QIS.InvalidQuestItemIDs) do
|
||||||
|
if match(link, "item:(%d+):") == info then
|
||||||
|
invalidQuestItem = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return isQuestItem, isQuestStarter, invalidQuestItem
|
||||||
end
|
end
|
||||||
|
|
||||||
local LAST_ITEM_ID = 24283
|
local LAST_ITEM_ID = 24283
|
||||||
|
|||||||
@@ -215,8 +215,44 @@ lib.QuestItemStarterIDs = {
|
|||||||
"23184", -- Flame of Darnassus
|
"23184", -- Flame of Darnassus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Items that are quest items and they are not tagged as quest items.
|
||||||
|
lib.QuestItemIDs = {
|
||||||
|
"3082", -- Dargol's Skull
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Keys that are quest items and they are not tagged as quest items.
|
||||||
|
lib.QuestItemKeyIDs = {
|
||||||
|
"2629", -- Intrepid Strongbox Key
|
||||||
|
"2719", -- Small Brass Key
|
||||||
|
"3467", -- Dull Iron Key
|
||||||
|
"3499", -- Burnished Gold Key
|
||||||
|
"3704", -- Rusted Iron Key
|
||||||
|
"3930", -- Maury's Key
|
||||||
|
"4103", -- Shackle Key
|
||||||
|
"4483", -- Burning Key
|
||||||
|
"4484", -- Cresting Key
|
||||||
|
"4485", -- Thundering Key
|
||||||
|
"5089", -- Console Key
|
||||||
|
"5475", -- Wooden Key
|
||||||
|
"5050", -- Ignition Key
|
||||||
|
"5851", -- Cozzle's Key
|
||||||
|
"7923", -- Defias Tower Key
|
||||||
|
"8072", -- Silixiz's Tower Key
|
||||||
|
"9299", -- Thermaplugg's Safe Combination
|
||||||
|
"10757", -- Ward of the Defiler
|
||||||
|
"11079", -- Gor'tesh's Lopped Off Head
|
||||||
|
"12301", -- Bamboo Cage Key
|
||||||
|
"20022", -- Azure Key
|
||||||
|
}
|
||||||
|
|
||||||
-- For some reason these are tagged as quest items. They are not.
|
-- For some reason these are tagged as quest items. They are not.
|
||||||
lib.InvalidQuestItemIDs = {
|
lib.InvalidQuestItemIDs = {
|
||||||
|
"18169", -- Flame Mantle of the Dawn
|
||||||
|
"18170", -- Frost Mantle of the Dawn
|
||||||
|
"18171", -- Arcane Mantle of the Dawn
|
||||||
|
"18172", -- Nature Mantle of the Dawn
|
||||||
|
"18173", -- Shadow Mantle of the Dawn
|
||||||
|
"18182", -- Chromatic Mantle of the Dawn
|
||||||
"20076", -- Zandalar Signet of Mojo
|
"20076", -- Zandalar Signet of Mojo
|
||||||
"20078", -- Zandalar Signet of Serenity
|
"20078", -- Zandalar Signet of Serenity
|
||||||
"20077", -- Zandalar Signet of Might
|
"20077", -- Zandalar Signet of Might
|
||||||
|
|||||||
+14
-28
@@ -270,9 +270,10 @@ function B:UpdateSlot(bagID, slotID)
|
|||||||
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
|
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
|
||||||
slot.ignoreBorderColors = true
|
slot.ignoreBorderColors = true
|
||||||
elseif clink then
|
elseif clink then
|
||||||
local iLink, iLvl, iType, itemEquipLoc
|
local iLvl, iType, itemEquipLoc, _
|
||||||
slot.name, iLink, slot.rarity, iLvl, _, iType, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
|
slot.name, _, slot.rarity, iLvl, _, iType, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
|
||||||
|
|
||||||
|
local isQuestItem, isQuestStarter, invalidQuestItem = GetQuestItemStarterInfo(clink)
|
||||||
local r, g, b
|
local r, g, b
|
||||||
|
|
||||||
if slot.rarity then
|
if slot.rarity then
|
||||||
@@ -298,13 +299,12 @@ function B:UpdateSlot(bagID, slotID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- color slot according to item quality
|
-- color slot according to item quality
|
||||||
if (iType and iType == "Quest") and not GetInvalidQuestItemInfo(iLink) then
|
if isQuestStarter then
|
||||||
if GetQuestItemStarterInfo(iLink) then
|
slot.QuestIcon:Show()
|
||||||
slot.QuestIcon:Show()
|
slot:SetBackdropBorderColor(unpack(B.QuestColors.questStarter))
|
||||||
slot:SetBackdropBorderColor(unpack(B.QuestColors.questStarter))
|
slot.ignoreBorderColors = true
|
||||||
else
|
elseif (isQuestItem and not invalidQuestItem) or isQuestStarter then
|
||||||
slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
|
slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
|
||||||
end
|
|
||||||
slot.ignoreBorderColors = true
|
slot.ignoreBorderColors = true
|
||||||
elseif slot.rarity and slot.rarity > 1 then
|
elseif slot.rarity and slot.rarity > 1 then
|
||||||
slot:SetBackdropBorderColor(r, g, b)
|
slot:SetBackdropBorderColor(r, g, b)
|
||||||
@@ -670,15 +670,6 @@ function B:Layout(isBank)
|
|||||||
f.keyFrame.slots[i].cooldown:SetModelScale(buttonSize / (37 / 0.75))
|
f.keyFrame.slots[i].cooldown:SetModelScale(buttonSize / (37 / 0.75))
|
||||||
E:RegisterCooldown(f.keyFrame.slots[i].cooldown)
|
E:RegisterCooldown(f.keyFrame.slots[i].cooldown)
|
||||||
|
|
||||||
if not f.keyFrame.slots[i].QuestIcon then
|
|
||||||
local QuestIcon = f.keyFrame.slots[i]:CreateTexture(nil, "OVERLAY")
|
|
||||||
QuestIcon:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\bagQuestIcon")
|
|
||||||
QuestIcon:SetTexCoord(0, 1, 0, 1)
|
|
||||||
E:SetInside(QuestIcon)
|
|
||||||
QuestIcon:Hide()
|
|
||||||
f.keyFrame.slots[i].QuestIcon = QuestIcon
|
|
||||||
end
|
|
||||||
|
|
||||||
f.keyFrame.slots[i].iconTexture = _G[f.keyFrame.slots[i]:GetName().."IconTexture"]
|
f.keyFrame.slots[i].iconTexture = _G[f.keyFrame.slots[i]:GetName().."IconTexture"]
|
||||||
E:SetInside(f.keyFrame.slots[i].iconTexture, f.keyFrame.slots[i])
|
E:SetInside(f.keyFrame.slots[i].iconTexture, f.keyFrame.slots[i])
|
||||||
f.keyFrame.slots[i].iconTexture:SetTexCoord(unpack(E.TexCoords))
|
f.keyFrame.slots[i].iconTexture:SetTexCoord(unpack(E.TexCoords))
|
||||||
@@ -724,21 +715,16 @@ function B:UpdateKeySlot(slotID)
|
|||||||
|
|
||||||
if clink then
|
if clink then
|
||||||
local _, r, g, b
|
local _, r, g, b
|
||||||
local iLink, iType
|
|
||||||
|
|
||||||
slot.name, iLink, slot.rarity, _, _, iType = GetItemInfo(match(clink, "item:(%d+)"))
|
slot.name, _, slot.rarity = GetItemInfo(match(clink, "item:(%d+)"))
|
||||||
|
local isQuestItem, isQuestStarter, invalidQuestItem = GetQuestItemStarterInfo(clink)
|
||||||
|
|
||||||
if slot.rarity then
|
if slot.rarity then
|
||||||
r, g, b = GetItemQualityColor(slot.rarity)
|
r, g, b = GetItemQualityColor(slot.rarity)
|
||||||
end
|
end
|
||||||
|
|
||||||
if iType and iType == "Quest" then
|
if (isQuestItem and not invalidQuestItem) or isQuestStarter then
|
||||||
if GetQuestItemStarterInfo(iLink) then
|
slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
|
||||||
slot.QuestIcon:Show()
|
|
||||||
slot:SetBackdropBorderColor(unpack(B.QuestColors.questStarter))
|
|
||||||
else
|
|
||||||
slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
|
|
||||||
end
|
|
||||||
slot.ignoreBorderColors = true
|
slot.ignoreBorderColors = true
|
||||||
elseif slot.rarity and slot.rarity > 1 then
|
elseif slot.rarity and slot.rarity > 1 then
|
||||||
slot:SetBackdropBorderColor(r, g, b)
|
slot:SetBackdropBorderColor(r, g, b)
|
||||||
@@ -1519,7 +1505,7 @@ end
|
|||||||
|
|
||||||
function B:CreateSellFrame()
|
function B:CreateSellFrame()
|
||||||
B.SellFrame = CreateFrame("Frame", "ElvUIVendorGraysFrame", E.UIParent)
|
B.SellFrame = CreateFrame("Frame", "ElvUIVendorGraysFrame", E.UIParent)
|
||||||
E:Size(B.SellFrame, 200,40)
|
E:Size(B.SellFrame, 200, 40)
|
||||||
E:Point(B.SellFrame, "CENTER", E.UIParent)
|
E:Point(B.SellFrame, "CENTER", E.UIParent)
|
||||||
E:CreateBackdrop(B.SellFrame, "Transparent")
|
E:CreateBackdrop(B.SellFrame, "Transparent")
|
||||||
B.SellFrame:SetAlpha(E.db.bags.vendorGrays.progressBar and 1 or 0)
|
B.SellFrame:SetAlpha(E.db.bags.vendorGrays.progressBar and 1 or 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user