beta
This commit is contained in:
+141
-44
@@ -87,7 +87,7 @@ local constants = {
|
||||
nameRealmFilterDesc = L[" Filter formats: 'Name', 'Name-Realm', '-Realm'. \n\nSupports multiple entries, separated by commas\n"],
|
||||
}
|
||||
|
||||
WeakAuras.function_strings = {
|
||||
Private.function_strings = {
|
||||
count = [[
|
||||
return function(count)
|
||||
if(count %s %s) then
|
||||
@@ -147,7 +147,7 @@ function WeakAuras.GetHSVTransition(perc, r1, g1, b1, a1, r2, g2, b2, a2)
|
||||
end
|
||||
|
||||
|
||||
WeakAuras.anim_function_strings = {
|
||||
Private.anim_function_strings = {
|
||||
straight = [[
|
||||
function(progress, start, delta)
|
||||
return start + (progress * delta)
|
||||
@@ -330,7 +330,7 @@ WeakAuras.anim_function_strings = {
|
||||
]]
|
||||
};
|
||||
|
||||
WeakAuras.anim_presets = {
|
||||
Private.anim_presets = {
|
||||
-- Start and Finish
|
||||
slidetop = {
|
||||
type = "custom",
|
||||
@@ -651,20 +651,6 @@ function WeakAuras.IsSpellKnownIncludingPet(spell)
|
||||
end
|
||||
end
|
||||
|
||||
local talent_types_specific = {}
|
||||
local talents_ids = {
|
||||
DEATHKNIGHT = {{48979,48997,49182,48978,49004,55107,48982,48987,49467,48985,49145,49015,48977,49006,49005,48988,53137,49027,49016,50365,62905,49018,55233,49189,55050,49023,61154,49028}, {49175,49455,49042,55061,49140,49226,50880,49039,51468,51123,49149,49137,49186,49471,49796,55610,49024,49188,50040,49203,50384,65661,54639,51271,49200,49143,50187,49202,49184}, {51745,48962,55129,49036,48963,49588,48965,49013,51459,49158,49146,49219,55620,49194,49220,49223,55666,49224,49208,52143,66799,51052,50391,63560,49032,49222,49217,51099,55090,50117,49206}},
|
||||
DRUID = {{16814,57810,16845,35363,16821,16836,16880,57865,16819,16909,16850,33589,5570,57849,33597,16896,33592,24858,48384,33600,48389,33603,48516,50516,33831,48488,48506,48505}, {16934,16858,16947,16998,16929,17002,61336,16942,16966,16972,37116,48409,16940,49377,33872,57878,17003,33853,17007,34297,33851,57873,33859,48483,48492,33917,48532,48432,63503,50334}, {17050,17063,17056,17069,17118,16833,17106,16864,48411,24968,17111,17116,17104,17123,33879,17074,34151,18562,33881,33886,48496,48539,65139,48535,63410,51179,48438}},
|
||||
HUNTER = {{19552,19583,35029,19549,19609,24443,19559,53265,19616,19572,19598,19578,19577,19590,34453,19621,34455,19574,34462,53252,34466,53262,34692,53256,56314,53270}, {19407,53620,19426,34482,19421,19485,34950,19454,19434,34948,19464,19416,35100,23989,19461,34475,19507,53234,19506,35104,34485,53228,53215,34490,53221,53241,53209}, {52783,19498,19159,19290,19184,19376,34494,19255,19503,19295,19286,56333,56342,56339,19370,19306,19168,34491,34500,19386,34497,34506,53295,53298,3674,53302,53290,53301}},
|
||||
MAGE = {{11210,11222,11237,28574,29441,11213,11247,11242,44397,54646,11252,11255,18462,29447,31569,12043,11232,31574,15058,31571,31579,12042,44394,44378,31584,31589,44404,44400,35578,44425}, {11078,18459,11069,11119,54747,11108,11100,11103,11366,11083,11095,11094,29074,31638,11115,11113,31641,11124,34293,11129,31679,64353,31656,44442,31661,44445,44449,44457}, {11071,11070,31670,11207,11189,29438,11175,11151,12472,11185,16757,11160,11170,11958,11190,31667,55091,11180,44745,11426,31674,31682,44543,44546,31687,44557,44566,44572}},
|
||||
PALADIN = {{20205,20224,20237,20257,9453,31821,20210,20234,20254,20244,53660,31822,20216,20359,31825,5923,31833,20473,31828,53551,31837,31842,53671,53569,53556,53563}, {63646,20262,31844,20174,20096,64205,20468,20143,53527,20487,20138,20911,20177,31848,20196,31785,20925,31850,20127,31858,53590,31935,53583,53709,53695,53595}, {20060,20101,25956,20335,20042,9452,20117,20375,26022,9799,32043,31866,20111,31869,20049,31871,53486,20066,31876,31879,53375,53379,35395,53501,53380,53385}},
|
||||
PRIEST = {{14522,47586,14523,14747,14749,14531,14521,14751,14748,33167,14520,14750,33201,18551,63574,33186,34908,45234,10060,63504,57470,47535,47507,47509,33206,47516,52795,47540}, {14913,14908,14889,27900,18530,19236,27811,14892,27789,14912,14909,14911,20711,14901,33150,14898,34753,724,33142,64127,33158,63730,63534,34861,47558,47562,47788}, {15270,15337,15259,15318,15275,15260,15392,15273,15407,15274,17322,15257,15487,15286,27839,33213,14910,63625,15473,33221,47569,33191,64044,34914,47580,47573,47585}},
|
||||
ROGUE = {{14162,14144,14138,14156,51632,13733,14983,14168,14128,16513,14113,31208,14177,14174,31244,14186,14158,51625,58426,31380,51634,31234,31226,1329,51627,51664,51662}, {13741,13732,13715,14165,13713,13705,13742,14251,13706,13754,13743,13712,18427,13709,13877,13960,30919,31124,31122,13750,31130,5952,35541,51672,32601,51682,51685,51690}, {14179,13958,14057,30892,14076,13975,13981,14278,14171,13983,13976,14079,30894,14185,14082,16511,31221,30902,31211,14183,31228,31216,51692,51698,36554,58414,51708,51713}},
|
||||
SHAMAN = {{16039,16035,16038,28996,30160,16040,16164,16089,16086,29062,28999,16041,30664,30672,16578,16166,51483,63370,51466,30675,51474,30706,51480,62097,51490}, {16259,16043,17485,16258,16255,16262,16261,16266,43338,16254,16256,16252,29192,16268,51883,30802,29082,63373,30816,30798,17364,51525,60103,51521,30812,30823,51523,51528,51533}, {16182,16173,16184,29187,16179,16180,16181,55198,16176,16187,16194,29206,16188,30864,16178,30881,16190,51886,51554,30872,30867,51556,974,51560,51562,61295}},
|
||||
WARLOCK = {{18827,18174,17810,18179,18213,18182,17804,53754,17783,18288,18218,18094,32381,32385,63108,18223,54037,18271,47195,30060,18220,30054,32477,47198,30108,58435,47201,48181}, {18692,18694,18697,47230,18703,18705,18731,18754,19028,18708,30143,18769,18709,30326,18767,23785,47245,30319,47193,35691,30242,63156,54347,30146,63117,47236,59672}, {17793,17788,18119,63349,17778,18126,17877,17959,18135,17917,17927,34935,17815,18130,30299,17954,17962,30293,18096,30288,54117,47258,30283,47220,47266,50796}},
|
||||
WARRIOR = {{12282,16462,12286,12285,12300,12295,12290,12296,16493,12834,12163,56636,12700,12328,12284,12281,20504,12289,46854,29834,12294,46865,12862,64976,35446,46859,29723,29623,29836,46867,46924}, {61216,12321,12320,12324,12322,12329,12323,16487,12318,23584,20502,12317,29590,12292,29888,20500,12319,46908,23881,29721,46910,29759,60970,29801,46913,56927,46917}, {12301,12298,12287,50685,12297,12975,12797,29598,12299,59088,12313,12308,12312,12809,12311,16538,29593,50720,29787,29140,46945,57499,20243,47294,46951,58872,46968}}
|
||||
}
|
||||
|
||||
local function valuesForTalentFunction(trigger)
|
||||
return function()
|
||||
local single_class;
|
||||
@@ -689,27 +675,27 @@ local function valuesForTalentFunction(trigger)
|
||||
end
|
||||
|
||||
-- If a single specific class was found, load the specific list for it
|
||||
if single_class and talents_ids[single_class] then
|
||||
if not talent_types_specific[single_class] then
|
||||
talent_types_specific[single_class] = {}
|
||||
for tab = 1, #talents_ids[single_class] do
|
||||
for num_talent = 1, #talents_ids[single_class][tab] do
|
||||
local spellName, _, spellIcon = GetSpellInfo(talents_ids[single_class][tab][num_talent])
|
||||
if single_class and Private.talents_ids[single_class] then
|
||||
if not Private.talent_types_specific[single_class] then
|
||||
Private.talent_types_specific[single_class] = {}
|
||||
for tab = 1, #Private.talents_ids[single_class] do
|
||||
for num_talent = 1, #Private.talents_ids[single_class][tab] do
|
||||
local spellName, _, spellIcon = GetSpellInfo(Private.talents_ids[single_class][tab][num_talent])
|
||||
local talentId = (tab - 1) * MAX_NUM_TALENTS + num_talent
|
||||
if spellName and spellIcon then
|
||||
talent_types_specific[single_class][talentId] = ("|T%s:24|t %s"):format(spellIcon, spellName)
|
||||
Private.talent_types_specific[single_class][talentId] = ("|T%s:24|t %s"):format(spellIcon, spellName)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return talent_types_specific[single_class];
|
||||
return Private.talent_types_specific[single_class];
|
||||
else
|
||||
return WeakAuras.talent_types;
|
||||
return Private.talent_types;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
WeakAuras.load_prototype = {
|
||||
Private.load_prototype = {
|
||||
args = {
|
||||
{
|
||||
name = "combat",
|
||||
@@ -887,8 +873,8 @@ local function AddUnitChangeInternalEvents(triggerUnit, t)
|
||||
WeakAuras.WatchForPetDeath();
|
||||
tinsert(t, "PET_UPDATE")
|
||||
else
|
||||
if WeakAuras.multiUnitUnits[triggerUnit] then
|
||||
for unit in pairs(WeakAuras.multiUnitUnits[triggerUnit]) do
|
||||
if Private.multiUnitUnits[triggerUnit] then
|
||||
for unit in pairs(Private.multiUnitUnits[triggerUnit]) do
|
||||
tinsert(t, "UNIT_CHANGED_" .. string.lower(unit))
|
||||
WeakAuras.WatchUnitChange(unit)
|
||||
end
|
||||
@@ -919,8 +905,8 @@ end
|
||||
local unitHelperFunctions = {
|
||||
UnitChangedForceEvents = function(trigger)
|
||||
local events = {}
|
||||
if WeakAuras.multiUnitUnits[trigger.unit] then
|
||||
for unit in pairs(WeakAuras.multiUnitUnits[trigger.unit]) do
|
||||
if Private.multiUnitUnits[trigger.unit] then
|
||||
for unit in pairs(Private.multiUnitUnits[trigger.unit]) do
|
||||
tinsert(events, {"UNIT_CHANGED_" .. unit, unit})
|
||||
end
|
||||
else
|
||||
@@ -946,7 +932,7 @@ local unitHelperFunctions = {
|
||||
end
|
||||
}
|
||||
|
||||
WeakAuras.event_prototypes = {
|
||||
Private.event_prototypes = {
|
||||
["Combo Points"] = {
|
||||
type = "status",
|
||||
events = {
|
||||
@@ -1033,7 +1019,7 @@ WeakAuras.event_prototypes = {
|
||||
store = true,
|
||||
conditionType = "bool",
|
||||
desc = function() return L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] end,
|
||||
enable = function(trigger) return not WeakAuras.multiUnitUnits[trigger.unit] end
|
||||
enable = function(trigger) return not Private.multiUnitUnits[trigger.unit] end
|
||||
},
|
||||
{
|
||||
name = "name",
|
||||
@@ -1163,6 +1149,115 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
automaticrequired = true
|
||||
},
|
||||
["Experience"] = {
|
||||
type = "status",
|
||||
canHaveDuration = false,
|
||||
events = {
|
||||
["events"] = {
|
||||
"PLAYER_XP_UPDATE",
|
||||
}
|
||||
},
|
||||
internal_events = {"WA_DELAYED_PLAYER_ENTERING_WORLD"},
|
||||
force_events = "PLAYER_XP_UPDATE",
|
||||
name = L["Player Experience"],
|
||||
init = function(trigger)
|
||||
return ""
|
||||
end,
|
||||
statesParameter = "one",
|
||||
args = {
|
||||
{
|
||||
name = "level",
|
||||
display = L["Level"],
|
||||
required = false,
|
||||
type = "number",
|
||||
store = true,
|
||||
init = [[UnitLevel("player")]],
|
||||
conditionType = "number",
|
||||
},
|
||||
{
|
||||
name = "currentXP",
|
||||
display = L["Current Experience"],
|
||||
type = "number",
|
||||
store = true,
|
||||
init = [[UnitXP("player")]],
|
||||
conditionType = "number",
|
||||
},
|
||||
{
|
||||
name = "totalXP",
|
||||
display = L["Total Experience"],
|
||||
type = "number",
|
||||
store = true,
|
||||
init = [[UnitXPMax("player")]],
|
||||
conditionType = "number",
|
||||
},
|
||||
{
|
||||
name = "value",
|
||||
type = "number",
|
||||
store = true,
|
||||
init = "currentXP",
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "total",
|
||||
type = "number",
|
||||
store = true,
|
||||
init = "totalXP",
|
||||
hidden = true,
|
||||
test = "true",
|
||||
},
|
||||
{
|
||||
name = "progressType",
|
||||
hidden = true,
|
||||
init = "'static'",
|
||||
store = true,
|
||||
test = "true"
|
||||
},
|
||||
{
|
||||
name = "percentXP",
|
||||
display = L["Experience (%)"],
|
||||
type = "number",
|
||||
init = "total ~= 0 and (value / total) * 100",
|
||||
store = true,
|
||||
conditionType = "number"
|
||||
},
|
||||
{
|
||||
name = "showRested",
|
||||
display = L["Show Rested Overlay"],
|
||||
type = "toggle",
|
||||
test = "true",
|
||||
reloadOptions = true,
|
||||
},
|
||||
{
|
||||
name = "restedXP",
|
||||
display = L["Rested Experience"],
|
||||
init = [[GetXPExhaustion() or 0]],
|
||||
type = "number",
|
||||
store = true,
|
||||
conditionType = "number",
|
||||
},
|
||||
{
|
||||
name = "percentrested",
|
||||
display = L["Rested Experience (%)"],
|
||||
init = "total ~= 0 and (restedXP / total) * 100",
|
||||
type = "number",
|
||||
store = true,
|
||||
conditionType = "number",
|
||||
},
|
||||
},
|
||||
overlayFuncs = {
|
||||
{
|
||||
name = L["Rested"],
|
||||
func = function(trigger, state)
|
||||
return "forward", state.restedXP
|
||||
end,
|
||||
enable = function(trigger)
|
||||
return trigger.use_showRested
|
||||
end
|
||||
},
|
||||
},
|
||||
automaticrequired = true
|
||||
},
|
||||
["Health"] = {
|
||||
type = "status",
|
||||
canHaveDuration = true,
|
||||
@@ -3713,10 +3808,10 @@ WeakAuras.event_prototypes = {
|
||||
type = "multiselect",
|
||||
values = function()
|
||||
local class = select(2, UnitClass("player"));
|
||||
if talent_types_specific[class] then
|
||||
return talent_types_specific[class];
|
||||
if Private.talent_types_specific[class] then
|
||||
return Private.talent_types_specific[class];
|
||||
else
|
||||
return WeakAuras.talent_types;
|
||||
return Private.talent_types;
|
||||
end
|
||||
end,
|
||||
test = "active",
|
||||
@@ -4472,8 +4567,10 @@ WeakAuras.event_prototypes = {
|
||||
if not(trigger.use_inverse) then
|
||||
startTime, duration = WeakAuras.GetRuneCooldown(trigger.rune);
|
||||
end
|
||||
|
||||
startTime = startTime or 0;
|
||||
duration = duration or 0;
|
||||
|
||||
return duration, startTime + duration;
|
||||
else
|
||||
return 1, 0;
|
||||
@@ -4842,9 +4939,9 @@ WeakAuras.event_prototypes = {
|
||||
init = "arg",
|
||||
values = function(trigger)
|
||||
if trigger.use_inverse then
|
||||
return WeakAuras.actual_unit_types_with_specific
|
||||
return Private.actual_unit_types_with_specific
|
||||
else
|
||||
return WeakAuras.actual_unit_types_cast
|
||||
return Private.actual_unit_types_cast
|
||||
end
|
||||
end,
|
||||
test = "true",
|
||||
@@ -5266,7 +5363,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "moveSpeed",
|
||||
display = L["Continously update Movement Speed"],
|
||||
display = L["Continuously update Movement Speed"],
|
||||
type = "boolean",
|
||||
test = true,
|
||||
width = WeakAuras.doubleWidth
|
||||
@@ -5758,12 +5855,12 @@ WeakAuras.event_prototypes = {
|
||||
|
||||
};
|
||||
|
||||
WeakAuras.event_prototypes["DBM Announce"] = nil
|
||||
WeakAuras.event_prototypes["DBM Timer"] = nil
|
||||
WeakAuras.event_prototypes["BigWigs Message"] = nil
|
||||
WeakAuras.event_prototypes["BigWigs Timer"] = nil
|
||||
Private.event_prototypes["DBM Announce"] = nil
|
||||
Private.event_prototypes["DBM Timer"] = nil
|
||||
Private.event_prototypes["BigWigs Message"] = nil
|
||||
Private.event_prototypes["BigWigs Timer"] = nil
|
||||
|
||||
WeakAuras.dynamic_texts = {
|
||||
Private.dynamic_texts = {
|
||||
["p"] = {
|
||||
get = function(state)
|
||||
if not state then return nil end
|
||||
|
||||
Reference in New Issue
Block a user