Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local numBatchAuctions, totalAuctions
- local Glyph_Number = 1
- local name, _, count, _, _, _, minBid, _, buyoutPrice, _, _, _, _
- local Glyphs_Called = 0
- local GlyphMaster = CreateFrame ("FRAME", "GlyphMaster", UIParent, nil)
- GlyphMaster:RegisterEvent("AUCTION_ITEM_LIST_UPDATE")
- GlyphMaster:RegisterEvent("ADDON_LOADED")
- GlyphMaster:SetScript("OnEvent",
- function (self, event)
- if event == "ADDON_LOADED" then
- if not Glyph_List_Names then
- Glyph_List_Names = {}
- elseif not Glyph_Count then
- Glyph_Count = 0
- elseif not Glyph_List_Count then
- Glyph_List_Count = {}
- elseif not Glyph_List_MinBid then
- Glyph_List_MinBid = {}
- elseif not Glyph_List_MinBO then
- Glyph_List_MinBO = {}
- end
- elseif event == "AUCTION_ITEM_LIST_UPDATE" then
- if Glyphs_Called ~= 1 then return end
- numBatchAuctions, totalAuctions = GetNumAuctionItems("list")
- Glyph_Count = totalAuctions
- for Glyph_Number = 1, Glyph_Count do
- local name, _, count, _, _, _, minBid, _, buyoutPrice, _, _, _, _ = GetAuctionItemInfo("list", Glyph_Number)
- -- if string.find (name, "Glyph") == nil then return end
- Glyph_List_Names [Glyph_Number] = name
- Glyph_List_Count [Glyph_Number] = count
- Glyph_List_MinBid [Glyph_Number] = minBid
- Glyph_List_MinBO [Glyph_Number] = buyoutPrice
- end
- Glyphs_Called = 0
- end
- end
- )
- SLASH_GlyphMaster1 = "/GMaster"
- SLASH_GlyphMaster2 = "/GlyphM"
- function SlashCmdList.GlyphMaster ()
- QueryAuctionItems("Glyph", nil, nil, nil, 5, nil, nil, false, nil, true)
- Glyphs_Called = 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement