Commit 1510c64f authored by Ivaria's avatar Ivaria
Browse files

Fixed auto-activate of profile/key layout on spec change

parent 3759f48b
......@@ -727,6 +727,24 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
end
end
]];
elseif "ACTIVE_TALENT_GROUP_CHANGED" == anEvent then
if VUHDO_VARIABLES_LOADED and not InCombatLockdown() then
local tSpecNum = tostring(VUHDO_getSpecialization()) or "1";
local tBestProfile = VUHDO_getBestProfileAfterSpecChange();
-- event sometimes fires multiple times so we must de-dupe
if (not VUHDO_strempty(VUHDO_SPEC_LAYOUTS[tSpecNum]) and (VUHDO_SPEC_LAYOUTS["selected"] ~= VUHDO_SPEC_LAYOUTS[tSpecNum])) or
(not VUHDO_strempty(tBestProfile) and (VUHDO_CONFIG["CURRENT_PROFILE"] ~= tBestProfile)) then
VUHDO_activateSpecc(tSpecNum);
end
if ((VUHDO_RAID or tEmptyRaid)["player"] ~= nil) then
VUHDO_resetTalentScan("player");
VUHDO_initDebuffs(); -- Talentabhngige Debuff-Fhigkeiten neu initialisieren.
VUHDO_timeReloadUI(1);
end
end
else
VUHDO_Msg("Error: Unexpected event: " .. anEvent);
end
......@@ -1556,6 +1574,7 @@ local VUHDO_ALL_EVENTS = {
-- "INCOMING_SUMMON_CHANGED",
"UNIT_PHASE",
-- "PLAYER_SPECIALIZATION_CHANGED",
"ACTIVE_TALENT_GROUP_CHANGED",
};
......
......@@ -308,6 +308,7 @@ end
--
local VUHDO_BLIZZ_EVENTS = {
"ACTIVE_TALENT_GROUP_CHANGED",
"CVAR_UPDATE",
"DISPLAY_SIZE_CHANGED",
"GROUP_ROSTER_UPDATE",
......
......@@ -1131,7 +1131,7 @@ end
function VUHDO_getSpecialization()
if not GetSpecialization then
return 1;
return GetActiveTalentGroup();
else
return GetSpecialization();
end
......@@ -1140,12 +1140,14 @@ end
function VUHDO_getSpecializationInfo(...)
function VUHDO_getSpecializationInfo(aSpecNum, ...)
if not GetSpecializationInfo then
return 1, "Unknown", _, _, _, "NONE";
if not GetSpecializationInfo then
local tSpecNum = aSpecNum or VUHDO_getSpecialization();
return tSpecNum, tSpecNum == 1 and "Primary" or (tSpecNum == 2 and "Secondary" or "Unkown"), _, _, _, GetTalentGroupRole(tSpecNum) or "NONE";
else
return GetSpecializationInfo(...);
return GetSpecializationInfo(aSpecNum, ...);
end
end
......
......@@ -22,6 +22,7 @@ Bugfixes:
Improvements:
-- Added default custom debuffs for phase 1 raid encounters
-- Fixed vehicle targeting e.g. Malygos encounter
-- Fixed auto-activate of profile/key layout on spec change
--------------------------------------------------------------
......
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