remove awesomewotlk ref

This commit is contained in:
andrew6180
2025-10-17 09:37:41 -07:00
parent 836089bbdc
commit 82fc7a582d
15 changed files with 63 additions and 555 deletions
+4 -8
View File
@@ -1992,10 +1992,8 @@ Buff2Frame:RegisterEvent("PLAYER_TARGET_CHANGED")
Buff2Frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
Buff2Frame:RegisterEvent("RAID_ROSTER_UPDATE")
Buff2Frame:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
if WeakAuras.IsAwesomeEnabled() then
Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
end
Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
Buff2Frame:RegisterEvent("PLAYER_ENTERING_WORLD")
Buff2Frame:SetScript("OnEvent", EventHandler)
@@ -3642,10 +3640,8 @@ function BuffTrigger.InitMultiAura()
multiAuraFrame:RegisterEvent("UNIT_AURA")
multiAuraFrame:RegisterEvent("PLAYER_TARGET_CHANGED")
multiAuraFrame:RegisterEvent("PLAYER_FOCUS_CHANGED")
if WeakAuras.IsAwesomeEnabled() then
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
end
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
multiAuraFrame:RegisterEvent("PLAYER_LEAVING_WORLD")
multiAuraFrame:SetScript("OnEvent", BuffTrigger.HandleMultiEvent)
Private.frames["Multi-target 2 Aura Trigger Handler"] = multiAuraFrame
+6 -10
View File
@@ -1274,13 +1274,11 @@ local frame = CreateFrame("Frame");
frame.unitFrames = {};
Private.frames["WeakAuras Generic Trigger Frame"] = frame;
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
if WeakAuras.IsAwesomeEnabled() then
frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
genericTriggerRegisteredEvents["NAME_PLATE_UNIT_ADDED"] = true;
genericTriggerRegisteredEvents["NAME_PLATE_UNIT_REMOVED"] = true;
end
frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
genericTriggerRegisteredEvents["PLAYER_ENTERING_WORLD"] = true;
genericTriggerRegisteredEvents["NAME_PLATE_UNIT_ADDED"] = true;
genericTriggerRegisteredEvents["NAME_PLATE_UNIT_REMOVED"] = true;
frame:SetScript("OnEvent", HandleEvent);
function GenericTrigger.Delete(id)
@@ -3157,10 +3155,8 @@ function WeakAuras.WatchUnitChange(unit)
watchUnitChange:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT");
watchUnitChange:RegisterEvent("PARTY_MEMBERS_CHANGED")
watchUnitChange:RegisterEvent("RAID_ROSTER_UPDATE")
if WeakAuras.IsAwesomeEnabled() then
watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_ADDED")
watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
end
watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_ADDED")
watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
watchUnitChange:RegisterEvent("UNIT_FACTION")
watchUnitChange:RegisterEvent("PLAYER_ENTERING_WORLD")
watchUnitChange:RegisterEvent("UNIT_PET")
+3 -5
View File
@@ -12,9 +12,7 @@ local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
local versionString = "5.20.5 Beta"
-- Year, Month, Day, Hour, Minute, Seconds
local buildTime = "2025".."09".."14".."20".."43".."00"
local isAwesomeEnabled = C_VoiceChat and C_VoiceChat.SpeakText and 2 -- TTS available
or C_NamePlate and C_NamePlate.GetNamePlateForUnit and 1 -- Nameplates available
or false
local isTTSEnabled = C_VoiceChat and C_VoiceChat.SpeakText and true or false
local isDBMRegistered = (DBM and type(DBM.Revision) == "number" and DBM.Revision >= 20250929200404) and true or false
local flavor
@@ -31,8 +29,8 @@ WeakAuras.buildTime = buildTime
WeakAuras.newFeatureString = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0|t"
WeakAuras.BuildInfo = select(4, GetBuildInfo())
function WeakAuras.IsAwesomeEnabled()
return isAwesomeEnabled
function WeakAuras.IsTTSEnabled()
return isTTSEnabled
end
function WeakAuras.IsDBMRegistered()
+5 -7
View File
@@ -293,13 +293,11 @@ function Private.Modernize(data, oldSnapshot)
-- Version 18 was a migration for stance/form trigger, but deleted later because of migration issue
-- Version 19 were introduced in July 2019 in BfA
if WeakAuras.IsAwesomeEnabled() then
if data.internalVersion < 19 then
if data.triggers then
for triggerId, triggerData in ipairs(data.triggers) do
if triggerData.trigger.type == "status" and triggerData.trigger.event == "Cast" and triggerData.trigger.unit == "multi" then
triggerData.trigger.unit = "nameplate"
end
if data.internalVersion < 19 then
if data.triggers then
for triggerId, triggerData in ipairs(data.triggers) do
if triggerData.trigger.type == "status" and triggerData.trigger.event == "Cast" and triggerData.trigger.unit == "multi" then
triggerData.trigger.unit = "nameplate"
end
end
end
+19 -36
View File
@@ -28,11 +28,9 @@ Private.glow_action_types = {
Private.glow_frame_types = {
UNITFRAME = L["Unit Frame"],
FRAMESELECTOR = L["Frame Selector"],
PARENTFRAME = L["Parent Frame"]
PARENTFRAME = L["Parent Frame"],
NAMEPLATE = L["Nameplate"],
}
if WeakAuras.IsAwesomeEnabled() then
Private.glow_frame_types.NAMEPLATE = L["Nameplate"]
end
Private.circular_group_constant_factor_types = {
ANGLE = L["Angle and Radius"],
@@ -1136,11 +1134,9 @@ Private.unit_types_bufftrigger_2 = WeakAuras.Mixin({
arena = L["Arena"],
pet = L["Pet"],
member = L["Specific Unit"],
multi = L["Multi-target"]
multi = L["Multi-target"],
nameplate = L["Nameplate"]
}, target_unit_types)
if WeakAuras.IsAwesomeEnabled() then
Private.unit_types_bufftrigger_2.nameplate = L["Nameplate"]
end
Private.actual_unit_types = WeakAuras.Mixin({
player = L["Player"],
@@ -1162,21 +1158,17 @@ Private.actual_unit_types_cast = WeakAuras.Mixin({
arena = L["Arena"],
pet = L["Pet"],
member = L["Specific Unit"],
nameplate = L["Nameplate"],
}, target_unit_types)
if WeakAuras.IsAwesomeEnabled() then
Private.actual_unit_types_cast.nameplate = L["Nameplate"]
end
Private.actual_unit_types_cast_tooltip = L["• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs.\n• |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch.\n|cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger.\n• |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs.\n• |cffffff00Smart Group|r adjusts to your current group type, matching just the \"player\" when solo, \"party\" units (including \"player\") in a party or \"raid\" units in a raid.\n\n|cffffff00*|r Yellow Unit settings will create clones for each matching unit while this trigger is providing Dynamic Info to the Aura."]
Private.threat_unit_types = WeakAuras.Mixin({
boss = L["Boss"],
member = L["Specific Unit"],
none = L["At Least One Enemy"]
none = L["At Least One Enemy"],
nameplate = L["Nameplate"]
}, target_unit_types)
if WeakAuras.IsAwesomeEnabled() then
Private.threat_unit_types.nameplate = L["Nameplate"]
end
Private.unit_types_range_check = WeakAuras.Mixin({
pet = L["Pet"],
@@ -1315,11 +1307,9 @@ Private.anchor_frame_types = {
MOUSE = L["Mouse Cursor"],
SELECTFRAME = L["Select Frame"],
UNITFRAME = L["Unit Frames"],
CUSTOM = L["Custom"]
NAMEPLATE = L["Nameplates"],
CUSTOM = L["Custom"],
}
if WeakAuras.IsAwesomeEnabled() then
Private.anchor_frame_types.NAMEPLATE = L["Nameplates"]
end
Private.anchor_frame_types_group = {
SCREEN = L["Screen/Parent Group"],
@@ -2597,11 +2587,9 @@ Private.classification_types = {
elite = L["Elite"],
rare = L["Rare"],
normal = L["Normal"],
trivial = L["Trivial (Low Level)"]
trivial = L["Trivial (Low Level)"],
minus = L["Minus (Small Nameplate)"]
}
if WeakAuras.IsAwesomeEnabled() then
Private.classification_types.minus = L["Minus (Small Nameplate)"]
end
Private.creature_type_types = {
[1] = L["Beast"],
@@ -2817,7 +2805,7 @@ Private.send_chat_message_types = {
PRINT = L["Chat Frame"],
ERROR = L["Error Frame"]
}
if WeakAuras.IsAwesomeEnabled() == 2 then
if WeakAuras.IsTTSEnabled() then
Private.send_chat_message_types.TTS = L["Text-to-speech"]
end
@@ -3520,21 +3508,17 @@ Private.multiUnitId = {
["partypets"] = true,
["partypetsonly"] = true,
["raid"] = true,
["nameplate"] = true,
}
if WeakAuras.IsAwesomeEnabled() then
Private.multiUnitId["nameplate"] = true
end
Private.multiUnitUnits = {
["boss"] = {},
["arena"] = {},
["group"] = {},
["party"] = {},
["raid"] = {}
["raid"] = {},
["nameplate"] = {},
}
if WeakAuras.IsAwesomeEnabled() then
Private.multiUnitUnits["nameplate"] = {}
end
Private.multiUnitUnits.group["player"] = true
Private.multiUnitUnits.party["player"] = true
@@ -3568,11 +3552,10 @@ for i = 1, 40 do
Private.multiUnitUnits.group["raidpet"..i] = true
Private.multiUnitUnits.raid["raidpet"..i] = true
end
if WeakAuras.IsAwesomeEnabled() then
for i = 1, 100 do
Private.baseUnitId["nameplate"..i] = true
Private.multiUnitUnits.nameplate["nameplate"..i] = true
end
for i = 1, 100 do
Private.baseUnitId["nameplate"..i] = true
Private.multiUnitUnits.nameplate["nameplate"..i] = true
end
Private.dbm_types = {
+14 -16
View File
@@ -2853,19 +2853,20 @@ function Private.UpdateSoundIcon(data)
end
-- tts
if WeakAuras.IsAwesomeEnabled() ~= 2 then return end
if (data.actions.start.do_message and data.actions.start.message_type == "TTS")
or (data.actions.finish.do_message and data.actions.finish.message_type == "TTS")
then
Private.AuraWarnings.UpdateWarning(data.uid, "tts_action", "tts", L["This aura plays a Text To Speech via an action."])
else
Private.AuraWarnings.UpdateWarning(data.uid, "tts_action")
end
if WeakAuras.IsTTSEnabled() then
if (data.actions.start.do_message and data.actions.start.message_type == "TTS")
or (data.actions.finish.do_message and data.actions.finish.message_type == "TTS")
then
Private.AuraWarnings.UpdateWarning(data.uid, "tts_action", "tts", L["This aura plays a Text To Speech via an action."])
else
Private.AuraWarnings.UpdateWarning(data.uid, "tts_action")
end
if ttsCondition then
Private.AuraWarnings.UpdateWarning(data.uid, "tts_condition", "tts", L["This aura plays a Text To Speech via a condition."])
else
Private.AuraWarnings.UpdateWarning(data.uid, "tts_condition")
if ttsCondition then
Private.AuraWarnings.UpdateWarning(data.uid, "tts_condition", "tts", L["This aura plays a Text To Speech via a condition."])
else
Private.AuraWarnings.UpdateWarning(data.uid, "tts_condition")
end
end
end
@@ -2955,9 +2956,6 @@ function WeakAuras.PreAdd(data, snapshot)
end
end
validateUserConfig(data, data.authorOptions, data.config)
if not(WeakAuras.IsAwesomeEnabled()) then
removeNameplateUnitsAndAnchors(data)
end
data.init_started = nil
data.init_completed = nil
data.expanded = nil
@@ -3365,7 +3363,7 @@ function Private.HandleChatAction(message_type, message, message_dest, message_d
if(message_type == "PRINT") then
DEFAULT_CHAT_FRAME:AddMessage(message, r or 1, g or 1, b or 1);
elseif message_type == "TTS" then
if WeakAuras.IsAwesomeEnabled() == 2 then
if WeakAuras.IsTTSEnabled() then
if not Private.SquelchingActions() then
pcall(function()
local voice = C_TTSSettings and C_TTSSettings.GetSpeechVoiceID()
+1 -2
View File
@@ -19,10 +19,9 @@
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: WeakAurasSaved
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-2.0, LibDBIcon-1.0, LibGetFrame-1.0, LibGroupTalents, !!AddonLocale, CustomNames, BigWigs, DBM-Core, AwesomeCVar
## OptionalDeps: Ace3, LibCompress, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Masque, GTFO, LibButtonGlow-1.0, LibSpellRange-1.0, LibRangeCheck-2.0, LibDBIcon-1.0, LibGetFrame-1.0, LibGroupTalents, !!AddonLocale, CustomNames, BigWigs, DBM-Core
Compatibility.lua
Pools.lua
# External code + initialization
embeds.xml