add manastorm load condition
This commit is contained in:
@@ -1020,6 +1020,14 @@ Private.load_prototype = {
|
||||
optional = true,
|
||||
events = {"PLAYER_FLAGS_CHANGED", "UNIT_FACTION", "ZONE_CHANGED"}
|
||||
},
|
||||
{
|
||||
name = "manastorm",
|
||||
display = L["In Manastorm"],
|
||||
type = "toggle",
|
||||
init = "arg",
|
||||
width = WeakAuras.normalWidth,
|
||||
events = {"ACTIVE_MANASTORM_UPDATED"}
|
||||
},
|
||||
{
|
||||
name = "vehicle",
|
||||
display = L["In Vehicle"],
|
||||
@@ -7838,6 +7846,22 @@ Private.event_prototypes = {
|
||||
name = "defensiveStatsHeader",
|
||||
display = L["Defensive Stats"],
|
||||
},
|
||||
{
|
||||
name = "defensevalue",
|
||||
display = L["Defense Value"],
|
||||
type = "number",
|
||||
init = "UnitDefense('player')",
|
||||
store = true,
|
||||
conditionType = "number"
|
||||
},
|
||||
{
|
||||
name = "defensepercent",
|
||||
display = L["Defense (%)"],
|
||||
type = "number",
|
||||
init = "0.04 * ( UnitDefense('player') + select(2,UnitDefense('player') ) - UnitLevel('player')*5 )",
|
||||
store = true,
|
||||
conditionType = "number"
|
||||
},
|
||||
{
|
||||
name = "dodgerating",
|
||||
display = L["Dodge Rating"],
|
||||
@@ -7938,6 +7962,14 @@ Private.event_prototypes = {
|
||||
},
|
||||
formatter = "Number",
|
||||
},
|
||||
{
|
||||
name = "avoidancetotalpercent",
|
||||
display = L["Total Avoidance (%)"],
|
||||
type = "number",
|
||||
init = "0.04 * ( UnitDefense('player') + select(2,UnitDefense('player') ) - UnitLevel('player')*5 ) + GetDodgeChance() + GetParryChance() + GetBlockChance()",
|
||||
store = true,
|
||||
conditionType = "number"
|
||||
},
|
||||
},
|
||||
automaticrequired = true,
|
||||
progressType = "none"
|
||||
|
||||
@@ -1616,6 +1616,7 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...)
|
||||
|
||||
local ruleset = WeakAuras.Ruleset()
|
||||
local specialization = SpecializationUtil.GetActiveSpecialization()
|
||||
local manastorm = C_Manastorm.IsInManastorm()
|
||||
|
||||
local changed = 0;
|
||||
local shouldBeLoaded, couldBeLoaded;
|
||||
@@ -1628,8 +1629,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, inEncounter, pvp, vehicle, vehicleUi, mounted, class, specialization, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, ruleset, zone, zoneId, subzone, encounter_id, size, difficulty);
|
||||
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, inEncounter, pvp, vehicle, vehicleUi, mounted, class, specialization, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, ruleset, zone, zoneId, subzone, encounter_id, size, difficulty);
|
||||
shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, inEncounter, pvp, manastorm, vehicle, vehicleUi, mounted, class, specialization, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, ruleset, zone, zoneId, subzone, encounter_id, size, difficulty);
|
||||
couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, inEncounter, pvp, manastorm, vehicle, vehicleUi, mounted, class, specialization, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, ruleset, zone, zoneId, subzone, encounter_id, size, difficulty);
|
||||
|
||||
if(shouldBeLoaded and not loaded[id]) then
|
||||
changed = changed + 1;
|
||||
|
||||
Reference in New Issue
Block a user