diff --git a/.luacheckrc b/.luacheckrc index 52944d1e..38a2706c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -55,6 +55,7 @@ globals = { "READY_CHECK_WAITING_TEXTURE", -- FrameXML (Blizzard interface) + "AuraUtil", "BackdropTemplateMixin", "ChatFontNormal", "FauxScrollFrame_GetOffset", diff --git a/Core/EventHandlers.lua b/Core/EventHandlers.lua index be42839e..f8041b70 100644 --- a/Core/EventHandlers.lua +++ b/Core/EventHandlers.lua @@ -27,6 +27,7 @@ local UnitGUID = UnitGUID local LoadAddOn = LoadAddOn local GetBestMapForUnit = _G.C_Map.GetBestMapForUnit local GetMapInfo = _G.C_Map.GetMapInfo +local IsQuestFlaggedCompleted = C_QuestLog.IsQuestFlaggedCompleted local UnitCanAttack = _G.UnitCanAttack local UnitIsPlayer = _G.UnitIsPlayer local UnitIsDead = _G.UnitIsDead @@ -1931,6 +1932,10 @@ function R:OnLootReady(event, ...) Rarity:OnDisgustingVatFished() end + if Rarity.isOpening and Rarity.lastNode == L["Chest of Massive Gains"] then + Rarity:OnChestOfMassiveGainsOpened() + end + -- Handle mining Elementium if Rarity.relevantSpells[Rarity.previousSpell] == "Mining" @@ -2069,7 +2074,29 @@ function R:OnLootReady(event, ...) end end -local IsQuestFlaggedCompleted = C_QuestLog.IsQuestFlaggedCompleted +function Rarity:OnChestOfMassiveGainsOpened() + Rarity:Debug("Detected Opening on Chest of Massive Gains") + + local hasOpenedChestToday = IsQuestFlaggedCompleted(75325) + if hasOpenedChestToday then + Rarity:Debug("Skipping this attempt (loot lockout for Chest of Massive Gains is active)") + return + end + + local wasRequiredAuraFoundOnPlayer = false + AuraUtil.ForEachAura("player", "HELPFUL", nil, function(_, _, _, _, _, _, _, _, _, spellID) + if spellID == CONSTANTS.AURAS.ROCKS_ON_THE_ROCKS then + wasRequiredAuraFoundOnPlayer = true + end + end) + + if not wasRequiredAuraFoundOnPlayer then + Rarity:Debug(format("Required aura %s NOT found on player", L["Rocks on the Rocks"])) + return + end + + addAttemptForItem("Brul", "pets") +end function Rarity:OnDisgustingVatFished() local hasFishedEmmahThisWeek = IsQuestFlaggedCompleted(75488) diff --git a/DB/Pets/Dragonflight.lua b/DB/Pets/Dragonflight.lua index 71418784..382a783d 100644 --- a/DB/Pets/Dragonflight.lua +++ b/DB/Pets/Dragonflight.lua @@ -1172,6 +1172,23 @@ local dragonflightPets = { { m = CONSTANTS.UIMAPIDS.THE_FORBIDDEN_REACH, x = 29.2, y = 53.0, n = L["Entrance to Zskera Vaults"] }, }, }, + ["Brul"] = { + cat = CONSTANTS.ITEM_CATEGORIES.DRAGONFLIGHT, + type = CONSTANTS.ITEM_TYPES.PET, + method = CONSTANTS.DETECTION_METHODS.SPECIAL, + name = L["Brul"], + spellId = 408110, + itemId = 205114, + creatureId = 204303, + chance = 35, + sourceText = format( + L["Use %s before opening %s, which spawns after %s is defeated."], + L["Rocks on the Rocks"], + L["Chest of Massive Gains"], + L["Brullo the Strong"] + ), + coords = { { m = CONSTANTS.UIMAPIDS.ZARALEK_CAVERN, x = 41.5, y = 86.2, n = L["Chest of Massive Gains"] } }, + }, } Rarity.ItemDB.MergeItems(Rarity.ItemDB.pets, dragonflightPets) diff --git a/DB/SharedConstants.lua b/DB/SharedConstants.lua index 74e2c8c3..3410a772 100644 --- a/DB/SharedConstants.lua +++ b/DB/SharedConstants.lua @@ -317,6 +317,10 @@ C.LFG_DUNGEON_IDS = { THE_UPPER_REACHES_LAYER_16 = 2318, } +C.AURAS = { + ROCKS_ON_THE_ROCKS = 407063, +} + -- 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/Locales.lua b/Locales.lua index 8feda562..8446a925 100644 --- a/Locales.lua +++ b/Locales.lua @@ -2039,6 +2039,11 @@ L["Emmah"] = true L["Box of Rattling Chains"] = true L["Sunreaver Micro-Sentry"] = true L["Haywire Sunreaver Construct"] = true +L["Brul"] = true +L["Chest of Massive Gains"] = true +L["Use %s before opening %s, which spawns after %s is defeated."] = true +L["Brullo the Strong"] = true +L["Rocks on the Rocks"] = true --[[ The rest of this file is auto-generated using the WoWAce localization application.