diff --git a/.luacheckrc b/.luacheckrc index 7a107dac47..ae10dff0c8 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -499,11 +499,13 @@ globals = { "C_CurrencyInfo", "C_CVar", "C_EncounterJournal", + "C_Engraving", "C_EquipmentSet", "C_EquipmentSet.GetEquipmentSetIDs", "C_EquipmentSet.GetEquipmentSetInfo", "C_EquipmentSet.GetNumEquipmentSets", "C_GamePad", + "C_GameRules", "C_Garrison", "C_Garrison.AddFollowerToMission", "C_Garrison.AllowMissionStartAboveSoftCap", diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index f3987a3019..7d9e7e2ff6 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1396,6 +1396,24 @@ Private.load_prototype = { optional = true, events = {"PLAYER_MOUNT_DISPLAY_CHANGED"} }, + { + name = "hardcore", + display = L["Hardcore"], + type = "tristate", + init = WeakAuras.IsClassicEra() and "arg" or nil, + width = WeakAuras.normalWidth, + enable = WeakAuras.IsClassicEra(), + hidden = not WeakAuras.IsClassicEra(), + }, + { + name = "engraving", + display = L["Season of Discovery"], + type = "tristate", + init = WeakAuras.IsClassicEra() and "arg" or nil, + width = WeakAuras.normalWidth, + enable = WeakAuras.IsClassicEra(), + hidden = not WeakAuras.IsClassicEra(), + }, { name ="playerTitle", display = L["Player"], diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index af9580b7da..58e37a8262 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1756,6 +1756,12 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) warmodeActive = C_PvP.IsWarModeDesired(); end + local hardcore, runeEngraving = false, false + if WeakAuras.IsClassicEra() then + hardcore = C_GameRules.IsHardcoreActive() + runeEngraving = C_Engraving.IsEngravingEnabled() + end + local changed = 0; local shouldBeLoaded, couldBeLoaded; local parentsToCheck = {} @@ -1768,8 +1774,8 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) local loadFunc = loadFuncs[id]; local loadOpt = loadFuncsForOptions[id]; if WeakAuras.IsClassicEra() then - shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, mounted, class, player, realm, race, faction, playerLevel, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size) - couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, mounted, class, player, realm, race, faction, playerLevel, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size) + shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, mounted, hardcore, runeEngraving, class, player, realm, race, faction, playerLevel, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size) + couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, mounted, hardcore, runeEngraving, class, player, realm, race, faction, playerLevel, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size) elseif WeakAuras.IsCataClassic() then shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, vehicleUi, mounted, class, specId, player, realm, race, faction, playerLevel, role, position, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size, difficulty, difficultyIndex) couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, inEncounter, vehicle, vehicleUi, mounted, class, specId, player, realm, race, faction, playerLevel, role, position, raidRole, group, groupSize, raidMemberType, zone, zoneId, zonegroupId, instanceId, minimapText, encounter_id, size, difficulty, difficultyIndex)