correct pet behavior prototype

This commit is contained in:
Bunny67
2020-06-03 20:14:08 +03:00
parent 69ba601639
commit a8e5f5b975
2 changed files with 4 additions and 31 deletions
+3 -27
View File
@@ -1258,18 +1258,6 @@ WeakAuras.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "role",
display = L["Assigned Role"],
type = "select",
init = "UnitGroupRolesAssigned(unit)",
values = "role_types",
store = true,
conditionType = "select",
enable = function(trigger)
return not WeakAuras.IsClassic() and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")
end
},
{
name = "hostility",
display = L["Hostility"],
@@ -5627,20 +5615,14 @@ WeakAuras.event_prototypes = {
ret = [[
local inverse = %s
local check_behavior = %s
local name, i, active, behavior, _
local name, i, token, active, behavior, _
for index = 1, NUM_PET_ACTION_SLOTS do
name, i, _, active = GetPetActionInfo(index)
name, _, i, token, active = GetPetActionInfo(index)
if active then
activeIcon = _G[i]
activeIcon = not token and i or _G[i]
if name == "PET_MODE_AGGRESSIVE" then
behavior = "aggressive"
break
elseif name == "PET_MODE_ASSIST" then
behavior = "assist"
break
elseif name == "PET_MODE_DEFENSIVEASSIST" then
behavior = "defensive"
break
elseif name == "PET_MODE_DEFENSIVE" then
behavior = "defensive"
break
@@ -5672,12 +5654,6 @@ WeakAuras.event_prototypes = {
test = "true",
enable = function(trigger) return trigger.use_behavior end
},
{
name = "petspec",
display = L["Pet Specialization"],
type = "select",
values = "pet_spec_types",
},
{
hidden = true,
name = "icon",
+1 -4
View File
@@ -1555,12 +1555,9 @@ WeakAuras.gtfo_types = {
WeakAuras.pet_behavior_types = {
aggressive = PET_MODE_AGGRESSIVE,
passive = PET_MODE_PASSIVE,
defensive = PET_MODE_DEFENSIVE,
assist = PET_MODE_ASSIST
defensive = PET_MODE_DEFENSIVE
}
WeakAuras.pet_spec_types = {}
WeakAuras.cooldown_progress_behavior_types = {
showOnCooldown = L["On Cooldown"],
showOnReady = L["Not on Cooldown"],