From afe24c614e33fa29020f93bfa42b4940960f0f88 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Mon, 18 Aug 2014 18:03:17 +0200 Subject: [PATCH] Blacklist raid mounts as they are not obtainable by coin rolls Source: https://twitter.com/olandgren/status/428229005221691392 --- BonusRollPreview.lua | 7 ++++--- encounters/Pandaria.lua | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/BonusRollPreview.lua b/BonusRollPreview.lua index 4e7f75e..2224daf 100644 --- a/BonusRollPreview.lua +++ b/BonusRollPreview.lua @@ -1,5 +1,6 @@ - -local encounterIDs = select(2, ...) +local _, ns = ... +local encounterIDs = ns.encounterIDs +local itemBlacklist = ns.itemBlacklist local currentEncounterID local itemButtons = {} @@ -236,7 +237,7 @@ function Container:Populate() local numItems = 0 for index = 1, EJ_GetNumLoot() do local name, texture, slot, itemClass, itemID, itemLink, encounterID = EJ_GetLootInfoByIndex(index) - if(encounterID == currentEncounterID) then + if(encounterID == currentEncounterID and not itemBlacklist[itemID]) then numItems = numItems + 1 local ItemButton = GetItemLine(numItems) diff --git a/encounters/Pandaria.lua b/encounters/Pandaria.lua index 38e3e87..5b1ef9a 100644 --- a/encounters/Pandaria.lua +++ b/encounters/Pandaria.lua @@ -1,5 +1,6 @@ -local encounterIDs = select(2, ...) +local _, ns = ... +ns.encounterIDs = {} -- http://www.wowhead.com/spells=0?filter=na=Bonus;cr=84:109:16;crs=1:6:5 for spellID, encounterID in next, { @@ -65,7 +66,7 @@ for spellID, encounterID in next, { [145921] = 853, -- Paragons of the Klaxxi [145922] = 869 -- Garrosh Hellscream } do - encounterIDs[spellID] = encounterID + ns.encounterIDs[spellID] = encounterID end -- Galakras has two IDs, pick whatever the client uses @@ -73,5 +74,16 @@ local Handler = CreateFrame('Frame') Handler:RegisterEvent('PLAYER_LOGIN') Handler:SetScript('OnEvent', function() EJ_SelectInstance(369) - encounterIDs[145913] = (select(3, EJ_GetEncounterInfoByIndex(5))) + ns.encounterIDs[145913] = (select(3, EJ_GetEncounterInfoByIndex(5))) end) + +ns.itemBlacklist = {} +for _, itemID in next, { + -- Mounts + 87777, -- Reins of the Astral Cloud Serpent + 93666, -- Spawn of Horridon + 95059, -- Cluth of Ji-Kun + 104253, -- Kor'kron Juggernaut +} do + ns.itemBlacklist[itemID] = true +end -- 1.7.9.5