add not Item Equipped, not Spell Known, Race load options

This commit is contained in:
NoM0Re
2024-07-12 19:54:09 +02:00
parent b5b9a6f42d
commit 0d29781570
15 changed files with 77 additions and 3 deletions
+12
View File
@@ -2504,10 +2504,22 @@ function WeakAuras.WatchUnitChange(unit)
end
end
elseif event == "NAME_PLATE_UNIT_ADDED" then
local oldGUID = watchUnitChange.unitChangeGUIDS[unit]
local newGUID = WeakAuras.UnitExistsFixed(unit) and UnitGUID(unit)
if oldGUID ~= newGUID then
WeakAuras.ScanEvents("UNIT_CHANGED_" .. unit, unit)
end
watchUnitChange.unitChangeGUIDS[unit] = newGUID
watchUnitChange.raidmark[unit] = GetRaidTargetIndex(unit) or 0
watchUnitChange.nameplateFaction[unit] = WeakAuras.GetPlayerReaction(unit)
WeakAuras.ScanEvents(event, unit)
elseif event == "NAME_PLATE_UNIT_REMOVED" then
local oldGUID = watchUnitChange.unitChangeGUIDS[unit]
local newGUID = WeakAuras.UnitExistsFixed(unit) and UnitGUID(unit)
if oldGUID ~= newGUID then
WeakAuras.ScanEvents("UNIT_CHANGED_" .. unit, unit)
end
watchUnitChange.unitChangeGUIDS[unit] = newGUID
watchUnitChange.raidmark[unit] = nil
watchUnitChange.nameplateFaction[unit] = nil
WeakAuras.ScanEvents(event, unit)
+4
View File
@@ -73,10 +73,14 @@ L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift-Click|
--[[Translation missing --]]
L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Item Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
--[[Translation missing --]]
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Spell Known"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00Extra Options:|r None"
+2
View File
@@ -53,9 +53,11 @@ L["|cffeda55fLeft-Click|r to toggle showing the main window."] = "|cffeda55fLeft
L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."
L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda55fRight-Click|r to toggle performance profiling window."
L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Item Equipped"
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift-Click|r to pause addon execution."
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Spell Known"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00Extra Options:|r None"
L["10 Man Raid"] = "10 Man Raid"
+2
View File
@@ -54,10 +54,12 @@ L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "|cffeda55
L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda55fRight-Click|r to toggle performance profiling window."
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fMayús clic|r para pausar la ejecución del addon."
L["|cffff0000deprecated|r"] = "|cffff0000obsoleto|r"
L["|cFFFF0000Not|r Item Equipped"] = "Objeto |cFFFF0000no|r equipado"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000No|r hechizo conocido"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
--[[Translation missing --]]
+2
View File
@@ -55,10 +55,12 @@ L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda5
--[[Translation missing --]]
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift-Click|r to pause addon execution."
L["|cffff0000deprecated|r"] = "|cffff0000obsoleto|r"
L["|cFFFF0000Not|r Item Equipped"] = "Objeto |cFFFF0000no|r equipado"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000No|r hechizo conocido"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
--[[Translation missing --]]
+3
View File
@@ -61,9 +61,12 @@ L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fMaj-Clic|r P
--[[Translation missing --]]
L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Item Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Spell Known"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Options supplémentaires :|r %s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00Options supplémentaires :|r Aucun"
L["10 Man Raid"] = "Raid 10 Joueurs"
+3
View File
@@ -58,10 +58,13 @@ L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda5
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift Click|r per mettere in pausa l'addon."
--[[Translation missing --]]
L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
L["|cFFFF0000Not|r Item Equipped"] = "착용하지 |cFFFF0000않은|r 아이템"
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Oggetto Equipaggiato "
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Incantesimo Conosciuto"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
--[[Translation missing --]]
+1
View File
@@ -57,6 +57,7 @@ L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r 플레이어 이름/서버"
L["|cFFFF0000Not|r Spell Known"] = "습득하지 |cFFFF0000않은|r 주문"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00추가 옵션:|r %s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00추가 옵션:|r 없음"
L["10 Man Raid"] = "10인 공격대"
+3
View File
@@ -56,11 +56,14 @@ L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda5
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift-Click|r para pausar a execução do addon."
--[[Translation missing --]]
L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r"
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Item Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000Not|r Item Bonus Id Equipped"
--[[Translation missing --]]
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Player Name/Realm"
--[[Translation missing --]]
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Spell Known"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Extra Options:|r %s"
--[[Translation missing --]]
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00Extra Options:|r None"
+2
View File
@@ -60,8 +60,10 @@ L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "|cFFEDA55
L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cFFEDA55FПравый клик|r - показать или скрыть окно профилирования."
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cFFEDA55FShift-клик|r - приостановить выполнение аддона."
L["|cffff0000deprecated|r"] = "|cffff0000устарело|r"
L["|cFFFF0000Not|r Item Equipped"] = "Предмет |cFFFF0000НЕ|r надет"
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "ID бонуса надетого предмета |cFFFF0000НЕ|r"
L["|cFFFF0000Not|r Player Name/Realm"] = "Имя / Игровой мир игрока |cFFFF0000НЕ|r"
L["|cFFFF0000Not|r Spell Known"] = "Заклинание |cFFFF0000НЕ|rизвестно"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFFFCC00Дополнительные параметры:|r %s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFFFCC00Дополнительные параметры:|r нет"
--[[Translation missing --]]
+2
View File
@@ -53,8 +53,10 @@ L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "|cffeda55
L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda55f右键|r显示/隐藏性能分析窗口。"
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift + 左键|r暂停插件执行。"
L["|cffff0000deprecated|r"] = "|cffff0000已弃用|r"
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000未|r装备物品"
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000非|r 已装备物品增益ID"
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000非|r 玩家名字/服务器"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000未|r学会的法术"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00额外选项:|r%s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00额外选项:|r无"
L["10 Man Raid"] = "10人团队"
+2
View File
@@ -54,8 +54,10 @@ L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "|cffeda55
L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda55f右鍵|r 切換顯示分析視窗。"
L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fShift-左鍵|r 暫停執行插件。"
L["|cffff0000deprecated|r"] = "|cffff0000已棄用|r"
L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000無|r裝備物品"
L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "|cFFFF0000不是|r裝備的物品獎勵ID"
L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000不是|r玩家名字/伺服器"
L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000不是|r已知法術"
L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00額外選項:|r %s"
L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00額外選項:|r 無"
L["10 Man Raid"] = "10人團隊"
+23 -1
View File
@@ -914,6 +914,21 @@ Private.load_prototype = {
events = {"SPELLS_CHANGED"},
showExactOption = true
},
{
name = "not_spellknown",
display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Spell Known"],
type = "spell",
test = "not WeakAuras.IsSpellKnownForLoad(%s, %s)",
events = {"SPELLS_CHANGED"},
showExactOption = true
},
{
name = "race",
display = L["Player Race"],
type = "multiselect",
values = "race_types",
init = "arg"
},
{
name = "faction",
display = L["Player Faction"],
@@ -990,7 +1005,14 @@ Private.load_prototype = {
type = "item",
test = "IsEquippedItem(%s)",
events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"}
}
},
{
name = "not_itemequiped",
display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Item Equipped"],
type = "item",
test = "not IsEquippedItem(%s)",
events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"}
},
}
};
+13
View File
@@ -840,6 +840,19 @@ for i, class in ipairs(CLASS_SORT_ORDER) do
WeakAuras.class_types[class] = string.format("|c%s%s|r", WA_GetClassColor(class), LOCALIZED_CLASS_NAMES_MALE[class])
end
WeakAuras.race_types = {
Human = "Human",
Orc = "Orc",
Dwarf = "Dwarf",
NightElf = "Night Elf",
Scourge = "Undead",
Tauren = "Tauren",
Gnome = "Gnome",
Troll = "Troll",
BloodElf = "Blood Elf",
Draenei = "Draenei",
}
Private.faction_group = {
Alliance = L["Alliance"],
Horde = L["Horde"],
+3 -2
View File
@@ -1239,6 +1239,7 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...)
end
local player, realm, zone, subzone = UnitName("player"), GetRealmName(), GetRealZoneText(), GetSubZoneText();
local _, race = UnitRace("player")
local faction = UnitFactionGroup("player")
local zoneId = GetCurrentMapAreaID()
local raidRole = false;
@@ -1275,8 +1276,8 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...)
if (data and not data.controlledChildren) then
local loadFunc = loadFuncs[id];
local loadOpt = loadFuncsForOptions[id];
shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, raidRole, group, player, realm, class, faction, playerLevel, raidMemberType, zone, zoneId, subzone, size, difficulty);
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, raidRole, group, player, realm, class, faction, playerLevel, raidMemberType, zone, zoneId, subzone, size, difficulty);
shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, raidRole, group, player, realm, class, race, faction, playerLevel, raidMemberType, zone, zoneId, subzone, size, difficulty);
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, raidRole, group, player, realm, class, race, faction, playerLevel, raidMemberType, zone, zoneId, subzone, size, difficulty);
if(shouldBeLoaded and not loaded[id]) then
changed = changed + 1;