diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua
index e4cdb02..03ae0b2 100644
--- a/!Compatibility/api/wowAPI.lua
+++ b/!Compatibility/api/wowAPI.lua
@@ -32,6 +32,7 @@ local TIMEMANAGER_PM = gsub(TIME_TWELVEHOURPM, "^.-(%w+)$", "%1")
local LBC = LibStub("LibBabble-Class-3.0"):GetLookupTable()
local LBZ = LibStub("LibBabble-Zone-3.0"):GetLookupTable()
local IFDB = LibStub("ItemFamilyDB")
+local QIS = LibStub("QuestItemStarterDB")
CLASS_SORT_ORDER = {
"WARRIOR",
@@ -559,6 +560,22 @@ function GetThreatStatus(currentThreat, maxThreat)
end
end
+function GetQuestItemStarterInfo(link)
+ for _, info in pairs(QIS.QuestItemStarterIDs) do
+ if match(link, "item:(%d+):") == info then
+ return true
+ end
+ end
+end
+
+function GetInvalidQuestItemInfo(link)
+ for _, info in pairs(QIS.InvalidQuestItemIDs) do
+ if match(link, "item:(%d+):") == info then
+ return true
+ end
+ end
+end
+
local LAST_ITEM_ID = 24283
local itemInfoDB = {}
diff --git a/!Compatibility/libs/QuestItemStarterDB.lua b/!Compatibility/libs/QuestItemStarterDB.lua
new file mode 100644
index 0000000..95e8aed
--- /dev/null
+++ b/!Compatibility/libs/QuestItemStarterDB.lua
@@ -0,0 +1,317 @@
+local MAJOR_VERSION = "QuestItemStarterDB"
+local MINOR_VERSION = 90000 + tonumber(string.match("$Revision: 1 $", "%d+"))
+
+local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
+if not lib then return end
+
+lib.QuestItemStarterIDs = {
+ "1307", -- Gold Pickup Schedule
+ "1357", -- Captain Sanders' Treasure Map
+ "1962", -- Glowing Shadowhide Pendant
+ "1971", -- Furlbrow's Deed
+ "1972", -- Westfall Deed
+ "2794", -- An Old History Book
+ "2837", -- Thurman's Letter
+ "2839", -- A Letter to Yvette
+ "2874", -- An Unsent Letter
+ "3082", -- Dargol's Skull
+ "3317", -- A Talking Head
+ "3668", -- Assassin's Contract
+ "3706", -- Ensorcelled Parchment
+ "3985", -- Monogrammed Sash
+ "4056", -- Cortello's Riddle
+ "4098", -- Carefully Folded Note
+ "4433", -- Waterlogged Envelope
+ "4613", -- Corroded Black Box
+ "4614", -- Pendant of Myzrael
+ "4854", -- Demon Scarred Cloak
+ "4881", -- Aged Envelope
+ "4903", -- Eye of Burning Shadow
+ "4926", -- Chen's Empty Keg
+ "5102", -- Owatanka's Tailspike
+ "5103", -- Washte Pawne's Feather
+ "5099", -- Hoof of Lakota'mani
+ "5138", -- Harvester's Head
+ "5179", -- Moss-Twined Heart
+ "5352", -- Book: The Powers Below
+ "5790", -- Lonebrow's Journal
+ "5877", -- Cracked Silithid Carapace
+ "6172", -- Lost Supplies
+ "6196", -- Noboru's Cudgel
+ "6497", -- Simple Parchment
+ "6775", -- Tome of Divinity
+ "6776", -- Tome of Valor
+ "6916", -- Tome of Divinity
+ "7666", -- Shattered Necklace
+ "8244", -- Flawless Draenethyst Sphere
+ "8524", -- Model 4711-FTZ Power Source
+ "8623", -- OOX-17/TN Distress Beacon
+ "8704", -- OOX-09/HL Distress Beacon
+ "8705", -- OOX-22/FE Distress Beacon
+ "9250", -- Ship Schedule
+ "9254", -- Cuergo's Treasure Map
+ "9326", -- Grime-Encrusted Ring
+ "9370", -- Gordunni Scroll
+ "10000", -- Margol's Horn
+ "10441", -- Glowing Shard
+ "10454", -- Essence of Eranikus
+ "10589", -- Oathstone of Ysera's Dragonflight
+ "10593", -- Imperfect Draenethyst Fragment
+ "10621", -- Runed Scroll
+ "11116", -- A Mangled Journal
+ "11463", -- Undelivered Parcel
+ "11668", -- Flute of Xavaric
+ "11818", -- Grimesilt Outhouse Key
+ "12563", -- Warlord Goretooth's Command
+ "12564", -- Assassination Note
+ "12558", -- Blue-feathered Necklace
+ "12771", -- Empty Firewater Flask
+ "12780", -- General Drakkisath's Command
+ "12842", -- Crudely-Written Log
+ "13140", -- Blood Red Key
+ "13250", -- Head of Balnazzar
+ "13920", -- Healthy Dragon Scale
+ "14646", -- Goldshire Gift Voucher
+ "14647", -- Kharanos Gift Voucher
+ "14648", -- Dolanaar Gift Voucher
+ "14649", -- Razor Hill Gift Voucher
+ "14650", -- Bloodhoof Village Gift Voucher
+ "14651", -- Brill Gift Voucher
+ "16303", -- Ursangous' Paw
+ "16304", -- Shadumbra's Head
+ "16305", -- Sharptalon's Claw
+ "16408", -- Befouled Water Globe
+ "16790", -- Damp Note
+ "16782", -- Strange Water Globe
+ "17008", -- Small Scroll
+ "17126", -- Elegant Letter
+ "18356", -- Garona: A Study on Stealth and Treachery
+ "18357", -- Codex of Defense
+ "18358", -- The Arcanist's Cookbook
+ "18359", -- The Light and How to Swing It
+ "18360", -- Harnessing Shadows
+ "18361", -- The Greatest Race of Hunters
+ "18362", -- Holy Bologna: What the Light Won't Tell You
+ "18363", -- Frost Shock and You
+ "18364", -- The Emerald Dream
+ "18401", -- Foror's Compendium of Dragon Slaying
+ "18422", -- Head of Onyxia
+ "18423", -- Head of Onyxia
+ "18565", -- Vessel of Rebirth DEPRECATED
+ "18628", -- Thorium Brotherhood Contract
+ "18703", -- Ancient Petrified Leaf
+ "18706", -- Arena Master
+ "18769", -- Enchanted Thorium Platemail
+ "18770", -- Enchanted Thorium Platemail
+ "18771", -- Enchanted Thorium Platemail
+ "18950", -- Chambermaid Pillaclencher's Pillow
+ "18972", -- Perfect Yeti Hide
+ "18969", -- Pristine Yeti Hide
+ "18987", -- Blackhand's Command
+ "19002", -- Head of Nefarian
+ "19003", -- Head of Nefarian
+ "19802", -- Heart of Hakkar
+ "19016", -- Vessel of Rebirth
+ "19018", -- Dormant Wind Kissed Blade
+ "19228", -- Beasts Deck
+ "19267", -- Elementals Deck
+ "19257", -- Warlords Deck
+ "19277", -- Portals Deck
+ "19423", -- Sayge's Fortune #23
+ "19424", -- Sayge's Fortune #24
+ "19443", -- Sayge's Fortune #25
+ "19452", -- Sayge's Fortune #27
+ "20310", -- Flayed Demon Skin
+ "20461", -- Brann Bronzebeard's Lost Letter
+ "20483", -- Tainted Arcane Sliver
+ "20644", -- Nightmare Engulfed Object
+ "20741", -- Deadwood Ritual Totem
+ "20742", -- Winterfall Ritual Totem
+ "20765", -- Incriminating Documents
+ "20806", -- Logistics Task Briefing X
+ "20807", -- Logistics Task Briefing I
+ "20938", -- Falconwing Square Gift Voucher
+ "20939", -- Logistics Task Briefing II
+ "20940", -- Logistics Task Briefing III
+ "20941", -- Combat Task Briefing XII
+ "20942", -- Combat Task Briefing III
+ "20943", -- Tactical Task Briefing X
+ "20944", -- Tactical Task Briefing IX
+ "20945", -- Tactical Task Briefing II
+ "20947", -- Tactical Task Briefing IV
+ "20948", -- Tactical Task Briefing V
+ "20949", -- Magical Ledger
+ "21165", -- Tactical Task Briefing VI
+ "21166", -- Tactical Task Briefing VII
+ "21167", -- Tactical Task Briefing VIII
+ "21220", -- Head of Ossirian the Unscarred
+ "21221", -- Eye of C'Thun
+ "21230", -- Ancient Qiraji Artifact
+ "21245", -- Tactical Task Briefing I
+ "21248", -- Combat Task Briefing IV
+ "21249", -- Combat Task Briefing V
+ "21250", -- Combat Task Briefing VI
+ "21251", -- Combat Task Briefing VII
+ "21252", -- Combat Task Briefing VIII
+ "21253", -- Combat Task Briefing IX
+ "21255", -- Combat Task Briefing X
+ "21256", -- Combat Task Briefing XI
+ "21257", -- Logistics Task Briefing IV
+ "21258", -- Logistics Task Briefing IV
+ "21259", -- Logistics Task Briefing V
+ "21260", -- Logistics Task Briefing VI
+ "21261", -- Logistics Task Briefing VI
+ "21262", -- Logistics Task Briefing VIII
+ "21263", -- Logistics Task Briefing VII
+ "21264", -- Logistics Task Briefing VII
+ "21265", -- Logistics Task Briefing IX
+ "21378", -- Logistics Task Briefing I
+ "21379", -- Logistics Task Briefing II
+ "21380", -- Logistics Task Briefing III
+ "21381", -- Logistics Task Briefing IX
+ "21382", -- Logistics Task Briefing V
+ "21384", -- Logistics Task Briefing VIII
+ "21385", -- Logistics Task Briefing X
+ "21514", -- Logistics Task Briefing XI
+ "21749", -- Combat Task Briefing I
+ "21750", -- Combat Task Briefing II
+ "21751", -- Tactical Task Briefing III
+ "21776", -- Captain Kelisendra's Lost Rutters
+ "22520", -- The Phylactery of Kel'Thuzad
+ "22597", -- The Lady's Necklace
+ "22600", -- Craftsman's Writ - Dense Weightstone
+ "22601", -- Craftsman's Writ - Imperial Plate Chest
+ "22602", -- Craftsman's Writ - Volcanic Hammer
+ "22603", -- Craftsman's Writ - Huge Thorium Battleaxe
+ "22604", -- Craftsman's Writ - Radiant Circlet
+ "22605", -- Craftsman's Writ - Wicked Leather Headband
+ "22606", -- Craftsman's Writ - Rugged Armor Kit
+ "22607", -- Craftsman's Writ - Wicked Leather Belt
+ "22608", -- Craftsman's Writ - Runic Leather Pants
+ "22609", -- Craftsman's Writ - Brightcloth Pants
+ "22610", -- Craftsman's Writ - Runecloth Boots
+ "22611", -- Craftsman's Writ - Runecloth Bag
+ "22612", -- Craftsman's Writ - Runecloth Robe
+ "22613", -- Craftsman's Writ - Goblin Sapper Charge
+ "22614", -- Craftsman's Writ - Thorium Grenade
+ "22615", -- Craftsman's Writ - Gnomish Battle Chicken
+ "22616", -- Craftsman's Writ - Thorium Tube
+ "22617", -- Craftsman's Writ - Major Mana Potion
+ "22618", -- Craftsman's Writ - Major Healing Potion
+ "22620", -- Craftsman's Writ - Greater Arcane Protection Potion
+ "22621", -- Craftsman's Writ - Potion of Petrification
+ "22622", -- Craftsman's Writ - Stonescale Eel
+ "22623", -- Craftsman's Writ - Plated Armorfish
+ "22624", -- Craftsman's Writ - Lightning Eel
+ "22719", -- Omarion's Handbook
+ "22727", -- Frame of Atiesh
+ "22723", -- A Letter from the Keeper of the Rolls
+ "22888", -- Azure Watch Gift Voucher
+ "22970", -- A Bloodstained Envelope
+ "22977", -- A Torn Letter
+ "22972", -- A Careworn Note
+ "22973", -- A Crumpled Missive
+ "22974", -- A Ragged Page
+ "22975", -- A Smudged Document
+ "23179", -- Flame of Orgrimmar
+ "23180", -- Flame of Thunder Bluff
+ "23181", -- Flame of the Undercity
+ "23182", -- Flame of Stormwind
+ "23183", -- Flame of Ironforge
+ "23184", -- Flame of Darnassus
+ "23228", -- Old Whitebark's Pendant
+ "23249", -- Amani Invasion Plans
+ "23338", -- Eroded Leather Case
+ "23580", -- Avruu's Orb
+ "23678", -- Faintly Glowing Crystal
+ "23759", -- Rune Covered Tablet
+ "23777", -- Diabolical Plans
+ "23797", -- Diabolical Plans
+ "23837", -- Weathered Treasure Map
+ "23850", -- Gurf's Dignity
+ "23870", -- Red Crystal Pendant
+ "23890", -- Ominous Letter
+ "23892", -- Ominous Letter
+ "23900", -- Tzerak's Armor Plate
+ "23910", -- Blood Elf Communication
+ "24132", -- A Letter from the Admiral
+ "24330", -- Drain Schematics
+ "24367", -- Orders from Lady Vashj
+ "24407", -- Uncatalogued Species
+ "24414", -- Blood Elf Plans
+ "24483", -- Withered Basidium
+ "24484", -- Withered Basidium
+ "24504", -- Howling Wind
+ "24558", -- Murkblood Invasion Plans
+ "24559", -- Murkblood Invasion Plans
+ "25459", -- "Count" Ungula's Mandible
+ "25705", -- Luanga's Orders
+ "25706", -- Luanga's Orders
+ "28552", -- A Mysterious Tome
+ "29233", -- Dathric's Blade
+ "29234", -- Belmara's Tome
+ "29235", -- Luminrath's Mantle
+ "29236", -- Cohlien's Cap
+ "29476", -- Crimson Crystal Shard
+ "29589", -- Burning Legion Missive
+ "29738", -- Vial of Void Horror Ooze
+ "30431", -- Thunderlord Clan Artifact
+ "30756", -- Illidari-Bane Shard
+ "30579", -- Illidari-Bane Shard
+ "31120", -- Meeting Note
+ "31239", -- Primed Key Mold
+ "31241", -- Primed Key Mold
+ "31345", -- The Journal of Val'zareq
+ "31363", -- Gorgrom's Favor
+ "31384", -- Damaged Mask
+ "31489", -- Orb of the Grishna
+ "31707", -- Cabal Orders
+ "31890", -- Blessings Deck
+ "31891", -- Storms Deck
+ "31907", -- Furies Deck
+ "31914", -- Lunacy Deck
+ "32385", -- Magtheridon's Head
+ "32386", -- Magtheridon's Head
+ "32405", -- Verdant Sphere
+ "32523", -- Ishaal's Almanac
+ "32621", -- Partially Digested Hand
+ "32726", -- Murkblood Escape Plans
+ "33102", -- Blood of Zul'jin
+ "33114", -- Sealed Letter
+ "33115", -- Sealed Letter
+ "33978", -- "Honorary Brewer" Hand Stamp
+ "34028", -- "Honorary Brewer" Hand Stamp
+ "34469", -- Strange Engine Part
+ "35568", -- Flame of Silvermoon
+ "35569", -- Flame of the Exodar
+ "35723", -- Shards of Ahune
+ "37571", -- "Brew of the Month" Club Membership Form
+ "37599", -- "Brew of the Month" Club Membership Form
+ "38280", -- Direbrew's Dire Brew
+ "38281", -- Direbrew's Dire Brew
+}
+
+-- For some reason these are tagged as quest items. They are not.
+lib.InvalidQuestItemIDs = {
+ "20076", -- Zandalar Signet of Mojo
+ "20078", -- Zandalar Signet of Serenity
+ "20077", -- Zandalar Signet of Might
+ "23545", -- Power of the Scourge
+ "23547", -- Resilience of the Scourge
+ "23548", -- Might of the Scourge
+ "23549", -- Fortitude of the Scourge
+ "28886", -- Greater Inscription of Discipline
+ "28887", -- Greater Inscription of Faith
+ "28888", -- Greater Inscription of Vengeance
+ "28889", -- Greater Inscription of Warding
+ "29186", -- Glyph of the Defender
+ "29189", -- Glyph of Renewal
+ "29190", -- Glyph of Renewal
+ "29191", -- Glyph of Power
+ "29192", -- Glyph of Ferocity
+ "30846", -- Glyph of the Outcast
+ "35728", -- Greater Inscription of the Blade
+ "35729", -- Greater Inscription of the Knight
+ "35730", -- Greater Inscription of the Oracle
+ "35731", -- Greater Inscription of the Orb
+}
\ No newline at end of file
diff --git a/!Compatibility/libs/libs.xml b/!Compatibility/libs/libs.xml
index 4f566ec..7fd5baa 100644
--- a/!Compatibility/libs/libs.xml
+++ b/!Compatibility/libs/libs.xml
@@ -4,4 +4,5 @@
+
\ No newline at end of file
diff --git a/ElvUI/Media/Textures/bagJunkIcon.blp b/ElvUI/Media/Textures/bagJunkIcon.blp
new file mode 100644
index 0000000..e525f15
Binary files /dev/null and b/ElvUI/Media/Textures/bagJunkIcon.blp differ
diff --git a/ElvUI/Media/Textures/bagQuestIcon.tga b/ElvUI/Media/Textures/bagQuestIcon.tga
new file mode 100644
index 0000000..a520bbf
Binary files /dev/null and b/ElvUI/Media/Textures/bagQuestIcon.tga differ
diff --git a/ElvUI/Modules/Bags/Bags.lua b/ElvUI/Modules/Bags/Bags.lua
index eed321d..a60ea02 100644
--- a/ElvUI/Modules/Bags/Bags.lua
+++ b/ElvUI/Modules/Bags/Bags.lua
@@ -8,8 +8,8 @@ local LIP = LibStub("ItemPrice-1.1");
local _G = _G
local type, ipairs, pairs, unpack, select, assert, pcall = type, ipairs, pairs, unpack, select, assert, pcall
local tinsert, tremove, twipe, tmaxn = table.insert, table.remove, table.wipe, table.maxn
-local floor = math.floor
-local len, gsub, sub, match = string.len, string.gsub, string.sub, string.match
+local floor, abs, mod = math.floor, math.abs, math.fmod
+local format, len, match, sub, gsub = string.format, string.len, string.match, string.sub, string.gsub
--WoW API / Variables
local BankFrameItemButton_OnUpdate = BankFrameItemButton_OnUpdate
local BankFrameItemButton_UpdateLock = BankFrameItemButton_UpdateLock
@@ -23,45 +23,39 @@ local GetContainerItemLink = GetContainerItemLink
local GetContainerNumSlots = GetContainerNumSlots
local GetItemInfo = GetItemInfo
local GetItemQualityColor = GetItemQualityColor
-local GetKeyRingSize = GetKeyRingSize
local GetMoney = GetMoney
local GetNumBankSlots = GetNumBankSlots
+local GetKeyRingSize = GetKeyRingSize
+local GetScreenWidth, GetScreenHeight = GetScreenWidth, GetScreenHeight
local IsBagOpen, IsOptionFrameOpen = IsBagOpen, IsOptionFrameOpen
-local IsControlKeyDown = IsControlKeyDown
+local IsShiftKeyDown, IsControlKeyDown = IsShiftKeyDown, IsControlKeyDown
local PickupContainerItem = PickupContainerItem
-local PickupMerchantItem = PickupMerchantItem
local PlaySound = PlaySound
+local PutItemInBag = PutItemInBag
local SetItemButtonCount = SetItemButtonCount
local SetItemButtonDesaturated = SetItemButtonDesaturated
local SetItemButtonTexture = SetItemButtonTexture
local SetItemButtonTextureVertexColor = SetItemButtonTextureVertexColor
local ToggleFrame = ToggleFrame
local UseContainerItem = UseContainerItem
-
+local BANK_CONTAINER = BANK_CONTAINER
local CONTAINER_OFFSET_X, CONTAINER_OFFSET_Y = CONTAINER_OFFSET_X, CONTAINER_OFFSET_Y
local CONTAINER_SCALE = CONTAINER_SCALE
local CONTAINER_SPACING, VISIBLE_CONTAINER_SPACING = CONTAINER_SPACING, VISIBLE_CONTAINER_SPACING
local CONTAINER_WIDTH = CONTAINER_WIDTH
-local BANK_CONTAINER = BANK_CONTAINER
local KEYRING_CONTAINER = KEYRING_CONTAINER
local MAX_CONTAINER_ITEMS = MAX_CONTAINER_ITEMS
local NUM_BAG_FRAMES = NUM_BAG_FRAMES
+local NUM_BANKGENERIC_SLOTS = NUM_BANKGENERIC_SLOTS
local NUM_CONTAINER_FRAMES = NUM_CONTAINER_FRAMES
local BINDING_NAME_TOGGLEKEYRING = BINDING_NAME_TOGGLEKEYRING
local SEARCH = SEARCH
+local TooltipModule, SkinModule
local SEARCH_STRING = ""
-B.ProfessionColors = {
- [1] = {225/255, 175/255, 105/255}, -- Quiver
- [2] = {225/255, 175/255, 105/255}, -- Ammo Pouch
- [4] = {225/255, 175/255, 105/255}, -- Soul Bag
- [8] = {18/255, 181/255, 32/255}, -- Herbalism
- [16] = {160/255, 3/255, 168/255}, -- Enchanting
-}
-
function B:GetContainerFrame(arg)
- if type(arg) == "boolean" and arg == true then
+ if type(arg) == "boolean" and (arg == true) then
return self.BankFrame
elseif type(arg) == "number" then
if self.BankFrame then
@@ -110,21 +104,19 @@ function B:SearchReset()
end
function B:IsSearching()
- if SEARCH_STRING ~= "" and SEARCH_STRING ~= SEARCH then
- return true
- end
- return false
+ return (SEARCH_STRING ~= "" and SEARCH_STRING ~= SEARCH)
end
function B:UpdateSearch()
if this.Instructions then this.Instructions:SetShown(this:GetText() == "") end
+
local MIN_REPEAT_CHARACTERS = 3
local searchString = this:GetText()
local prevSearchString = SEARCH_STRING
if len(searchString) > MIN_REPEAT_CHARACTERS then
local repeatChar = true
for i = 1, MIN_REPEAT_CHARACTERS, 1 do
- if sub(searchString,(0-i), (0-i)) ~= sub(searchString,(-1-i),(-1-i)) then
+ if sub(searchString,(0 - i), (0 - i)) ~= sub(searchString,(-1 - i),(-1 - i)) then
repeatChar = false
break
end
@@ -193,7 +185,7 @@ function B:SetSearch(query)
button:SetAlpha(1)
else
SetItemButtonDesaturated(button, 1)
- button:SetAlpha(0.4)
+ button:SetAlpha(0.5)
end
end
end
@@ -201,6 +193,7 @@ end
function B:UpdateItemLevelDisplay()
if E.private.bags.enable ~= true then return end
+
for _, bagFrame in pairs(self.BagFrames) do
for _, bagID in ipairs(bagFrame.BagIDs) do
for slotID = 1, GetContainerNumSlots(bagID) do
@@ -231,6 +224,7 @@ function B:UpdateCountDisplay()
end
end
end
+
if bagFrame.UpdateAllSlots then
bagFrame:UpdateAllSlots()
end
@@ -261,20 +255,23 @@ function B:UpdateSlot(bagID, slotID)
local slot = self.Bags[bagID][slotID]
local bagType = self.Bags[bagID].type
- local texture, count, locked = GetContainerItemInfo(bagID, slotID)
+ local texture, count, locked, _, readable = GetContainerItemInfo(bagID, slotID)
local clink = GetContainerItemLink(bagID, slotID)
+ local itemPrice = LIP:GetSellValue(clink)
slot.name, slot.rarity = nil, nil
slot:Show()
+ slot.QuestIcon:Hide()
+ slot.JunkIcon:Hide()
slot.itemLevel:SetText("")
if B.ProfessionColors[bagType] then
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
slot.ignoreBorderColors = true
elseif clink then
- local _, iLvl, itemEquipLoc
- slot.name, _, slot.rarity, iLvl, _, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
+ local iLink, iLvl, iType, itemEquipLoc
+ slot.name, iLink, slot.rarity, iLvl, _, iType, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
local r, g, b
@@ -294,8 +291,22 @@ function B:UpdateSlot(bagID, slotID)
end
end
+ if slot.JunkIcon then
+ if (slot.rarity and slot.rarity == 0) and (itemPrice and itemPrice > 0) and (iType and iType ~= "Quest") and E.db.bags.junkIcon then
+ slot.JunkIcon:Show()
+ end
+ end
+
-- color slot according to item quality
- if slot.rarity and slot.rarity > 1 then
+ if (iType and iType == "Quest") and not GetInvalidQuestItemInfo(iLink) then
+ if GetQuestItemStarterInfo(iLink) then
+ slot.QuestIcon:Show()
+ slot:SetBackdropBorderColor(unpack(B.QuestColors.questStarter))
+ else
+ slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
+ end
+ slot.ignoreBorderColors = true
+ elseif slot.rarity and slot.rarity > 1 then
slot:SetBackdropBorderColor(r, g, b)
slot.ignoreBorderColors = true
else
@@ -311,6 +322,11 @@ function B:UpdateSlot(bagID, slotID)
if bagID ~= BANK_CONTAINER then
local start, duration, enable = GetContainerItemCooldown(bagID, slotID)
CooldownFrame_SetTimer(slot.cooldown, start, duration, enable)
+ if duration > 0 and enable == 0 then
+ SetItemButtonTextureVertexColor(slot, 0.4, 0.4, 0.4)
+ else
+ SetItemButtonTextureVertexColor(slot, 1, 1, 1)
+ end
end
slot.hasItem = 1
else
@@ -320,6 +336,8 @@ function B:UpdateSlot(bagID, slotID)
slot.hasItem = nil
end
+ slot.readable = readable
+
SetItemButtonTexture(slot, texture)
SetItemButtonCount(slot, count)
SetItemButtonDesaturated(slot, locked)
@@ -345,7 +363,8 @@ end
function B:SortingFadeBags(bagFrame)
if not (bagFrame and bagFrame.BagIDs) then return end
- for _, bagID in ipairs(bagFrame.BagIDs) do
+
+ for _, bagID in ipairs(bagFrame.BagIDs) do
for slotID = 1, GetContainerNumSlots(bagID) do
local button = bagFrame.Bags[bagID][slotID]
SetItemButtonDesaturated(button, 1)
@@ -360,11 +379,6 @@ function B:UpdateCooldowns()
for slotID = 1, GetContainerNumSlots(bagID) do
local start, duration, enable = GetContainerItemCooldown(bagID, slotID)
CooldownFrame_SetTimer(self.Bags[bagID][slotID].cooldown, start, duration, enable)
- if duration > 0 and enable == 0 then
- SetItemButtonTextureVertexColor(self.Bags[bagID][slotID], 0.4, 0.4, 0.4)
- else
- SetItemButtonTextureVertexColor(self.Bags[bagID][slotID], 1, 1, 1)
- end
end
end
end
@@ -444,7 +458,7 @@ function B:Layout(isBank)
end
--Bag Containers
- if (not isBank and bagID <= 3 ) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)) then
+ if (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)) then
if not f.ContainerHolder[i] then
if isBank then
f.ContainerHolder[i] = CreateFrame("CheckButton", "ElvUIBankBag"..bagID - 4, f.ContainerHolder, "BankItemButtonBagTemplate")
@@ -464,7 +478,7 @@ function B:Layout(isBank)
f.ContainerHolder[i].backdrop:SetAllPoints()
E:StyleButton(f.ContainerHolder[i])
f.ContainerHolder[i]:SetNormalTexture("")
- f.ContainerHolder[i]:SetCheckedTexture("")
+ f.ContainerHolder[i]:SetCheckedTexture(nil)
f.ContainerHolder[i]:SetPushedTexture("")
f.ContainerHolder[i].id = isBank and bagID or bagID + 1
@@ -515,9 +529,9 @@ function B:Layout(isBank)
f.Bags[bagID].type = GetItemFamily(GetInventoryItemLink("player", ContainerIDToInventoryID(bagID)), true)
--Hide unused slots
- for i = 1, MAX_CONTAINER_ITEMS do
- if f.Bags[bagID][i] then
- f.Bags[bagID][i]:Hide()
+ for y = 1, MAX_CONTAINER_ITEMS do
+ if f.Bags[bagID][y] then
+ f.Bags[bagID][y]:Hide()
end
end
@@ -528,20 +542,38 @@ function B:Layout(isBank)
E:StyleButton(f.Bags[bagID][slotID])
E:SetTemplate(f.Bags[bagID][slotID], "Default", true)
f.Bags[bagID][slotID]:SetNormalTexture("")
- f.Bags[bagID][slotID]:SetCheckedTexture("")
+ f.Bags[bagID][slotID]:SetCheckedTexture(nil)
f.Bags[bagID][slotID].Count = _G[f.Bags[bagID][slotID]:GetName().."Count"]
f.Bags[bagID][slotID].Count:ClearAllPoints()
- E:Point(f.Bags[bagID][slotID].Count, "BOTTOMRIGHT", 0, 2)
+ E:Point(f.Bags[bagID][slotID].Count, "BOTTOMRIGHT", 0, 3)
E:FontTemplate(f.Bags[bagID][slotID].Count, E.LSM:Fetch("font", E.db.bags.countFont), E.db.bags.countFontSize, E.db.bags.countFontOutline)
f.Bags[bagID][slotID].Count:SetTextColor(countColor.r, countColor.g, countColor.b)
+ if not f.Bags[bagID][slotID].QuestIcon then
+ local QuestIcon = f.Bags[bagID][slotID]:CreateTexture(nil, "OVERLAY")
+ QuestIcon:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\bagQuestIcon")
+ QuestIcon:SetTexCoord(0, 1, 0, 1)
+ E:SetInside(QuestIcon)
+ QuestIcon:Hide()
+ f.Bags[bagID][slotID].QuestIcon = QuestIcon
+ end
+
+ if not f.Bags[bagID][slotID].JunkIcon then
+ local JunkIcon = f.Bags[bagID][slotID]:CreateTexture(nil, "OVERLAY")
+ JunkIcon:SetTexture("Interface\\AddOns\\ElvUI\\media\\textures\\bagJunkIcon")
+ E:Point(JunkIcon, "TOPLEFT", 1, 0)
+ JunkIcon:Hide()
+ f.Bags[bagID][slotID].JunkIcon = JunkIcon
+ end
+
f.Bags[bagID][slotID].iconTexture = _G[f.Bags[bagID][slotID]:GetName().."IconTexture"]
E:SetInside(f.Bags[bagID][slotID].iconTexture, f.Bags[bagID][slotID])
f.Bags[bagID][slotID].iconTexture:SetTexCoord(unpack(E.TexCoords))
if bagID ~= BANK_CONTAINER then
f.Bags[bagID][slotID].cooldown = _G[f.Bags[bagID][slotID]:GetName().."Cooldown"]
+ f.Bags[bagID][slotID].cooldown.CooldownOverride = "bags"
f.Bags[bagID][slotID].cooldown:SetModelScale(buttonSize / (37 / 0.75))
E:RegisterCooldown(f.Bags[bagID][slotID].cooldown)
f.Bags[bagID][slotID].bagID = bagID
@@ -549,13 +581,17 @@ function B:Layout(isBank)
end
f.Bags[bagID][slotID].itemLevel = f.Bags[bagID][slotID]:CreateFontString(nil, "OVERLAY")
- E:Point(f.Bags[bagID][slotID].itemLevel, "BOTTOMRIGHT", 0, 2)
+ E:Point(f.Bags[bagID][slotID].itemLevel, "BOTTOMRIGHT", 0, 3)
E:FontTemplate(f.Bags[bagID][slotID].itemLevel, E.LSM:Fetch("font", E.db.bags.itemLevelFont), E.db.bags.itemLevelFontSize, E.db.bags.itemLevelFontOutline)
end
f.Bags[bagID][slotID]:SetID(slotID)
E:Size(f.Bags[bagID][slotID], buttonSize)
+ if f.Bags[bagID][slotID].JunkIcon then
+ E:Size(f.Bags[bagID][slotID].JunkIcon, buttonSize/2)
+ end
+
f:UpdateSlot(bagID, slotID)
if f.Bags[bagID][slotID]:GetPoint() then
@@ -594,9 +630,10 @@ function B:Layout(isBank)
numBagSlots = numBagSlots + 1
end
else
- for i = 1, MAX_CONTAINER_ITEMS do
- if f.Bags[bagID] and f.Bags[bagID][i] then
- f.Bags[bagID][i]:Hide()
+ --Hide unused slots
+ for y = 1, MAX_CONTAINER_ITEMS do
+ if f.Bags[bagID] and f.Bags[bagID][y] then
+ f.Bags[bagID][y]:Hide()
end
end
@@ -633,6 +670,15 @@ function B:Layout(isBank)
f.keyFrame.slots[i].cooldown:SetModelScale(buttonSize / (37 / 0.75))
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"]
E:SetInside(f.keyFrame.slots[i].iconTexture, f.keyFrame.slots[i])
f.keyFrame.slots[i].iconTexture:SetTexCoord(unpack(E.TexCoords))
@@ -677,16 +723,24 @@ function B:UpdateKeySlot(slotID)
slot:Show()
if clink then
- local _
- slot.name, _, slot.rarity = GetItemInfo(match(clink, "item:(%d+)"))
+ local _, r, g, b
+ local iLink, iType
- local r, g, b
+ slot.name, iLink, slot.rarity, _, _, iType = GetItemInfo(match(clink, "item:(%d+)"))
if slot.rarity then
r, g, b = GetItemQualityColor(slot.rarity)
end
- if slot.rarity and slot.rarity > 1 then
+ if iType and iType == "Quest" then
+ if GetQuestItemStarterInfo(iLink) then
+ slot.QuestIcon:Show()
+ slot:SetBackdropBorderColor(unpack(B.QuestColors.questStarter))
+ else
+ slot:SetBackdropBorderColor(unpack(B.QuestColors.questItem))
+ end
+ slot.ignoreBorderColors = true
+ elseif slot.rarity and slot.rarity > 1 then
slot:SetBackdropBorderColor(r, g, b)
slot.ignoreBorderColors = true
else
@@ -712,7 +766,7 @@ function B:UpdateKeySlot(slotID)
SetItemButtonTexture(slot, texture)
SetItemButtonCount(slot, count)
- SetItemButtonDesaturated(slot, locked, 0.5, 0.5, 0.5)
+ SetItemButtonDesaturated(slot, locked)
end
function B:UpdateAll()
@@ -771,15 +825,13 @@ function B:UpdateGoldText()
end
function B:FormatMoney(amount)
- local coppername = "|cffeda55fc|r"
- local silvername = "|cffc7c7cfs|r"
- local goldname = "|cffffd700g|r"
+ local str, coppername, silvername, goldname = "", "|cffeda55fc|r", "|cffc7c7cfs|r", "|cffffd700g|r"
+
local value = abs(amount)
local gold = floor(value / 10000)
local silver = floor(mod(value / 100, 100))
local copper = floor(mod(value, 100))
- local str = ""
if gold > 0 then
str = format("%d%s%s", gold, goldname, (silver > 0 or copper > 0) and " " or "")
end
@@ -794,7 +846,7 @@ function B:FormatMoney(amount)
end
function B:GetGraysValue()
- local value, itemLink, rarity, itemPrice, itype, stackCount, stackPrice, _ = 0
+ local value, itemLink, rarity, itype, itemPrice, stackCount, stackPrice, _ = 0
for bag = 0, NUM_BAG_FRAMES do
for slot = 1, GetContainerNumSlots(bag) do
@@ -802,6 +854,7 @@ function B:GetGraysValue()
if itemLink then
_, _, rarity, _, _, itype = GetItemInfo(match(itemLink, "item:(%d+)"))
itemPrice = LIP:GetSellValue(itemLink)
+
if itemPrice then
stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1
stackPrice = itemPrice * stackCount
@@ -840,17 +893,20 @@ function B:VendorGrays(delete)
if not B.SellFrame.Info.itemList then return end
if tmaxn(B.SellFrame.Info.itemList) < 1 then return end
- --Resetting stuff
+
+ --Resetting stuff
B.SellFrame.Info.delete = delete or false
B.SellFrame.Info.ProgressTimer = 0
B.SellFrame.Info.SellInterval = E.db.bags.vendorGrays.interval
B.SellFrame.Info.ProgressMax = tmaxn(B.SellFrame.Info.itemList)
B.SellFrame.Info.goldGained = 0
B.SellFrame.Info.itemsSold = 0
- B.SellFrame.statusbar:SetValue(0)
+
+ B.SellFrame.statusbar:SetValue(0)
B.SellFrame.statusbar:SetMinMaxValues(0, B.SellFrame.Info.ProgressMax)
B.SellFrame.statusbar.ValueText:SetText("0 / "..B.SellFrame.Info.ProgressMax)
- --Time to sell
+
+ --Time to sell
B.SellFrame:Show()
end
@@ -859,7 +915,7 @@ function B:VendorGrayCheck()
if value == 0 then
E:Print(L["No gray items to delete."])
- elseif (not MerchantFrame or not MerchantFrame:IsShown()) then
+ elseif not MerchantFrame or not MerchantFrame:IsShown() then
E.PopupDialogs["DELETE_GRAYS"].Money = value
E:StaticPopup_Show("DELETE_GRAYS")
else
@@ -868,7 +924,9 @@ function B:VendorGrayCheck()
end
function B:ContructContainerFrame(name, isBank)
- local strata = E.db.bags.strata or "HIGH"
+ if not SkinModule then SkinModule = E:GetModule("Skins") end
+
+ local strata = E.db.bags.strata or "MEDIUM"
local f = CreateFrame("Button", name, E.UIParent)
E:SetTemplate(f, "Transparent")
@@ -889,12 +947,12 @@ function B:ContructContainerFrame(name, isBank)
f:Hide()
f.isBank = isBank
- f.bottomOffset = isBank and 8 or 28
+ f.bottomOffset = 8
f.topOffset = isBank and 45 or 50
f.BagIDs = isBank and {-1, 5, 6, 7, 8, 9, 10, 11} or {0, 1, 2, 3, 4}
f.Bags = {}
- local mover = (isBank and ElvUIBankMover or ElvUIBagMover)
+ local mover = (isBank and ElvUIBankMover) or ElvUIBagMover
if mover then
E:Point(f, mover.POINT, mover)
f.mover = mover
@@ -907,20 +965,19 @@ function B:ContructContainerFrame(name, isBank)
f:SetScript("OnDragStart", function() if IsShiftKeyDown() then this:StartMoving() end end)
f:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
f:SetScript("OnClick", function() if IsControlKeyDown() then B.PostBagMove(this.mover) end end)
+ f:SetScript("OnLeave", function() GameTooltip:Hide() end)
f:SetScript("OnEnter", function()
GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT", 0, 4)
GameTooltip:ClearLines()
GameTooltip:AddDoubleLine(L["Hold Shift + Drag:"], L["Temporary Move"], 1, 1, 1)
GameTooltip:AddDoubleLine(L["Hold Control + Right Click:"], L["Reset Position"], 1, 1, 1)
-
GameTooltip:Show()
end)
- f:SetScript("OnLeave", function() GameTooltip:Hide() end)
f.closeButton = CreateFrame("Button", name.."CloseButton", f, "UIPanelCloseButton")
E:Point(f.closeButton, "TOPRIGHT", 2, 2)
- E:GetModule("Skins"):HandleCloseButton(f.closeButton)
+ SkinModule:HandleCloseButton(f.closeButton)
f.holderFrame = CreateFrame("Frame", nil, f)
E:Point(f.holderFrame, "TOP", f, "TOP", 0, -f.topOffset)
@@ -931,7 +988,6 @@ function B:ContructContainerFrame(name, isBank)
E:SetTemplate(f.ContainerHolder, "Transparent")
f.ContainerHolder:Hide()
-
if isBank then
--Bag Text
f.bagText = f:CreateFontString(nil, "OVERLAY")
@@ -1206,9 +1262,7 @@ function B:ToggleBags(id)
end
function B:ToggleBackpack()
- if IsOptionFrameOpen() then
- return
- end
+ if IsOptionFrameOpen() then return end
if IsBagOpen(0) then
self:OpenBags()
@@ -1218,9 +1272,7 @@ function B:ToggleBackpack()
end
function B:OpenAllBags()
- if IsOptionFrameOpen() then
- return
- end
+ if IsOptionFrameOpen() then return end
if self.BagFrame:IsShown() then
self:CloseBags()
@@ -1251,7 +1303,8 @@ function B:OpenBags()
self.BagFrame:UpdateAllSlots()
PlaySound("igBackPackOpen")
- E:GetModule("Tooltip"):GameTooltip_SetDefaultAnchor(GameTooltip)
+ if not TooltipModule then TooltipModule = E:GetModule("Tooltip") end
+ TooltipModule:GameTooltip_SetDefaultAnchor(GameTooltip)
end
function B:CloseBags()
@@ -1262,7 +1315,8 @@ function B:CloseBags()
self.BankFrame:Hide()
end
- E:GetModule("Tooltip"):GameTooltip_SetDefaultAnchor(GameTooltip)
+ if not TooltipModule then TooltipModule = E:GetModule("Tooltip") end
+ TooltipModule:GameTooltip_SetDefaultAnchor(GameTooltip)
end
function B:OpenBank()
@@ -1314,6 +1368,7 @@ function B:updateContainerFrameAnchors()
freeScreenHeight = screenHeight - yOffset
leftMostPoint = screenWidth - xOffset
column = 1
+
local frameHeight
for _, frameName in ipairs(ContainerFrame1.bags) do
frameHeight = _G[frameName]:GetHeight()
@@ -1354,21 +1409,21 @@ function B:updateContainerFrameAnchors()
if index == 1 then
-- First bag
- frame:SetPoint("BOTTOMRIGHT", ElvUIBagMover, "BOTTOMRIGHT", E.Spacing, -E.Border)
+ E:Point(frame, "BOTTOMRIGHT", ElvUIBagMover, "BOTTOMRIGHT", E.Spacing, -E.Border)
bagsPerColumn = bagsPerColumn + 1
elseif freeScreenHeight < frame:GetHeight() then
-- Start a new column
column = column + 1
freeScreenHeight = screenHeight - yOffset
if column > 1 then
- frame:SetPoint("BOTTOMRIGHT", ContainerFrame1.bags[(index - bagsPerColumn) - 1], "BOTTOMLEFT", -CONTAINER_SPACING, 0)
+ E:Point(frame, "BOTTOMRIGHT", ContainerFrame1.bags[(index - bagsPerColumn) - 1], "BOTTOMLEFT", -CONTAINER_SPACING, 0)
else
- frame:SetPoint("BOTTOMRIGHT", ContainerFrame1.bags[index - bagsPerColumn], "BOTTOMLEFT", -CONTAINER_SPACING, 0)
+ E:Point(frame, "BOTTOMRIGHT", ContainerFrame1.bags[index - bagsPerColumn], "BOTTOMLEFT", -CONTAINER_SPACING, 0)
end
bagsPerColumn = 0
else
-- Anchor to the previous bag
- frame:SetPoint("BOTTOMRIGHT", ContainerFrame1.bags[index - 1], "TOPRIGHT", 0, CONTAINER_SPACING)
+ E:Point(frame, "BOTTOMRIGHT", ContainerFrame1.bags[index - 1], "TOPRIGHT", 0, CONTAINER_SPACING)
bagsPerColumn = bagsPerColumn + 1
end
@@ -1381,10 +1436,8 @@ function B:PostBagMove()
-- self refers to the mover (bag or bank)
local x, y = self:GetCenter()
- local screenHeight = UIParent:GetTop()
- local screenWidth = UIParent:GetRight()
-
- if not x then return end
+ local screenHeight = E.UIParent:GetTop()
+ local screenWidth = E.UIParent:GetRight()
if y > (screenHeight / 2) then
self:SetText(self.textGrowDown)
@@ -1409,7 +1462,8 @@ end
function B:MERCHANT_CLOSED()
B.SellFrame:Hide()
- twipe(B.SellFrame.Info.itemList)
+
+ twipe(B.SellFrame.Info.itemList)
B.SellFrame.Info.delete = false
B.SellFrame.Info.ProgressTimer = 0
B.SellFrame.Info.SellInterval = E.db.bags.vendorGrays.interval
@@ -1417,7 +1471,8 @@ function B:MERCHANT_CLOSED()
B.SellFrame.Info.goldGained = 0
B.SellFrame.Info.itemsSold = 0
end
- function B:ProgressQuickVendor()
+
+function B:ProgressQuickVendor()
local item = B.SellFrame.Info.itemList[1]
if not item then return nil, true end --No more to sell
local bag, slot, itemPrice, itemLink = unpack(item)
@@ -1434,14 +1489,18 @@ end
end
UseContainerItem(bag, slot)
end
- tremove(B.SellFrame.Info.itemList, 1)
- return stackPrice
+
+ tremove(B.SellFrame.Info.itemList, 1)
+
+ return stackPrice
end
- function B:VendorGreys_OnUpdate()
+
+function B:VendorGreys_OnUpdate()
B.SellFrame.Info.ProgressTimer = B.SellFrame.Info.ProgressTimer - arg1
if B.SellFrame.Info.ProgressTimer > 0 then return end
B.SellFrame.Info.ProgressTimer = B.SellFrame.Info.SellInterval
- local goldGained, lastItem = B:ProgressQuickVendor()
+
+ local goldGained, lastItem = B:ProgressQuickVendor()
if goldGained then
B.SellFrame.Info.goldGained = B.SellFrame.Info.goldGained + goldGained
B.SellFrame.Info.itemsSold = B.SellFrame.Info.itemsSold + 1
@@ -1455,21 +1514,27 @@ end
end
end
end
- function B:CreateSellFrame()
+
+function B:CreateSellFrame()
B.SellFrame = CreateFrame("Frame", "ElvUIVendorGraysFrame", E.UIParent)
E:Size(B.SellFrame, 200,40)
- E:Point(B.SellFrame, "CENTER", UIParent)
+ E:Point(B.SellFrame, "CENTER", E.UIParent)
E:CreateBackdrop(B.SellFrame, "Transparent")
- B.SellFrame.title = B.SellFrame:CreateFontString(nil, "OVERLAY")
+ B.SellFrame:SetAlpha(E.db.bags.vendorGrays.progressBar and 1 or 0)
+
+ B.SellFrame.title = B.SellFrame:CreateFontString(nil, "OVERLAY")
E:FontTemplate(B.SellFrame.title, nil, 12, "OUTLINE")
E:Point(B.SellFrame.title, "TOP", B.SellFrame, "TOP", 0, -2)
B.SellFrame.title:SetText(L["Vendoring Grays"])
- B.SellFrame.statusbar = CreateFrame("StatusBar", "ElvUIVendorGraysFrameStatusbar", B.SellFrame)
+
+ B.SellFrame.statusbar = CreateFrame("StatusBar", "ElvUIVendorGraysFrameStatusbar", B.SellFrame)
E:Size(B.SellFrame.statusbar, 180, 16)
E:Point(B.SellFrame.statusbar, "BOTTOM", B.SellFrame, "BOTTOM", 0, 4)
B.SellFrame.statusbar:SetStatusBarTexture(E["media"].normTex)
+ B.SellFrame.statusbar:SetStatusBarColor(1, 0, 0)
E:CreateBackdrop(B.SellFrame.statusbar, "Transparent")
- B.SellFrame.statusbar.ValueText = B.SellFrame.statusbar:CreateFontString(nil, "OVERLAY")
+
+ B.SellFrame.statusbar.ValueText = B.SellFrame.statusbar:CreateFontString(nil, "OVERLAY")
E:FontTemplate(B.SellFrame.statusbar.ValueText, nil, 12, "OUTLINE")
E:Point(B.SellFrame.statusbar.ValueText, "CENTER", B.SellFrame.statusbar)
B.SellFrame.statusbar.ValueText:SetText("0 / 0 ( 0s )")
@@ -1483,8 +1548,17 @@ end
itemsSold = 0,
itemList = {}
}
- B.SellFrame:SetScript("OnUpdate", B.VendorGreys_OnUpdate)
- B.SellFrame:Hide()
+
+ B.SellFrame:SetScript("OnUpdate", B.VendorGreys_OnUpdate)
+
+ B.SellFrame:Hide()
+end
+
+function B:UpdateSellFrameSettings()
+ if not B.SellFrame or not B.SellFrame.Info then return end
+
+ B.SellFrame.Info.SellInterval = E.db.bags.vendorGrays.interval
+ B.SellFrame:SetAlpha(E.db.bags.vendorGrays.progressBar and 1 or 0)
end
B.BagIndice = {
@@ -1495,10 +1569,19 @@ B.BagIndice = {
enchanting = 16,
}
+B.QuestKeys = {
+ questStarter = "questStarter",
+ questItem = "questItem"
+}
+
function B:UpdateBagColors(table, indice, r, g, b)
self[table][B.BagIndice[indice]] = {r, g, b}
end
+function B:UpdateQuestColors(table, indice, r, g, b)
+ self[table][B.QuestKeys[indice]] = {r, g, b}
+end
+
function B:Initialize()
self:LoadBagBar()
@@ -1511,14 +1594,15 @@ function B:Initialize()
--Creating vendor grays frame
B:CreateSellFrame()
- self:RegisterEvent("MERCHANT_CLOSED")
+ self:RegisterEvent("MERCHANT_CLOSED")
if not E.private.bags.enable then
--Set a different default anchor
E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2)
- E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover"], nil, nil, B.PostBagMove)
+ E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover"], nil, nil, B.PostBagMove, nil, nil, "bags,general")
self:SecureHook("updateContainerFrameAnchors")
+
return
end
@@ -1534,24 +1618,30 @@ function B:Initialize()
[16] = {self.db.colors.profession.enchanting.r, self.db.colors.profession.enchanting.g, self.db.colors.profession.enchanting.b},
}
+ self.QuestColors = {
+ ["questStarter"] = {self.db.colors.items.questStarter.r, self.db.colors.items.questStarter.g, self.db.colors.items.questStarter.b},
+ ["questItem"] = {self.db.colors.items.questItem.r, self.db.colors.items.questItem.g, self.db.colors.items.questItem.b}
+ }
+
--Bag Mover: Set default anchor point and create mover
E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", 0, 22 + E.Border*4 - E.Spacing*2)
- E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover (Grow Up)"], nil, nil, B.PostBagMove)
+ E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover (Grow Up)"], nil, nil, B.PostBagMove, nil, nil, "bags,general")
--Bank Mover
local BankFrameHolder = CreateFrame("Frame", nil, E.UIParent)
- E:Size(BankFrameHolder, 200, 22)
+ E:Width(BankFrameHolder, 200)
+ E:Height(BankFrameHolder, 22)
E:Point(BankFrameHolder, "BOTTOMLEFT", LeftChatPanel, "BOTTOMLEFT", 0, 22 + E.Border*4 - E.Spacing*2)
BankFrameHolder:SetFrameLevel(BankFrameHolder:GetFrameLevel() + 400)
- E:CreateMover(BankFrameHolder, "ElvUIBankMover", L["Bank Mover (Grow Up)"], nil, nil, B.PostBagMove)
+ E:CreateMover(BankFrameHolder, "ElvUIBankMover", L["Bank Mover (Grow Up)"], nil, nil, B.PostBagMove, nil, nil, "bags,general")
--Set some variables on movers
ElvUIBagMover.textGrowUp = L["Bag Mover (Grow Up)"]
ElvUIBagMover.textGrowDown = L["Bag Mover (Grow Down)"]
- ElvUIBagMover.POINT = "BOTTOMRIGHT"
+ ElvUIBagMover.POINT = "BOTTOM"
ElvUIBankMover.textGrowUp = L["Bank Mover (Grow Up)"]
ElvUIBankMover.textGrowDown = L["Bank Mover (Grow Down)"]
- ElvUIBankMover.POINT = "BOTTOMLEFT"
+ ElvUIBankMover.POINT = "BOTTOM"
--Create Bag Frame
self.BagFrame = self:ContructContainerFrame("ElvUI_ContainerFrame")
@@ -1575,12 +1665,10 @@ function B:Initialize()
self:RegisterEvent("BANKFRAME_OPENED", "OpenBank")
self:RegisterEvent("BANKFRAME_CLOSED", "CloseBank")
self:RegisterEvent("PLAYERBANKBAGSLOTS_CHANGED")
-
- StackSplitFrame:SetFrameStrata("DIALOG")
end
local function InitializeCallback()
B:Initialize()
end
-E:RegisterModule(B:GetName(), InitializeCallback)
\ No newline at end of file
+E:RegisterModule(B:GetName(), InitializeCallback)
diff --git a/ElvUI/Settings/Profile.lua b/ElvUI/Settings/Profile.lua
index 03dfa59..d24da78 100644
--- a/ElvUI/Settings/Profile.lua
+++ b/ElvUI/Settings/Profile.lua
@@ -97,100 +97,106 @@ P["databars"] = {
},
}
---Bags
-P["bags"] = {
- ["sortInverted"] = true,
- ["bagSize"] = 34,
- ["bankSize"] = 34,
- ["bagWidth"] = 406,
- ["bankWidth"] = 406,
- ["moneyFormat"] = "SMART",
- ["moneyCoins"] = true,
- ["ignoredItems"] = {},
- ["itemLevel"] = true,
- ["itemLevelThreshold"] = 1,
- ["itemLevelFont"] = "Homespun",
- ["itemLevelFontSize"] = 10,
- ["itemLevelFontOutline"] = "MONOCHROMEOUTLINE",
- ["itemLevelCustomColorEnable"] = false,
- ["itemLevelCustomColor"] = {r = 1, g = 1, b = 1},
- ["countFont"] = "Homespun",
- ["countFontSize"] = 10,
- ["countFontOutline"] = "MONOCHROMEOUTLINE",
- ["countFontColor"] = {r = 1, g = 1, b = 1},
- ["reverseSlots"] = false,
- ["clearSearchOnClose"] = false,
- ["disableBagSort"] = false,
- ["disableBankSort"] = false,
- ["strata"] = "DIALOG",
- ["colors"] = {
- ["profession"] = {
- ["quiver"] = {r = 1, g = 0.56, b = 0.73},
- ["ammoPouch"] = {r = 1, g = 0.56, b = 0.73},
- ["soulBag"] = {r = 0.47, g = 0.26, b = 1},
- ["leatherworking"] = {r = 0.88, g = 0.73, b = 0.29},
- ["herbs"] = {r = 0.07, g = 0.71, b = 0.13},
- ["enchanting"] = {r = 0.76, g = 0.02, b = 0.8},
- ["engineering"] = {r = 0.91, g = 0.46, b = 0.18},
- ["gems"] = {r = 0.03, g = 0.71, b = 0.81},
+ --Bags
+ P["bags"] = {
+ ["sortInverted"] = true,
+ ["bagSize"] = 34,
+ ["bankSize"] = 34,
+ ["bagWidth"] = 406,
+ ["bankWidth"] = 406,
+ ["moneyFormat"] = "SMART",
+ ["moneyCoins"] = true,
+ ["junkIcon"] = false,
+ ["ignoredItems"] = {},
+ ["itemLevel"] = true,
+ ["itemLevelThreshold"] = 1,
+ ["itemLevelFont"] = "Homespun",
+ ["itemLevelFontSize"] = 10,
+ ["itemLevelFontOutline"] = "MONOCHROMEOUTLINE",
+ ["itemLevelCustomColorEnable"] = false,
+ ["itemLevelCustomColor"] = {r = 1, g = 1, b = 1},
+ ["countFont"] = "Homespun",
+ ["countFontSize"] = 10,
+ ["countFontOutline"] = "MONOCHROMEOUTLINE",
+ ["countFontColor"] = {r = 1, g = 1, b = 1},
+ ["reverseSlots"] = false,
+ ["clearSearchOnClose"] = false,
+ ["disableBagSort"] = false,
+ ["disableBankSort"] = false,
+ ["strata"] = "DIALOG",
+ ["colors"] = {
+ ["profession"] = {
+ ["quiver"] = {r = 1, g = 0.56, b = 0.73},
+ ["ammoPouch"] = {r = 1, g = 0.56, b = 0.73},
+ ["soulBag"] = {r = 0.47, g = 0.26, b = 1},
+ ["leatherworking"] = {r = 0.88, g = 0.73, b = 0.29},
+ ["herbs"] = {r = 0.07, g = 0.71, b = 0.13},
+ ["enchanting"] = {r = 0.76, g = 0.02, b = 0.8},
+ ["engineering"] = {r = 0.91, g = 0.46, b = 0.18},
+ ["gems"] = {r = 0.03, g = 0.71, b = 0.81},
["mining"] = {r = 0.54, g = 0.40, b = 0.04}
+ },
+ ["items"] = {
+ ["questStarter"] = {r = 1, g = 1, b = 0},
+ ["questItem"] = {r = 1, g = 0.30, b = 0.30}
}
},
- ["vendorGrays"] = {
- ["enable"] = false,
- ["interval"] = 0.2,
- ["details"] = false
- },
- ["split"] = {
- ["bagSpacing"] = 5,
- ["player"] = false,
- ["bank"] = false,
- ["bag1"] = false,
- ["bag2"] = false,
- ["bag3"] = false,
- ["bag4"] = false,
- ["bag5"] = false,
- ["bag6"] = false,
- ["bag7"] = false,
- ["bag8"] = false,
- ["bag9"] = false,
- ["bag10"] = false,
- ["bag11"] = false,
- },
- ["cooldown"] = {
- ["threshold"] = 4,
- ["override"] = false,
- ["reverse"] = false,
- ["expiringColor"] = {r = 1, g = 0, b = 0},
- ["secondsColor"] = {r = 1, g = 1, b = 1},
- ["minutesColor"] = {r = 1, g = 1, b = 1},
- ["hoursColor"] = {r = 1, g = 1, b = 1},
- ["daysColor"] = {r = 1, g = 1, b = 1},
+ ["vendorGrays"] = {
+ ["enable"] = false,
+ ["interval"] = 0.2,
+ ["details"] = false,
+ ["progressBar"] = true
+ },
+ ["split"] = {
+ ["bagSpacing"] = 5,
+ ["player"] = false,
+ ["bank"] = false,
+ ["bag1"] = false,
+ ["bag2"] = false,
+ ["bag3"] = false,
+ ["bag4"] = false,
+ ["bag5"] = false,
+ ["bag6"] = false,
+ ["bag7"] = false,
+ ["bag8"] = false,
+ ["bag9"] = false,
+ ["bag10"] = false,
+ ["bag11"] = false,
+ },
+ ["cooldown"] = {
+ ["threshold"] = 4,
+ ["override"] = false,
+ ["reverse"] = false,
+ ["expiringColor"] = {r = 1, g = 0, b = 0},
+ ["secondsColor"] = {r = 1, g = 1, b = 1},
+ ["minutesColor"] = {r = 1, g = 1, b = 1},
+ ["hoursColor"] = {r = 1, g = 1, b = 1},
+ ["daysColor"] = {r = 1, g = 1, b = 1},
- ["checkSeconds"] = false,
- ["hhmmColor"] = {r = 1, g = 1, b = 1},
- ["mmssColor"] = {r = 1, g = 1, b = 1},
- ["hhmmThreshold"] = -1,
- ["mmssThreshold"] = -1,
+ ["checkSeconds"] = false,
+ ["hhmmColor"] = {r = 1, g = 1, b = 1},
+ ["mmssColor"] = {r = 1, g = 1, b = 1},
+ ["hhmmThreshold"] = -1,
+ ["mmssThreshold"] = -1,
- ["fonts"] = {
- ["enable"] = false,
- ["font"] = "PT Sans Narrow",
- ["fontOutline"] = "OUTLINE",
- ["fontSize"] = 18
- }
- },
- ["bagBar"] = {
- ["growthDirection"] = "VERTICAL",
- ["sortDirection"] = "ASCENDING",
- ["size"] = 30,
- ["spacing"] = 4,
- ["backdropSpacing"] = 4,
- ["showBackdrop"] = false,
- ["mouseover"] = false,
- ["visibility"] = "",
- }
-}
+ ["fonts"] = {
+ ["enable"] = false,
+ ["font"] = "PT Sans Narrow",
+ ["fontOutline"] = "OUTLINE",
+ ["fontSize"] = 18
+ }
+ },
+ ["bagBar"] = {
+ ["growthDirection"] = "VERTICAL",
+ ["sortDirection"] = "ASCENDING",
+ ["size"] = 30,
+ ["spacing"] = 4,
+ ["backdropSpacing"] = 4,
+ ["showBackdrop"] = false,
+ ["mouseover"] = false,
+ ["visibility"] = "",
+ }
+ }
P["nameplates"] = {
["statusbar"] = "ElvUI Norm",
diff --git a/ElvUI_Config/Bags.lua b/ElvUI_Config/Bags.lua
index db65144..1a02bd8 100644
--- a/ElvUI_Config/Bags.lua
+++ b/ElvUI_Config/Bags.lua
@@ -3,10 +3,13 @@ local B = E:GetModule("Bags");
--Cache global variables
--Lua functions
+local _G = _G
local gsub, match = string.gsub, string.match
local getn = table.getn
--WoW API / Variables
-local COLOR, GENERAL, NONE = COLOR, GENERAL, NONE
+local GameTooltip = _G["GameTooltip"]
+local FONT_SIZE, NONE, COLOR = FONT_SIZE, NONE, COLOR
+local GENERAL = GENERAL
E.Options.args.bags = {
type = "group",
@@ -26,7 +29,7 @@ E.Options.args.bags = {
name = L["Enable"],
desc = L["Enable/Disable the all-in-one bag."],
get = function(info) return E.private.bags.enable end,
- set = function(info, value) E.private.bags.enable = value; E:StaticPopup_Show("PRIVATE_RL") end
+ set = function(info, value) E.private.bags.enable = value E:StaticPopup_Show("PRIVATE_RL") end
},
general = {
order = 3,
@@ -68,32 +71,39 @@ E.Options.args.bags = {
},
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText() end
},
- clearSearchOnClose = {
+ junkIcon = {
order = 4,
type = "toggle",
+ name = L["Show Junk Icon"],
+ desc = L["Display the junk icon on all grey items that can be vendored."],
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:UpdateAllBagSlots() end
+ },
+ clearSearchOnClose = {
+ order = 5,
+ type = "toggle",
name = L["Clear Search On Close"],
set = function(info, value) E.db.bags[ info[getn(info)] ] = value end
},
reverseSlots = {
- order = 5,
+ order = 6,
type = "toggle",
name = L["Reverse Bag Slots"],
set = function(info, value) E.db.bags[info[getn(info)]] = value B:UpdateAll() end,
},
disableBagSort = {
- order = 6,
- type = "toggle",
- name = L["Disable Bag Sort"],
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(false) end
- },
- disableBankSort = {
order = 7,
type = "toggle",
+ name = L["Disable Bag Sort"],
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:ToggleSortButtonState(false) end
+ },
+ disableBankSort = {
+ order = 8,
+ type = "toggle",
name = L["Disable Bank Sort"],
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:ToggleSortButtonState(true) end
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:ToggleSortButtonState(true) end
},
countGroup = {
- order = 8,
+ order = 9,
type = "group",
name = L["Item Count Font"],
guiInline = true,
@@ -104,20 +114,20 @@ E.Options.args.bags = {
dialogControl = "LSM30_Font",
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
- set = function(info, value) E.db.bags.countFont = value; B:UpdateCountDisplay() end
+ set = function(info, value) E.db.bags.countFont = value B:UpdateCountDisplay() end
},
countFontSize = {
order = 2,
type = "range",
name = FONT_SIZE,
min = 4, max = 22, step = 1,
- set = function(info, value) E.db.bags.countFontSize = value; B:UpdateCountDisplay() end
+ set = function(info, value) E.db.bags.countFontSize = value B:UpdateCountDisplay() end
},
countFontOutline = {
order = 3,
type = "select",
name = L["Font Outline"],
- set = function(info, value) E.db.bags.countFontOutline = value; B:UpdateCountDisplay() end,
+ set = function(info, value) E.db.bags.countFontOutline = value B:UpdateCountDisplay() end,
values = {
["NONE"] = NONE,
["OUTLINE"] = "OUTLINE",
@@ -143,7 +153,7 @@ E.Options.args.bags = {
}
},
itemLevelGroup = {
- order = 7,
+ order = 10,
type = "group",
name = L["Item Level"],
guiInline = true,
@@ -153,7 +163,7 @@ E.Options.args.bags = {
type = "toggle",
name = L["Display Item Level"],
desc = L["Displays item level on equippable items."],
- set = function(info, value) E.db.bags.itemLevel = value; B:UpdateItemLevelDisplay() end
+ set = function(info, value) E.db.bags.itemLevel = value B:UpdateItemLevelDisplay() end
},
itemLevelCustomColorEnable = {
order = 2,
@@ -179,17 +189,17 @@ E.Options.args.bags = {
},
itemLevelThreshold = {
order = 4,
+ type = "range",
name = L["Item Level Threshold"],
desc = L["The minimum item level required for it to be shown."],
- type = "range",
- min = 1, max = 1000, step = 1,
+ min = 1, max = 175, step = 1,
disabled = function() return not E.db.bags.itemLevel end,
- set = function(info, value) E.db.bags.itemLevelThreshold = value; B:UpdateItemLevelDisplay() end
+ set = function(info, value) E.db.bags.itemLevelThreshold = value B:UpdateItemLevelDisplay() end
},
spacer = {
order = 5,
type = "description",
- name = " "
+ name = ""
},
itemLevelFont = {
order = 6,
@@ -198,7 +208,7 @@ E.Options.args.bags = {
name = L["Font"],
values = AceGUIWidgetLSMlists.font,
disabled = function() return not E.db.bags.itemLevel end,
- set = function(info, value) E.db.bags.itemLevelFont = value; B:UpdateItemLevelDisplay() end
+ set = function(info, value) E.db.bags.itemLevelFont = value B:UpdateItemLevelDisplay() end
},
itemLevelFontSize = {
order = 7,
@@ -206,14 +216,14 @@ E.Options.args.bags = {
name = FONT_SIZE,
min = 6, max = 33, step = 1,
disabled = function() return not E.db.bags.itemLevel end,
- set = function(info, value) E.db.bags.itemLevelFontSize = value; B:UpdateItemLevelDisplay() end
+ set = function(info, value) E.db.bags.itemLevelFontSize = value B:UpdateItemLevelDisplay() end
},
itemLevelFontOutline = {
order = 8,
type = "select",
name = L["Font Outline"],
disabled = function() return not E.db.bags.itemLevel end,
- set = function(info, value) E.db.bags.itemLevelFontOutline = value; B:UpdateItemLevelDisplay() end,
+ set = function(info, value) E.db.bags.itemLevelFontOutline = value B:UpdateItemLevelDisplay() end,
values = {
["NONE"] = NONE,
["OUTLINE"] = "OUTLINE",
@@ -242,28 +252,28 @@ E.Options.args.bags = {
name = L["Button Size (Bag)"],
desc = L["The size of the individual buttons on the bag frame."],
min = 15, max = 45, step = 1,
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout() end
- },
- bankSize = {
- order = 2,
- type = "range",
- name = L["Button Size (Bank)"],
- desc = L["The size of the individual buttons on the bank frame."],
- min = 15, max = 45, step = 1,
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true) end
- },
- spacer = {
- order = 3,
- type = "description",
- name = " "
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:Layout() end
},
bagWidth = {
- order = 4,
+ order = 2,
type = "range",
name = L["Panel Width (Bags)"],
desc = L["Adjust the width of the bag frame."],
min = 150, max = 1400, step = 1,
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout() end
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:Layout() end
+ },
+ spacer = {
+ order = 3,
+ type = "description",
+ name = ""
+ },
+ bankSize = {
+ order = 4,
+ type = "range",
+ name = L["Button Size (Bank)"],
+ desc = L["The size of the individual buttons on the bank frame."],
+ min = 15, max = 45, step = 1,
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:Layout(true) end
},
bankWidth = {
order = 5,
@@ -271,7 +281,7 @@ E.Options.args.bags = {
name = L["Panel Width (Bank)"],
desc = L["Adjust the width of the bank frame."],
min = 150, max = 1400, step = 1,
- set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:Layout(true) end
+ set = function(info, value) E.db.bags[ info[getn(info)] ] = value B:Layout(true) end
}
}
},
@@ -285,47 +295,86 @@ E.Options.args.bags = {
type = "header",
name = COLOR
},
- profession = {
+ bags = {
order = 2,
type = "group",
- name = L["Profession Bags"],
+ name = L["Bags"],
+ guiInline = true,
+ args = {
+ profession = {
+ order = 1,
+ type = "group",
+ name = L["Profession Bags"],
+ guiInline = true,
+ get = function(info)
+ local t = E.db.bags.colors.profession[ info[getn(info)] ]
+ local d = P.bags.colors.profession[ info[getn(info)] ]
+ return t.r, t.g, t.b, t.a, d.r, d.g, d.b
+ end,
+ set = function(info, r, g, b)
+ local t = E.db.bags.colors.profession[ info[getn(info)] ]
+ t.r, t.g, t.b = r, g, b
+ if not E.bags then return end
+ B:UpdateBagColors("ProfessionColors", info[getn(info)], r, g, b)
+ B:UpdateAllBagSlots()
+ end,
+ args = {
+ quiver = {
+ order = 1,
+ type = "color",
+ name = L["Quiver"]
+ },
+ ammoPouch = {
+ order = 2,
+ type = "color",
+ name = L["Ammo Pouch"]
+ },
+ soulBag = {
+ order = 3,
+ type = "color",
+ name = L["Soul Bag"]
+ },
+ herbs = {
+ order = 4,
+ type = "color",
+ name = L["Herbalism"]
+ },
+ enchanting = {
+ order = 5,
+ type = "color",
+ name = L["Enchanting"]
+ }
+ }
+ }
+ }
+ },
+ items = {
+ order = 3,
+ type = "group",
+ name = ITEMS,
guiInline = true,
get = function(info)
- local t = E.db.bags.colors.profession[ info[getn(info)] ]
- local d = P.bags.colors.profession[info[getn(info)]]
+ local t = E.db.bags.colors.items[ info[getn(info)] ]
+ local d = P.bags.colors.items[info[getn(info)]]
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
end,
set = function(info, r, g, b)
- local t = E.db.bags.colors.profession[ info[getn(info)] ]
+ local t = E.db.bags.colors.items[ info[getn(info)] ]
t.r, t.g, t.b = r, g, b
- B:UpdateBagColors("ProfessionColors", info[getn(info)], r, g, b)
+ if not E.bags then return end
+ B:UpdateQuestColors("QuestColors", info[getn(info)], r, g, b)
B:UpdateAllBagSlots()
end,
args = {
- quiver = {
+ questStarter = {
order = 1,
type = "color",
- name = L["Quiver"]
+ name = L["Quest Starter"]
},
- ammoPouch = {
+ questItem = {
order = 2,
type = "color",
- name = L["Ammo Pouch"]
- },
- soulBag = {
- order = 3,
- type = "color",
- name = L["Soul Bag"]
- },
- herbs = {
- order = 4,
- type = "color",
- name = L["Herbalism"]
- },
- enchanting = {
- order = 5,
- type = "color",
- name = L["Enchanting"]
+ name = ITEM_BIND_QUEST
}
}
}
@@ -336,72 +385,95 @@ E.Options.args.bags = {
type = "group",
name = L["Bag-Bar"],
get = function(info) return E.db.bags.bagBar[ info[getn(info)] ] end,
- set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value; B:SizeAndPositionBagBar() end,
+ set = function(info, value) E.db.bags.bagBar[ info[getn(info)] ] = value B:SizeAndPositionBagBar() end,
args = {
header = {
- order = 0,
+ order = 1,
type = "header",
name = L["Bag-Bar"]
},
enable = {
- order = 1,
+ order = 2,
type = "toggle",
name = L["Enable"],
desc = L["Enable/Disable the Bag-Bar."],
get = function(info) return E.private.bags.bagBar end,
- set = function(info, value) E.private.bags.bagBar = value; E:StaticPopup_Show("PRIVATE_RL") end
+ set = function(info, value) E.private.bags.bagBar = value E:StaticPopup_Show("PRIVATE_RL") end
},
showBackdrop = {
- order = 2,
+ order = 3,
type = "toggle",
- name = L["Backdrop"]
+ name = L["Backdrop"],
+ disabled = function() return not E.private.bags.bagBar end
},
mouseover = {
- order = 3,
+ order = 4,
+ type = "toggle",
name = L["Mouse Over"],
desc = L["The frame is not shown unless you mouse over the frame."],
- type = "toggle"
+ disabled = function() return not E.private.bags.bagBar end
},
size = {
- order = 4,
+ order = 5,
type = "range",
name = L["Button Size"],
desc = L["Set the size of your bag buttons."],
- min = 24, max = 60, step = 1
+ min = 24, max = 60, step = 1,
+ disabled = function() return not E.private.bags.bagBar end
},
spacing = {
- order = 5,
+ order = 6,
type = "range",
name = L["Button Spacing"],
desc = L["The spacing between buttons."],
- min = 1, max = 10, step = 1
+ min = -1, max = 10, step = 1,
+ disabled = function() return not E.private.bags.bagBar end
},
backdropSpacing = {
- order = 6,
+ order = 7,
type = "range",
name = L["Backdrop Spacing"],
desc = L["The spacing between the backdrop and the buttons."],
- min = 0, max = 10, step = 1
+ min = 0, max = 10, step = 1,
+ disabled = function() return not E.private.bags.bagBar end
},
sortDirection = {
- order = 7,
+ order = 8,
type = "select",
name = L["Sort Direction"],
desc = L["The direction that the bag frames will grow from the anchor."],
values = {
["ASCENDING"] = L["Ascending"],
["DESCENDING"] = L["Descending"]
- }
+ },
+ disabled = function() return not E.private.bags.bagBar end
},
growthDirection = {
- order = 7,
+ order = 9,
type = "select",
name = L["Bar Direction"],
desc = L["The direction that the bag frames be (Horizontal or Vertical)."],
values = {
["VERTICAL"] = L["Vertical"],
["HORIZONTAL"] = L["Horizontal"]
- }
+ },
+ disabled = function() return not E.private.bags.bagBar end
+ },
+ visibility = {
+ order = 10,
+ type = "input",
+ name = L["Visibility State"],
+ desc = L["This works like a macro, you can run different situations to get the actionbar to show/hide differently.\n Example: '[combat] show;hide'"],
+ width = "full",
+ multiline = true,
+ set = function(info, value)
+ if value and match(value, "[\n\r]") then
+ value = gsub(value, "[\n\r]","")
+ end
+ E.db.bags.bagBar["visibility"] = value
+ B:SizeAndPositionBagBar()
+ end,
+ disabled = function() return not E.private.bags.bagBar end
}
}
},
@@ -427,14 +499,14 @@ E.Options.args.bags = {
player = {
order = 3,
type = "toggle",
- set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout() end,
- name = L["Bag"]
+ name = L["Bag"],
+ set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout() end
},
bank = {
order = 4,
type = "toggle",
- set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout(true) end,
- name = L["Bank"]
+ name = L["Bank"],
+ set = function(info, value) E.db.bags.split[ info[getn(info)] ] = value B:Layout(true) end
},
splitbags = {
order = 5,
@@ -538,13 +610,21 @@ E.Options.args.bags = {
type = "range",
name = L["Sell Interval"],
desc = L["Will attempt to sell another item in set interval after previous one was sold."],
- min = 0.1, max = 1, step = 0.1
+ min = 0.1, max = 1, step = 0.1,
+ disabled = function() return not E.db.bags.vendorGrays.enable end
},
details = {
order = 4,
type = "toggle",
name = L["Vendor Gray Detailed Report"],
- desc = L["Displays a detailed report of every item sold when enabled."]
+ desc = L["Displays a detailed report of every item sold when enabled."],
+ disabled = function() return not E.db.bags.vendorGrays.enable end
+ },
+ progressBar = {
+ order = 5,
+ type = "toggle",
+ name = L["Progress Bar"],
+ disabled = function() return not E.db.bags.vendorGrays.enable end
}
}
},
@@ -607,7 +687,7 @@ E.Options.args.bags = {
desc = L["Add an item or search syntax to the ignored list. Items matching the search syntax will be ignored."],
get = function(info) return "" end,
set = function(info, value)
- if (value == "" or gsub(value, "%s+", "") == "") then return end
+ if value == "" or gsub(value, "%s+", "") == "" then return end
local itemID = match(value, "item:(%d+)")
E.global.bags.ignoredItems[(itemID or value)] = value
@@ -666,4 +746,4 @@ E.Options.args.bags = {
}
}
}
-}
\ No newline at end of file
+}