add handling for non awesome_wotlk user

This commit is contained in:
NoM0Re
2024-07-01 19:37:29 +02:00
parent 60460fb912
commit 9bc27cada2
22 changed files with 108 additions and 68 deletions
+7 -3
View File
@@ -969,7 +969,7 @@ local function GetAllUnits(unit, allUnits, includePets)
elseif unit == "arena" then
max = 5
elseif unit == "nameplate" then
max = 40
max = C_NamePlate and C_NamePlate.GetNamePlates and #C_NamePlate.GetNamePlates() or 40
else
return function() end
end
@@ -1804,8 +1804,10 @@ frame:RegisterEvent("PLAYER_TARGET_CHANGED")
frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
frame:RegisterEvent("RAID_ROSTER_UPDATE")
frame:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
if WeakAuras.isAwesomeEnabled then
frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
end
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", EventHandler)
@@ -3277,8 +3279,10 @@ 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("PLAYER_LEAVING_WORLD")
multiAuraFrame:SetScript("OnEvent", BuffTrigger.HandleMultiEvent)
WeakAuras.frames["Multi-target 2 Aura Trigger Handler"] = multiAuraFrame
+1 -1
View File
@@ -282,7 +282,7 @@ local function CreateTestForCondition(uid, input, allConditionsTemplate, usedSta
local found = 0
local op = %q
local range = %s
local max = C_NamePlate and C_NamePlate.GetNamePlates and #C_NamePlate.GetNamePlates or 40
local max = C_NamePlate and C_NamePlate.GetNamePlates and #C_NamePlate.GetNamePlates() or 40
for i = 1, max do
local unit = "nameplate" .. i
if UnitExists(unit) and UnitCanAttack("player", unit) and WeakAuras.CheckRange(unit, range, op) then
+12 -6
View File
@@ -947,11 +947,13 @@ local frame = CreateFrame("FRAME");
frame.unitFrames = {};
WeakAuras.frames["WeakAuras Generic Trigger Frame"] = frame;
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
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;
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:SetScript("OnEvent", HandleEvent);
function GenericTrigger.Delete(id)
@@ -995,7 +997,7 @@ local function MultiUnitLoop(Func, unit, includePets, ...)
Func(unit..i, ...)
end
elseif unit == "nameplate" then
local max = C_NamePlate and C_NamePlate.GetNamePlates and #C_NamePlate.GetNamePlates or 40
local max = C_NamePlate and C_NamePlate.GetNamePlates and #C_NamePlate.GetNamePlates() or 40
for i = 1, max do
Func(unit..i, ...)
end
@@ -2475,8 +2477,10 @@ 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("UNIT_FACTION")
watchUnitChange:RegisterEvent("PLAYER_ENTERING_WORLD")
watchUnitChange:RegisterEvent("UNIT_PET")
@@ -3159,7 +3163,8 @@ do
end
-- Nameplate Target
do
if WeakAuras.isAwesomeEnabled then
do
local nameplateTargetFrame = nil
local nameplateTargets = {}
@@ -3199,6 +3204,7 @@ do
nameplateTargetFrame:SetScript("OnEvent", nameplateTargetOnEvent)
end
end
end
end
-- Mounted Frame
+4 -2
View File
@@ -8,13 +8,15 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
local versionString = "4.0.0"
local buildTime = "20201210233053"
local versionString = "4.1.0"
local buildTime = "20240701180000"
local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit or false
WeakAuras.versionString = versionStringFromToc
WeakAuras.buildTime = buildTime
WeakAuras.newFeatureString = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0|t"
WeakAuras.BuildInfo = select(4, GetBuildInfo())
WeakAuras.isAwesomeEnabled = isAwesomeEnabled
function WeakAuras.IsClassic()
return false
+1
View File
@@ -1461,6 +1461,7 @@ L["Up, then Left"] = "Hoch, dann links"
L["Up, then Right"] = "Hoch, dann rechts"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Usage:"] = "Benutzung:"
--[[Translation missing --]]
L["Use /wa minimap to show the minimap icon again."] = "Use /wa minimap to show the minimap icon again."
+1
View File
@@ -1009,6 +1009,7 @@ L["Up"] = "Up"
L["Up, then Left"] = "Up, then Left"
L["Up, then Right"] = "Up, then Right"
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!\nBug fixes, improved APIs, new events & CVars."] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!\nBug fixes, improved APIs, new events & CVars."
L["Usage:"] = "Usage:"
L["Use /wa minimap to show the minimap icon again."] = "Use /wa minimap to show the minimap icon again."
L["Use Custom Color"] = "Use Custom Color"
+2 -1
View File
@@ -288,6 +288,7 @@ function Private.Modernize(data)
-- 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
@@ -297,7 +298,7 @@ function Private.Modernize(data)
end
end
end
end
-- Version 20 was introduced July 2019 in BfA
if data.internalVersion < 20 then
if data.regionType == "icon" then
+1 -1
View File
@@ -5201,7 +5201,7 @@ Private.event_prototypes = {
if trigger.use_showLatency and trigger.unit == "player" then
WeakAuras.WatchForCastLatency()
end
if trigger.unit == "nameplate" and trigger.use_onUpdateUnitTarget then
if trigger.unit == "nameplate" and WeakAuras.isAwesomeEnabled and trigger.use_onUpdateUnitTarget then
WeakAuras.WatchForNameplateTargetChange()
end
end,
+15 -5
View File
@@ -773,11 +773,13 @@ Private.unit_types_bufftrigger_2 = {
party = L["Party"],
boss = L["Boss"],
arena = L["Arena"],
nameplate = L["Nameplate"],
pet = L["Pet"],
member = L["Specific Unit"],
multi = L["Multi-target"]
}
if WeakAuras.isAwesomeEnabled then
Private.unit_types_bufftrigger_2.nameplate = L["Nameplate"]
end
Private.actual_unit_types_with_specific = {
player = L["Player"],
@@ -796,21 +798,25 @@ Private.actual_unit_types_cast = {
raid = L["Raid"],
boss = L["Boss"],
arena = L["Arena"],
nameplate = L["Nameplate"],
pet = L["Pet"],
member = L["Specific Unit"],
}
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 = {
target = L["Target"],
focus = L["Focus"],
nameplate = L["Nameplate"],
boss = L["Boss"],
member = L["Specific Unit"],
none = L["At Least One Enemy"]
}
if WeakAuras.isAwesomeEnabled then
Private.threat_unit_types.nameplate = L["Nameplate"]
end
Private.unit_types_range_check = {
target = L["Target"],
@@ -2628,7 +2634,6 @@ Private.baseUnitId = {
}
Private.multiUnitId = {
["nameplate"] = true,
["boss"] = true,
["arena"] = true,
["group"] = true,
@@ -2639,15 +2644,20 @@ Private.multiUnitId = {
["partypetsonly"] = true,
["raid"] = true,
}
if WeakAuras.isAwesomeEnabled then
Private.multiUnitId["nameplate"] = true
end
Private.multiUnitUnits = {
["nameplate"] = {},
["boss"] = {},
["arena"] = {},
["group"] = {},
["party"] = {},
["raid"] = {}
}
if WeakAuras.isAwesomeEnabled then
Private.multiUnitUnits["nameplate"] = {}
end
Private.multiUnitUnits.group["player"] = true
Private.multiUnitUnits.party["player"] = true
+1 -1
View File
@@ -1,7 +1,7 @@
## Interface: 30300
## Title: WeakAuras
## Author: The WeakAuras Team
## Version: 4.0.0
## Version: 4.1.0
## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers.
## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores.
## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr.
+6 -6
View File
@@ -763,7 +763,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Filter by Nameplate Type"],
order = 69.1,
hidden = function() return
not (trigger.type == "aura2" and trigger.unit == "nameplate")
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))
end
},
hostility = {
@@ -779,7 +779,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = "",
order = 69.3,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and not trigger.useHostility) end
hidden = function() return not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate") and not trigger.useHostility) end
},
useNpcId = {
@@ -788,14 +788,14 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Filter by Npc ID"],
order = 69.31,
hidden = function() return
not (trigger.type == "aura2" and trigger.unit == "nameplate")
not (trigger.type == "aura2" and (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))
end
},
npcId = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Npc ID"],
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and trigger.useNpcId) end,
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate" and trigger.useNpcId) end,
order = 69.32,
desc = L["Supports multiple entries, separated by commas"]
},
@@ -804,7 +804,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = "",
order = 69.33,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and not trigger.useNpcId) end
hidden = function() return not (trigger.type == "aura2" and WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate" and not trigger.useNpcId) end
},
ignoreSelf = {
@@ -812,7 +812,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Ignore Self"],
order = 69.35,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "nameplate")) end
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or (WeakAuras.isAwesomeEnabled and trigger.unit == "nameplate"))) end
},
ignoreDead = {
+1
View File
@@ -1049,6 +1049,7 @@ Nur ein Wert kann ausgewählt werden.]=]
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "Aktualisiere benutzerdefinierten Text bei..."
--[[Translation missing --]]
L["Update in Group"] = "Update in Group"
+1
View File
@@ -1197,6 +1197,7 @@ Sólo un valor coincidente puede ser escogido.]=]
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "Actualizar Texto Personalizado En..."
--[[Translation missing --]]
L["Update in Group"] = "Update in Group"
+1
View File
@@ -1103,6 +1103,7 @@ Sólo un valor coincidente puede ser escogido.]=]
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "Actualizar texto personalizado en..."
--[[Translation missing --]]
L["Update in Group"] = "Update in Group"
+1
View File
@@ -914,6 +914,7 @@ Seule une unique valeur peut être choisie]=]
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "Mettre à jour le texte personnalisé sur..."
L["Update in Group"] = "Mettre à jour dans le Groupe"
L["Update this Aura"] = "Mettre à jour cette Aura"
+1
View File
@@ -1293,6 +1293,7 @@ Supports multiple entries, separated by commas
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
--[[Translation missing --]]
L["Update Custom Text On..."] = "Update Custom Text On..."
--[[Translation missing --]]
+1
View File
@@ -856,6 +856,7 @@ Supports multiple entries, separated by commas
--[[Translation missing --]]
L["Update %s by %s"] = "Update %s by %s"
L["Update Auras"] = "효과 업데이트"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "사용자 설정 문자 갱신 중..."
--[[Translation missing --]]
L["Update in Group"] = "Update in Group"
+1
View File
@@ -1159,6 +1159,7 @@ Supports multiple entries, separated by commas
L["Update %s by %s"] = "Update %s by %s"
--[[Translation missing --]]
L["Update Auras"] = "Update Auras"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
--[[Translation missing --]]
L["Update Custom Text On..."] = "Update Custom Text On..."
--[[Translation missing --]]
+1
View File
@@ -863,6 +863,7 @@ Supports multiple entries, separated by commas
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "В отличие от начальной или конечной анимации, основная зациклена и будет повторяться пока индикация не пропадет."
L["Update %s by %s"] = "Обновить %s (автор %s)"
L["Update Auras"] = "Обновить индикации"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "Обновление текста, заданного с помощью функции, происходит"
L["Update in Group"] = "Доступно обновление"
L["Update this Aura"] = "Применить к индикации"
+1
View File
@@ -735,6 +735,7 @@ Supports multiple entries, separated by commas
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同于开始或结束动画,主动画将不停循环,直到图示被隐藏。"
L["Update %s by %s"] = "更新%s,来自%s"
L["Update Auras"] = "更新光环"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "更新自定义文字于"
L["Update in Group"] = "更新群组内所有项"
L["Update this Aura"] = "更新此光环"
+1
View File
@@ -737,6 +737,7 @@ Supports multiple entries, separated by commas
L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同於開始或結束時的動畫,主要動畫將重複循環直到提醒效果被隱藏。"
L["Update %s by %s"] = "更新 %s 透過 %s"
L["Update Auras"] = "更新提醒效果"
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"] = "Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"
L["Update Custom Text On..."] = "更新自訂文字於..."
L["Update in Group"] = "群組中的更新"
L["Update this Aura"] = "更新這個提醒效果"
@@ -484,6 +484,11 @@ function OptionsPrivate.CreateFrame()
addFooter(L["Documentation"], [[Interface\AddOns\WeakAuras\Media\Textures\GitHub.tga]], "https://github.com/WeakAuras/WeakAuras2/wiki",
L["Check out our wiki for a large collection of examples and snippets."])
if not WeakAuras.isAwesomeEnabled then
addFooter("Awesome WotLK", [[Interface\AddOns\WeakAuras\Media\Textures\GitHub.tga]], "https://github.com/FrostAtom/awesome_wotlk",
L["Unlock Nameplate units in WeakAuras with awesome_wotlk binary patch!"])
end
addFooter(L["Find Auras"], [[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]], "https://wago.io",
L["Browse Wago, the largest collection of auras."])