Fix incorrect login message, rework LibGroupTalentsWrapper
The login message was triggered incorrectly due to the "Beta" tag in the version string. This has been fixed. Almost completely removed due to impracticality with the 3.3.5a API. When RAID_ROSTER_UPDATE or PARTY_MEMBERS_CHANGED fires, data is unavailable for ~1.5 seconds. If these events fire again within that time, the timer needs to be restarted, leading to excessive code complexity and requiring handling for every edge case. Instead, we now simply check if the unit has changed when the library fires its callback.
This commit is contained in:
@@ -18,6 +18,8 @@ local MONEY = MONEY
|
||||
local WeakAuras = WeakAuras
|
||||
local L = WeakAuras.L
|
||||
|
||||
local LibGroupTalents = LibStub("LibGroupTalents-1.0")
|
||||
|
||||
local SpellRange = LibStub("SpellRange-1.0")
|
||||
function WeakAuras.IsSpellInRange(spellId, unit)
|
||||
return SpellRange.IsSpellInRange(spellId, unit)
|
||||
@@ -796,6 +798,12 @@ function WeakAuras.GetSpellCritChance()
|
||||
return spellCrit
|
||||
end
|
||||
|
||||
function WeakAuras.GetSpecString(unit)
|
||||
local spec = WeakAuras.LGT:GetUnitTalentSpec(unit)
|
||||
local class = select(2, UnitClass(unit))
|
||||
return spec and class and (class .. spec)
|
||||
end
|
||||
|
||||
function WeakAuras.IsSpellKnownForLoad(spell, exact)
|
||||
local result = WeakAuras.IsSpellKnown(spell)
|
||||
if exact or result then
|
||||
@@ -1589,7 +1597,7 @@ Private.event_prototypes = {
|
||||
name = "specId",
|
||||
display = L["Specialization"],
|
||||
type = "multiselect",
|
||||
init = "WeakAuras.SpecForUnit(unit)",
|
||||
init = "WeakAuras.LGT:GetUnitTalentSpec(unit)",
|
||||
values = "spec_types_all",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -1608,7 +1616,7 @@ Private.event_prototypes = {
|
||||
name = "role",
|
||||
display = L["Spec Role"],
|
||||
type = "select",
|
||||
init = "WeakAuras.GetUnitRole(unit)",
|
||||
init = "WeakAuras.LGT:GetUnitRole(unit)",
|
||||
values = "role_types",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -2113,7 +2121,7 @@ Private.event_prototypes = {
|
||||
name = "specId",
|
||||
display = L["Specialization"],
|
||||
type = "multiselect",
|
||||
init = "WeakAuras.SpecForUnit(unit)",
|
||||
init = "WeakAuras.GetSpecString(unit)",
|
||||
values = "spec_types_all",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -2126,7 +2134,7 @@ Private.event_prototypes = {
|
||||
name = "role",
|
||||
display = L["Spec Role"],
|
||||
type = "select",
|
||||
init = "WeakAuras.GetUnitRole(unit)",
|
||||
init = "WeakAuras.LGT:GetUnitRole(unit)",
|
||||
values = "role_types",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -2534,7 +2542,7 @@ Private.event_prototypes = {
|
||||
name = "specId",
|
||||
display = L["Specialization"],
|
||||
type = "multiselect",
|
||||
init = "WeakAuras.SpecForUnit(unit)",
|
||||
init = "WeakAuras.GetSpecString(unit)",
|
||||
values = "spec_types_all",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -2547,7 +2555,7 @@ Private.event_prototypes = {
|
||||
name = "role",
|
||||
display = L["Spec Role"],
|
||||
type = "select",
|
||||
init = "WeakAuras.GetUnitRole(unit)",
|
||||
init = "WeakAuras.LGT:GetUnitRole(unit)",
|
||||
values = "role_types",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
@@ -6580,7 +6588,7 @@ Private.event_prototypes = {
|
||||
name = "role",
|
||||
display = L["Spec Role"],
|
||||
type = "select",
|
||||
init = "WeakAuras.GetUnitRole(unit)",
|
||||
init = "WeakAuras.LGT:GetUnitRole(unit)",
|
||||
values = "role_types",
|
||||
store = true,
|
||||
conditionType = "select",
|
||||
|
||||
Reference in New Issue
Block a user