From a8e5f5b9757e288841dcc87ec5f663022e4a29ea Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Wed, 3 Jun 2020 20:14:08 +0300 Subject: [PATCH] correct pet behavior prototype --- WeakAuras/Prototypes.lua | 30 +++--------------------------- WeakAuras/Types.lua | 5 +---- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 78163b4..331d6a0 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -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", diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 61ed1d3..49b5b3b 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -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"],