Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriun committed Oct 19, 2023
1 parent 440b5d4 commit a9b4039
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 8 deletions.
12 changes: 5 additions & 7 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -674,13 +674,11 @@ function R:IsAttemptAllowed(item)
end

local _, _, _, _, _, _, _, _, _, LfgDungeonID = GetInstanceInfo()
if item.requiredDungeons[CONSTANTS.LFG_DUNGEON_IDS.TORGHAST_LAYER] then
if tContains(CONSTANTS.LFG_DUNGEON_IDS, LfgDungeonID) then
Rarity:Debug("Toy drop tracking for Torghast Layer " .. LfgDungeonID)
else
Rarity:Debug("Not in Torghast Layer.")
return false
end
if item.requiredDungeons[LfgDungeonID] then
Rarity:Debug("Toy drop tracking for Torghast Layer " .. LfgDungeonID)
else
Rarity:Debug("Not in Torghast Layer.")
return false
end

local activeCovenantID = C_Covenants.GetActiveCovenantID()
Expand Down
51 changes: 50 additions & 1 deletion DB/Toys/Shadowlands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,56 @@ local shadowlandsToys = {
},
itemId = 187075,
chance = 50,
requiredDungeons = { [CONSTANTS.LFG_DUNGEON_IDS] = true },
requiredDungeons = {
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.SKODUS_HALL_LAYER_16] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.FRACTURE_CHAMBERS_LAYER_16] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_SOULFORGES_LAYER_16] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.COLDHEART_INTERSTITIA_LAYER_16] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.MORTREGAR_LAYER_16] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_9] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_10] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_11] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_12] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_13] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_14] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_15] = true,
[CONSTANTS.LFG_DUNGEON_IDS.THE_UPPER_REACHES_LAYER_16] = true,
},
},
}

Expand Down

0 comments on commit a9b4039

Please sign in to comment.