added expiremental auto-assist feature

- automatically trys to target your target's target if your current spell cannot be cast on your target (useful for healers targeting a boss and healing the current MT, etc)
This commit is contained in:
Hendrik Leppkes
2008-06-01 15:18:29 +00:00
parent e3f007b5ae
commit d864f2b219
3 changed files with 60 additions and 0 deletions
+22
View File
@@ -28,6 +28,7 @@ do
states = "StateOption",
actionbar = "StateOption",
possess = "StateOption",
autoassist = "ConfigAutoAssist",
}
-- retrieves a valid bar object from the modules actionbars table
function getBar(id)
@@ -127,6 +128,16 @@ function module:GetStateOptionsTable()
desc = "Switch this bar to the Possess Bar when possessing a npc (eg. Mind Control)",
get = optGetter,
set = optSetter,
width = "half",
},
autoassist = {
order = 6,
type = "toggle",
name = "Auto-Assist",
desc = "Enable Auto-Assist for this bar.\n Auto-Assist will automatically try to cast on your target's target if your target is no valid target for the selected spell.",
get = optGetter,
set = optSetter,
width = "half",
},
def_desc = {
order = 10,
@@ -392,3 +403,14 @@ function ActionBar:SetDefaultState(_, value)
self.config.states.default = value
self:UpdateStates()
end
function ActionBar:GetConfigAutoAssist()
return self.config.autoassist
end
function ActionBar:SetConfigAutoAssist(_, value)
if value ~= nil then
self.config.autoassist = value
end
self:UpdateStates()
end