support more custom 3.3.5 server, fix all Spec/Talent Triggers

- Closes #26
This commit is contained in:
NoM0Re
2025-02-28 17:38:11 +01:00
parent e9deb0183c
commit 07c14c2cae
7 changed files with 4114 additions and 11 deletions
+1
View File
@@ -1183,6 +1183,7 @@ function HandleEvent(frame, event, arg1, arg2, ...)
end
if (event == "PLAYER_ENTERING_WORLD") then
timer:ScheduleTimer(function()
Private.CreateTalentCache()
HandleEvent(frame, "WA_DELAYED_PLAYER_ENTERING_WORLD");
Private.ScanForLoads(nil, "WA_DELAYED_PLAYER_ENTERING_WORLD")
Private.StartProfileSystem("generictrigger WA_DELAYED_PLAYER_ENTERING_WORLD");
+13 -5
View File
@@ -1079,7 +1079,7 @@ Private.load_prototype = {
values = valuesForTalentFunction,
test = "WeakAuras.CheckTalentByIndex(%d, %d)",
multiConvertKey = nil,
events = {"PLAYER_TALENT_UPDATE", "SPELL_UPDATE_USABLE", "WA_DELAYED_PLAYER_ENTERING_WORLD"},
events = {"PLAYER_TALENT_UPDATE", "SPELL_UPDATE_USABLE"},
inverse = nil,
extraOption = nil,
control = "WeakAurasMiniTalent",
@@ -1349,6 +1349,10 @@ local function AddWatchedUnits(triggerUnit, includePets, unitisunit)
end
local function AddUnitSpecChangeInternalEvents(triggerUnit, t)
if (triggerUnit == nil) then
return
end
if Private.multiUnitUnits[triggerUnit] then
for unit in pairs(Private.multiUnitUnits[triggerUnit]) do
local isPet = WeakAuras.UnitIsPet(unit)
@@ -1356,6 +1360,8 @@ local function AddUnitSpecChangeInternalEvents(triggerUnit, t)
tinsert(t, "UNIT_SPEC_CHANGED_" .. string.lower(unit))
end
end
else
tinsert(t, "UNIT_SPEC_CHANGED_" .. string.lower(triggerUnit))
end
end
@@ -1637,6 +1643,9 @@ Private.event_prototypes = {
values = "spec_types_all",
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "player"
end,
desc = L["Requires syncing the specialization via LibGroupTalents."],
},
{
@@ -2162,7 +2171,7 @@ Private.event_prototypes = {
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "player"
end,
desc = L["Requires syncing the specialization via LibGroupTalents."],
},
@@ -2583,7 +2592,7 @@ Private.event_prototypes = {
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "player"
end,
desc = L["Requires syncing the specialization via LibGroupTalents."],
},
@@ -4711,7 +4720,6 @@ Private.event_prototypes = {
events = {
["events"] = {"PLAYER_TALENT_UPDATE", "SPELL_UPDATE_USABLE"}
},
internal_events = {"WA_DELAYED_PLAYER_ENTERING_WORLD"},
force_events = "PLAYER_TALENT_UPDATE",
name = L["Talent Known"],
init = function(trigger)
@@ -4815,7 +4823,7 @@ Private.event_prototypes = {
["Class/Spec"] = {
type = "unit",
events = {},
internal_events = {"WA_DELAYED_PLAYER_ENTERING_WORLD"},
internal_events = {"UNIT_SPEC_CHANGED_player", "WA_DELAYED_PLAYER_ENTERING_WORLD"},
force_events = "UNIT_SPEC_CHANGED_player",
name = L["Class and Specialization"],
init = function(trigger)
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -1,8 +1,11 @@
if not WeakAuras.IsLibsOK() then return end
local AddonName, Private = ...
-- Talent Data for the Warmane TBC Server "Onyxia"
if GetRealmName() ~= "Onyxia" then return end
-- Talent Data for the Warmane TBC Realms "Onyxia" and "Blackrock TBC"
if GetRealmName() ~= "Onyxia" and
not (GetRealmName() == "Blackrock [PvP only]" and GetExpansionLevel() == 1) then
return
end
Private.talentInfo = {
["HUNTER"] = {
+7 -2
View File
@@ -1,8 +1,13 @@
if not WeakAuras.IsLibsOK() then return end
local AddonName, Private = ...
-- Talent Data for normal Wrath Server
if GetRealmName() == "Onyxia" then return end
-- Talent Data for normal Wrath Realms
if GetRealmName() == "Onyxia" or
GetRealmName() == "Kezan" or
(GetRealmName() == "Blackrock [PvP only]" and GetExpansionLevel() == 1)
then
return
end
Private.talentInfo = {
["HUNTER"] = {
+1 -2
View File
@@ -891,7 +891,7 @@ local function LoadCustomActionFunctions(data)
end
Private.talent_types_specific = {}
local function CreateTalentCache()
function Private.CreateTalentCache()
local _, player_class = UnitClass("player")
Private.talent_types_specific[player_class] = Private.talent_types_specific[player_class] or {};
@@ -1249,7 +1249,6 @@ loadedFrame:SetScript("OnEvent", function(self, event, ...)
if not isInitialLogin then
isInitialLogin = true
Private.PostAddCompanion()
CreateTalentCache()
end
elseif(event == "PLAYER_REGEN_ENABLED") then
callback = function()
+1
View File
@@ -34,6 +34,7 @@ ArchiveTypes\Repository.lua
DefaultOptions.lua
# Core files
Types_ClassicPlus.lua
Types_TBC.lua
Types_Wrath.lua
Types.lua