Commit 90b2249f authored by Ivaria's avatar Ivaria
Browse files

Profiles can now auto-activate for multiple specializations

parent 87a83369
## Interface: 70200
## Title: VuhDo ['vu:du:]
## Author: Iza@Gilneas, humfras, Ivaria@Hyjal
## Version: 3.84
## Version: 3.85
## Notes: Raid Frames providing click-heal functionality, buff and debuff control, main tank management and much more
## SavedVariablesPerCharacter: VUHDO_CONFIG, VUHDO_PANEL_SETUP, VUHDO_SPELL_ASSIGNMENTS, VUHDO_HOSTILE_SPELL_ASSIGNMENTS, VUHDO_MM_SETTINGS, VUHDO_PLAYER_TARGETS, VUHDO_MAINTANK_NAMES, VUHDO_BUFF_SETTINGS, VUHDO_POWER_TYPE_COLORS, VUHDO_SPELLS_KEYBOARD, VUHDO_SPELL_CONFIG, VUHDO_BUFF_ORDER, VUHDO_SPEC_LAYOUTS, VUHDO_GROUP_SIZE, VUHDO_RAID, VUHDO_INDICATOR_CONFIG
## SavedVariables: VUHDO_DEFAULT_LAYOUT, VUHDO_DEFAULT_PROFILE, VUHDO_PROFILES, VUHDO_MANUAL_ROLES, VUHDO_SPELL_LAYOUTS, VUHDO_USER_CLASS_COLORS, VUHDO_DEBUFF_BLACKLIST, VUHDO_BOUQUETS, VUHDO_COMBAT_LOG_TRACE, VUHDO_GLOBAL_CONFIG, VUHDO_DEBUG
......
......@@ -199,11 +199,10 @@ end
--
local tPrefixes = { "SPEC_1", "SPEC_2", "SPEC_3", "SPEC_4" };
local tExistIndex;
local tIsSpec1;
local tIsSpec2;
local tPrefix;
local tIsGroupFound;
local tIsSpecSelected;
function VUHDO_skinsSaveAutoProfileButtonEnablement(aPanel, aProfileName)
tExistIndex, _ = VUHDO_getProfileNamedCompressed(aProfileName);
......@@ -211,65 +210,78 @@ function VUHDO_skinsSaveAutoProfileButtonEnablement(aPanel, aProfileName)
return;
end
tIsSpec1 = _G[aPanel:GetName() .. "AutoEnablePanelSpec1CheckButton"]:GetChecked();
tIsSpec2 = _G[aPanel:GetName() .. "AutoEnablePanelSpec2CheckButton"]:GetChecked();
tIsSpec3 = _G[aPanel:GetName() .. "AutoEnablePanelSpec3CheckButton"]:GetChecked();
tIsSpec4 = _G[aPanel:GetName() .. "AutoEnablePanelSpec4CheckButton"]:GetChecked();
if (tIsSpec1 and not tIsSpec2 and not tIsSpec3 and not tIsSpec4) then
tPrefix = "SPEC_1_";
VUHDO_clearProfileFromPrefix(aProfileName, "", "SPEC_2_", "SPEC_3_", "SPEC_4_");
elseif (tIsSpec2 and not tIsSpec1 and not tIsSpec3 and not tIsSpec4) then
tPrefix = "SPEC_2_";
VUHDO_clearProfileFromPrefix(aProfileName, "", "SPEC_1_", "SPEC_3_", "SPEC_4_");
elseif (tIsSpec3 and not tIsSpec1 and not tIsSpec2 and not tIsSpec4) then
tPrefix = "SPEC_3_";
VUHDO_clearProfileFromPrefix(aProfileName, "", "SPEC_1_", "SPEC_2_", "SPEC_4_");
elseif (tIsSpec4 and not tIsSpec1 and not tIsSpec2 and not tIsSpec3) then
tPrefix = "SPEC_4_";
VUHDO_clearProfileFromPrefix(aProfileName, "", "SPEC_1_", "SPEC_2_", "SPEC_3_");
else
tPrefix = "";
VUHDO_clearProfileFromPrefix(aProfileName, "SPEC_1_", "SPEC_2_", "SPEC_3_", "SPEC_4_");
local tSelectedPrefixes = {};
for tCnt = 1, 4 do
tIsSpecSelected = _G[aPanel:GetName() .. "AutoEnablePanelSpec" .. tCnt .. "CheckButton"]:GetChecked();
tSelectedPrefixes["SPEC_" .. tCnt] = tIsSpecSelected and true or false;
end
tIsGroupFound = false;
for tCnt = 1, 40 do
tButton = _G[aPanel:GetName() .. "AutoEnablePanel" .. tCnt .. "CheckButton"];
if (tButton ~= nil) then
if (tButton:GetChecked()) then
VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. tCnt] = aProfileName;
tIsGroupFound = true;
elseif (VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. tCnt] == aProfileName) then
VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. tCnt] = nil;
tIsSpecSelected = false;
for tPrefix, tIsSelected in pairs(tSelectedPrefixes) do
if (tIsSelected) then
for tCnt = 1, 40 do
tButton = _G[aPanel:GetName() .. "AutoEnablePanel" .. tCnt .. "CheckButton"];
if (tButton ~= nil) then
if (tButton:GetChecked()) then
VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. "_" .. tCnt] = aProfileName;
tIsGroupFound = true;
elseif (VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. "_" .. tCnt] == aProfileName) then
VUHDO_CONFIG["AUTO_PROFILES"][tPrefix .. "_" .. tCnt] = nil;
end
end
end
tIsSpecSelected = true;
else
VUHDO_clearProfileFromPrefix(aProfileName, tPrefix .. "_");
end
end
if (tIsSpecSelected) then
for tCnt = 1, 40 do
tCnt = tostring(tCnt);
if (VUHDO_CONFIG["AUTO_PROFILES"][tCnt] == aProfileName) then
VUHDO_CONFIG["AUTO_PROFILES"][tCnt] = nil;
end
end
else
for tCnt = 1, 40 do
tCnt = tostring(tCnt);
tButton = _G[aPanel:GetName() .. "AutoEnablePanel" .. tCnt .. "CheckButton"];
if (tButton ~= nil) then
if (tButton:GetChecked()) then
VUHDO_CONFIG["AUTO_PROFILES"][tCnt] = aProfileName;
tIsGroupFound = true;
elseif (VUHDO_CONFIG["AUTO_PROFILES"][tCnt] == aProfileName) then
VUHDO_CONFIG["AUTO_PROFILES"][tCnt] = nil;
end
end
end
end
if (tIsGroupFound) then
if (tIsSpec1 and not tIsSpec2 and not tIsSpec3 and not tIsSpec4) then
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_1");
elseif (tIsSpec2 and not tIsSpec1 and not tIsSpec3 and not tIsSpec4) then
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_2");
elseif (tIsSpec3 and not tIsSpec1 and not tIsSpec2 and not tIsSpec4) then
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_3");
elseif (tIsSpec4 and not tIsSpec1 and not tIsSpec2 and not tIsSpec3) then
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_4");
for tPrefix, tIsSelected in pairs(tSelectedPrefixes) do
if (tIsSelected) then
VUHDO_clearProfileIfInSlot(aProfileName, tPrefix);
end
end
else
if (tIsSpec1 and not tIsSpec2 and not tIsSpec3 and not tIsSpec4) then
VUHDO_CONFIG["AUTO_PROFILES"]["SPEC_1"] = aProfileName;
elseif (tIsSpec2 and not tIsSpec1 and not tIsSpec3 and not tIsSpec4) then
VUHDO_CONFIG["AUTO_PROFILES"]["SPEC_2"] = aProfileName;
elseif (tIsSpec3 and not tIsSpec1 and not tIsSpec2 and not tIsSpec4) then
VUHDO_CONFIG["AUTO_PROFILES"]["SPEC_3"] = aProfileName;
elseif (tIsSpec4 and not tIsSpec1 and not tIsSpec2 and not tIsSpec3) then
VUHDO_CONFIG["AUTO_PROFILES"]["SPEC_4"] = aProfileName;
else
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_1");
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_2");
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_3");
VUHDO_clearProfileIfInSlot(aProfileName, "SPEC_4");
for tPrefix, tIsSelected in pairs(tSelectedPrefixes) do
if (tIsSelected) then
VUHDO_CONFIG["AUTO_PROFILES"][tPrefix] = aProfileName;
else
VUHDO_clearProfileIfInSlot(aProfileName, tPrefix);
end
end
end
......
## Interface: 70200
## Title: VuhDo ['vu:du:] - Options
## Author: Iza@Gilneas, humfras, Ivaria@Hyjal
## Version: 3.84
## Version: 3.85
## Notes: VuhDo Options
## SavedVariables: VUHDO_OPTIONS_SETTINGS
## SavedVariablesPerCharacter: VUHDO_GLOBAL_ICONS, VUHDO_GI_SCAN_IDX
......
Version 3.85
Known issues:
-- Limited support for Class Order Hall Bodyguards
-- Bodyguards can be used in panels when set to target or focus
-- Bodyguards have no unit ID so for now are only partially supported
-- Incoming heal estimation reported is not even close to accurate
-- Bug in Blizzard API UnitGetIncomingHeals() - returns bogus values
-- Patch 7.1 disabled retrieval of unit facing and position in instances
-- This was an intentional breaking change by Blizzard
-- This breaks AOE Advice, Clusters and out-of-range direction arrow
-- At this time there is no way to fix or renable these features
Bugfixes:
Improvements:
-- Profiles can now auto-activate for multiple specializations
--------------------------------------------------------------
Version 3.84
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment