Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tracking for Box of Rattling Chains #661

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
51 changes: 51 additions & 0 deletions DB/SharedConstants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
81 changes: 81 additions & 0 deletions DB/Toys/Shadowlands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions Locales.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading