From 38c3bf3330237448883b43e43ecc25d401c8baf2 Mon Sep 17 00:00:00 2001 From: cyriun Date: Wed, 11 Oct 2023 15:13:29 +1100 Subject: [PATCH] Core: Implemented tracking for Box of Rattling Chains --- Core.lua | 6 +++ DB/SharedConstants.lua | 51 ++++++++++++++++++++++++++ DB/Toys/Shadowlands.lua | 81 +++++++++++++++++++++++++++++++++++++++++ Locales.lua | 1 + 4 files changed, 139 insertions(+) diff --git a/Core.lua b/Core.lua index 6522c2dd..3e80df6c 100644 --- a/Core.lua +++ b/Core.lua @@ -674,6 +674,12 @@ function R:IsAttemptAllowed(item) return false end + local dungeonID = select(10, GetInstanceInfo()) + if dungeonID and item.requiredDungeons and not item.requiredDungeons[dungeonID] then + Rarity:Debug(format("Attempts for item %s are disallowed (not a required dungeon: %d)", item.name, dungeonID)) + return false + end + local activeCovenantID = C_Covenants.GetActiveCovenantID() if item.requiresCovenant and item.requiredCovenantID and activeCovenantID ~= item.requiredCovenantID then local activeCovenantData = C_Covenants.GetCovenantData(activeCovenantID) diff --git a/DB/SharedConstants.lua b/DB/SharedConstants.lua index 869ab8de..2a3a8e64 100644 --- a/DB/SharedConstants.lua +++ b/DB/SharedConstants.lua @@ -264,6 +264,57 @@ C.FACTION_IDS = { ISKAARA_TUSKARR = 2511, } +C.LFG_DUNGEON_IDS = { + SKOLDUS_HALL_LAYER_9 = 2197, + SKOLDUS_HALL_LAYER_10 = 2198, + SKOLDUS_HALL_LAYER_11 = 2199, + SKOLDUS_HALL_LAYER_12 = 2200, + SKOLDUS_HALL_LAYER_13 = 2295, + SKOLDUS_HALL_LAYER_14 = 2296, + SKOLDUS_HALL_LAYER_15 = 2297, + SKOLDUS_HALL_LAYER_16 = 2298, + FRACTURE_CHAMBERS_LAYER_9 = 2201, + FRACTURE_CHAMBERS_LAYER_10 = 2202, + FRACTURE_CHAMBERS_LAYER_11 = 2203, + FRACTURE_CHAMBERS_LAYER_12 = 2204, + FRACTURE_CHAMBERS_LAYER_13 = 2299, + FRACTURE_CHAMBERS_LAYER_14 = 2300, + FRACTURE_CHAMBERS_LAYER_15 = 2301, + FRACTURE_CHAMBERS_LAYER_16 = 2302, + THE_SOULFORGES_LAYER_9 = 2205, + THE_SOULFORGES_LAYER_10 = 2206, + THE_SOULFORGES_LAYER_11 = 2207, + THE_SOULFORGES_LAYER_12 = 2208, + THE_SOULFORGES_LAYER_13 = 2303, + THE_SOULFORGES_LAYER_14 = 2304, + THE_SOULFORGES_LAYER_15 = 2305, + THE_SOULFORGES_LAYER_16 = 2306, + COLDHEART_INTERSTITIA_LAYER_9 = 2209, + COLDHEART_INTERSTITIA_LAYER_10 = 2210, + COLDHEART_INTERSTITIA_LAYER_11 = 2211, + COLDHEART_INTERSTITIA_LAYER_12 = 2212, + COLDHEART_INTERSTITIA_LAYER_13 = 2307, + COLDHEART_INTERSTITIA_LAYER_14 = 2308, + COLDHEART_INTERSTITIA_LAYER_15 = 2309, + COLDHEART_INTERSTITIA_LAYER_16 = 2310, + MORTREGAR_LAYER_9 = 2213, + MORTREGAR_LAYER_10 = 2214, + MORTREGAR_LAYER_11 = 2215, + MORTREGAR_LAYER_12 = 2216, + MORTREGAR_LAYER_13 = 2311, + MORTREGAR_LAYER_14 = 2312, + MORTREGAR_LAYER_15 = 2313, + MORTREGAR_LAYER_16 = 2314, + THE_UPPER_REACHES_LAYER_9 = 2217, + THE_UPPER_REACHES_LAYER_10 = 2218, + THE_UPPER_REACHES_LAYER_11 = 2219, + THE_UPPER_REACHES_LAYER_12 = 2220, + THE_UPPER_REACHES_LAYER_13 = 2315, + THE_UPPER_REACHES_LAYER_14 = 2316, + THE_UPPER_REACHES_LAYER_15 = 2317, + THE_UPPER_REACHES_LAYER_16 = 2318, +} + -- This doesn't really belong here and needs streamlining anyway, but for now this is the best place. -- Tooltip Filters (Note: Currently, this system is merely a stub. but more (and custom) filters may be added in the future) -- These are used to decide whether the tooltip should be extended to display information about an CONSTANTS.ITEM_TYPES.ITEM for the NPCs listed in its tooltipNpcs table. Useful if we want to draw attention to an CONSTANTS.ITEM_TYPES.ITEM, but not every player can obtain it diff --git a/DB/Toys/Shadowlands.lua b/DB/Toys/Shadowlands.lua index 2ba193f4..cddfeaa0 100644 --- a/DB/Toys/Shadowlands.lua +++ b/DB/Toys/Shadowlands.lua @@ -458,6 +458,87 @@ local shadowlandsToys = { sourceText = format(L["Can be used to summon %s, but only once per day"], L["Hirukon"]), coords = { { x = 52, 2, y = 75, 3, m = CONSTANTS.UIMAPIDS.ZERETH_MORTIS, n = L["Hirukon"] } }, }, + ["Box of Rattling Chains"] = { + cat = CONSTANTS.ITEM_CATEGORIES.SHADOWLANDS, + type = CONSTANTS.ITEM_TYPES.ITEM, + isToy = true, + method = CONSTANTS.DETECTION_METHODS.NPC, + name = L["Box of Rattling Chains"], + npcs = { + 171422, + 153011, + 151331, + 153165, + 156239, + 155250, + 155251, + 155945, + 170418, + 153451, + 153382, + 169859, + 157122, + 159190, + 159755, + 152995, + 151329, + 153174, + 156015, + }, + itemId = 187075, + chance = 50, + coords = { { m = CONSTANTS.UIMAPIDS.TORGHAST } }, + requiredDungeons = { + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_9] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_10] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_11] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_12] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_13] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_14] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_HALL_LAYER_15] = true, + [CONSTANTS.LFG_DUNGEON_IDS.SKOLDUS_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, + }, + }, } Rarity.ItemDB.MergeItems(Rarity.ItemDB.toys, shadowlandsToys) diff --git a/Locales.lua b/Locales.lua index 528b9940..45c16d59 100644 --- a/Locales.lua +++ b/Locales.lua @@ -2034,6 +2034,7 @@ L["Obsidian Grand Cache"] = true L["Frozen Coffer"] = true L["Obsidian Battle Horn"] = true L["Emmah"] = true +L["Box of Rattling Chains"] = true --[[ The rest of this file is auto-generated using the WoWAce localization application.