Commit 8333f01f authored by Ivaria's avatar Ivaria
Browse files

Reintegrate the BFA branch into trunk

parent dad33128
<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Script file="VuhDoNewOptionsDebuffsCustomVisuals.lua" />
<Frame name="VuhDoNewOptionsDebuffsCustomVisualsTemplate" virtual="true"> <Frame name="VuhDoNewOptionsDebuffsCustomVisualsTemplate" virtual="true">
<Frames> <Frames>
......
<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Script file="VuhDoNewOptionsSpellFire.lua" />
<Frame name="VuhDoNewOptionsSpellFireTemplate" virtual="true"> <Frame name="VuhDoNewOptionsSpellFireTemplate" virtual="true">
<Frames> <Frames>
<Frame name="$parentTriggerWhatPanel" inherits="VuhDoPanelTemplate"> <Frame name="$parentTriggerWhatPanel" inherits="VuhDoPanelTemplate">
......
## Interface: 70300 ## Interface: 80000
## Title: VuhDo ['vu:du:] - Options ## Title: VuhDo ['vu:du:] - Options
## Author: Iza@Gilneas, humfras, Ivaria@Hyjal ## Author: Iza@Gilneas, humfras, Ivaria@Hyjal
## Version: 3.92 ## Version: 3.93
## Notes: VuhDo Options ## Notes: VuhDo Options
## SavedVariables: VUHDO_OPTIONS_SETTINGS ## SavedVariables: VUHDO_OPTIONS_SETTINGS
## SavedVariablesPerCharacter: VUHDO_GLOBAL_ICONS, VUHDO_GI_SCAN_IDX ## SavedVariablesPerCharacter: VUHDO_GLOBAL_ICONS, VUHDO_GI_SCAN_IDX
......
...@@ -435,8 +435,8 @@ ...@@ -435,8 +435,8 @@
<AbsDimension x="10" y="20" /> <AbsDimension x="10" y="20" />
</Size> </Size>
<Anchors> <Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT" /> <Anchor point="LEFT" relativePoint="RIGHT" />
<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT" /> <Anchor point="RIGHT" relativePoint="LEFT" />
</Anchors> </Anchors>
<TexCoords left="0" right="1" top="0" bottom="1" /> <TexCoords left="0" right="1" top="0" bottom="1" />
</Texture> </Texture>
......
...@@ -196,6 +196,7 @@ local function VUHDO_initHotIcon(anIndex) ...@@ -196,6 +196,7 @@ local function VUHDO_initHotIcon(anIndex)
tChargeIcon:SetWidth(tHotIcon:GetWidth() + 4); tChargeIcon:SetWidth(tHotIcon:GetWidth() + 4);
tChargeIcon:SetHeight(tHotIcon:GetHeight() + 4); tChargeIcon:SetHeight(tHotIcon:GetHeight() + 4);
tChargeIcon:SetVertexColor(tHotColor["R"] * 2, tHotColor["G"] * 2, tHotColor["B"] * 2); tChargeIcon:SetVertexColor(tHotColor["R"] * 2, tHotColor["G"] * 2, tHotColor["B"] * 2);
tChargeIcon:ClearAllPoints();
tChargeIcon:SetPoint("TOPLEFT", tHotIcon:GetName(), "TOPLEFT", -2, 2); tChargeIcon:SetPoint("TOPLEFT", tHotIcon:GetName(), "TOPLEFT", -2, 2);
if tHotColor["isClock"] then if tHotColor["isClock"] then
......
...@@ -16,9 +16,7 @@ local UnitIsUnit = UnitIsUnit; ...@@ -16,9 +16,7 @@ local UnitIsUnit = UnitIsUnit;
local NotifyInspect = NotifyInspect; local NotifyInspect = NotifyInspect;
local GetSpecializationInfo = GetSpecializationInfo; local GetSpecializationInfo = GetSpecializationInfo;
local ClearInspectPlayer = ClearInspectPlayer; local ClearInspectPlayer = ClearInspectPlayer;
local UnitBuff = UnitBuff;
local UnitStat = UnitStat; local UnitStat = UnitStat;
local UnitDefense = UnitDefense;
local UnitGroupRolesAssigned = UnitGroupRolesAssigned; local UnitGroupRolesAssigned = UnitGroupRolesAssigned;
local UnitLevel = UnitLevel; local UnitLevel = UnitLevel;
local UnitPowerType = UnitPowerType; local UnitPowerType = UnitPowerType;
...@@ -302,7 +300,7 @@ function VUHDO_determineRole(aUnit) ...@@ -302,7 +300,7 @@ function VUHDO_determineRole(aUnit)
end end
if 29 == tClassId then -- VUHDO_ID_DEATH_KNIGHT if 29 == tClassId then -- VUHDO_ID_DEATH_KNIGHT
_, _, tBuffExist = UnitBuff(aUnit, VUHDO_SPELL_ID.BUFF_BLOOD_PRESENCE); tBuffExist = VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.BUFF_BLOOD_PRESENCE);
if tBuffExist then if tBuffExist then
--VUHDO_FIX_ROLES[tName] = 60; -- VUHDO_ID_MELEE_TANK --VUHDO_FIX_ROLES[tName] = 60; -- VUHDO_ID_MELEE_TANK
return 60; -- VUHDO_ID_MELEE_TANK return 60; -- VUHDO_ID_MELEE_TANK
...@@ -321,15 +319,7 @@ function VUHDO_determineRole(aUnit) ...@@ -321,15 +319,7 @@ function VUHDO_determineRole(aUnit)
end end
elseif 20 == tClassId then -- VUHDO_ID_WARRIORS elseif 20 == tClassId then -- VUHDO_ID_WARRIORS
_, tDefense = UnitDefense(aUnit); if (0 > 2) then -- FIXME: need replacement for UnitDefense check
tLevel = UnitLevel(aUnit) or 0;
if tLevel <= 0 then
return nil;
end
tDefense = tDefense / tLevel;
if (tDefense > 2 or VUHDO_isUnitInModel(aUnit, VUHDO_ID_MAINTANKS)) then
return 60; -- VUHDO_ID_MELEE_TANK return 60; -- VUHDO_ID_MELEE_TANK
else else
return 61; -- VUHDO_ID_MELEE_DAMAGE return 61; -- VUHDO_ID_MELEE_DAMAGE
...@@ -351,15 +341,7 @@ function VUHDO_determineRole(aUnit) ...@@ -351,15 +341,7 @@ function VUHDO_determineRole(aUnit)
end end
elseif 23 == tClassId then -- VUHDO_ID_PALADINS elseif 23 == tClassId then -- VUHDO_ID_PALADINS
_, tDefense = UnitDefense(aUnit); if 0 > 2 then -- FIXME: need replacement for UnitDefense check
tLevel = UnitLevel(aUnit) or 0;
if tLevel <= 0 then
return nil;
end
tDefense = tDefense / tLevel;
if tDefense > 2 then
return 60; -- VUHDO_ID_MELEE_TANK return 60; -- VUHDO_ID_MELEE_TANK
else else
tIntellect = UnitStat(aUnit, 4); tIntellect = UnitStat(aUnit, 4);
...@@ -388,15 +370,8 @@ function VUHDO_determineRole(aUnit) ...@@ -388,15 +370,8 @@ function VUHDO_determineRole(aUnit)
end end
elseif 31 == tClassId then -- VUHDO_ID_DEMON_HUNTERS elseif 31 == tClassId then -- VUHDO_ID_DEMON_HUNTERS
_, tDefense = UnitDefense(aUnit); tPowerType = UnitPowerType(aUnit);
tLevel = UnitLevel(aUnit) or 0; if VUHDO_UNIT_POWER_PAIN == tPowerType then
if tLevel <= 0 then
return nil;
end
tDefense = tDefense / tLevel;
if (tDefense > 2 or VUHDO_isUnitInModel(aUnit, VUHDO_ID_MAINTANKS)) then
return 60; -- VUHDO_ID_MELEE_TANK return 60; -- VUHDO_ID_MELEE_TANK
else else
return 61; -- VUHDO_ID_MELEE_DAMAGE return 61; -- VUHDO_ID_MELEE_DAMAGE
......
...@@ -38,30 +38,30 @@ local VUHDO_ABSORB_DEBUFFS = { ...@@ -38,30 +38,30 @@ local VUHDO_ABSORB_DEBUFFS = {
[110214] = function(aUnit) return 280000, 2 * 60; end, -- Consuming Shroud [110214] = function(aUnit) return 280000, 2 * 60; end, -- Consuming Shroud
-- Patch 6.2 - Hellfire Citadel -- Patch 6.2 - Hellfire Citadel
[189030] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun [189030] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun
[189031] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun [189031] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun
[189032] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun [189032] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_BEFOULED)), 10 * 60; end, -- Fel Lord Zakuun
[180164] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TOUCH_OF_HARM)), 10 * 60; end, -- Tyrant Velhari [180164] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TOUCH_OF_HARM)), 10 * 60; end, -- Tyrant Velhari
[180166] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TOUCH_OF_HARM)), 10 * 60; end, -- Tyrant Velhari [180166] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TOUCH_OF_HARM)), 10 * 60; end, -- Tyrant Velhari
-- Patch 7.0 - Legion -- Patch 7.0 - Legion
[221772] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_OVERFLOW)), 1 * 60; end, -- Mythic+ affix [221772] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_OVERFLOW)), 1 * 60; end, -- Mythic+ affix
-- Patch 7.1 - Legion - Trial of Valor -- Patch 7.1 - Legion - Trial of Valor
[228253] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_SHADOW_LICK)), 10 * 60; end, -- Shadow Lick [228253] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_SHADOW_LICK)), 10 * 60; end, -- Shadow Lick
[232450] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_CORRUPTED_AXION)), 30; end, -- Corrupted Axion [232450] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_CORRUPTED_AXION)), 30; end, -- Corrupted Axion
-- Patch 7.1.5 - Legion - Nighthold -- Patch 7.1.5 - Legion - Nighthold
[206609] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release [206609] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release
[219964] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Geen [219964] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Geen
[219965] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Yellow [219965] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Yellow
[219966] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Red [219966] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_TIME_RELEASE)), 30; end, -- Chronomatic Anomaly Time Release Red
-- Patch 7.2.5 - Legion - Tomb of Sargeras -- Patch 7.2.5 - Legion - Tomb of Sargeras
[233263] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_EMBRACE_OF_THE_ECLIPSE)), 12; end, -- Sisters Embrace of the Eclipse [233263] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_EMBRACE_OF_THE_ECLIPSE)), 12; end, -- Sisters Embrace of the Eclipse
-- Patch 7.3 - Legion - Antorus, The Burning Throne -- Patch 7.3 - Legion - Antorus, The Burning Throne
[245586] = function(aUnit) return select(17, UnitDebuff(aUnit, VUHDO_SPELL_ID.DEBUFF_CHILLED_BLOOD)), 10; end, -- Coven Chilled Blood [245586] = function(aUnit) return select(16, VUHDO_unitAura(aUnit, VUHDO_SPELL_ID.DEBUFF_CHILLED_BLOOD)), 10; end, -- Coven Chilled Blood
--[79105] = function(aUnit) return 280000, 60 * 60; end, -- @TESTING PW:F --[79105] = function(aUnit) return 280000, 60 * 60; end, -- @TESTING PW:F
}; };
...@@ -97,7 +97,6 @@ local ceil = ceil; ...@@ -97,7 +97,6 @@ local ceil = ceil;
local floor = floor; local floor = floor;
local GetTime = GetTime; local GetTime = GetTime;
local select = select; local select = select;
local UnitAura = UnitAura;
local GetSpellInfo = GetSpellInfo; local GetSpellInfo = GetSpellInfo;
...@@ -140,6 +139,7 @@ end ...@@ -140,6 +139,7 @@ end
-- --
local function VUHDO_updateShieldValue(aUnit, aShieldName, anAmount, aDuration) local function VUHDO_updateShieldValue(aUnit, aShieldName, anAmount, aDuration)
if not VUHDO_SHIELD_SIZE[aUnit][aShieldName] then if not VUHDO_SHIELD_SIZE[aUnit][aShieldName] then
--VUHDO_xMsg("ERROR: Failed to update shield " .. aShieldName .. " on " .. aUnit);
return; return;
end end
...@@ -216,9 +216,8 @@ local tSpellName; ...@@ -216,9 +216,8 @@ local tSpellName;
local function VUHDO_updateShields(aUnit) local function VUHDO_updateShields(aUnit)
for tSpellId, _ in pairs(VUHDO_SHIELDS) do for tSpellId, _ in pairs(VUHDO_SHIELDS) do
tSpellName = select(1, GetSpellInfo(tSpellId)); tSpellName = select(1, GetSpellInfo(tSpellId));
tRemain = select(17, UnitAura(aUnit, tSpellName)); tRemain = select(16, VUHDO_unitAura(aUnit, tSpellName));
--VUHDO_xMsg(UnitAura(aUnit, tSpellName));
if tRemain and "number" == type(tRemain) then if tRemain and "number" == type(tRemain) then
if tRemain > 0 then if tRemain > 0 then
VUHDO_updateShieldValue(aUnit, tSpellName, tRemain, nil); VUHDO_updateShieldValue(aUnit, tSpellName, tRemain, nil);
......
...@@ -15,7 +15,6 @@ local pairs = pairs; ...@@ -15,7 +15,6 @@ local pairs = pairs;
VUHDO_SPELLS = { VUHDO_SPELLS = {
-- Paladin -- Paladin
[VUHDO_SPELL_ID.BUFF_BEACON_OF_FAITH] = { ["isHot"] = true, }, [VUHDO_SPELL_ID.BUFF_BEACON_OF_FAITH] = { ["isHot"] = true, },
[VUHDO_SPELL_ID.BUFF_BEACON_OF_INSIGHT] = { ["isHot"] = true, },
[VUHDO_SPELL_ID.BUFF_BEACON_OF_LIGHT] = { ["isHot"] = true, }, [VUHDO_SPELL_ID.BUFF_BEACON_OF_LIGHT] = { ["isHot"] = true, },
[VUHDO_SPELL_ID.BUFF_STAY_OF_EXECUTION] = { ["isHot"] = true, }, [VUHDO_SPELL_ID.BUFF_STAY_OF_EXECUTION] = { ["isHot"] = true, },
[VUHDO_SPELL_ID.ETERNAL_FLAME] = { ["isHot"] = true, }, [VUHDO_SPELL_ID.ETERNAL_FLAME] = { ["isHot"] = true, },
...@@ -25,7 +24,6 @@ VUHDO_SPELLS = { ...@@ -25,7 +24,6 @@ VUHDO_SPELLS = {
[VUHDO_SPELL_ID.POWERWORD_SHIELD] = { ["isHot"] = true }, [VUHDO_SPELL_ID.POWERWORD_SHIELD] = { ["isHot"] = true },
[VUHDO_SPELL_ID.PRAYER_OF_MENDING] = { ["isHot"] = true }, [VUHDO_SPELL_ID.PRAYER_OF_MENDING] = { ["isHot"] = true },
[VUHDO_SPELL_ID.PAIN_SUPPRESSION] = { ["isHot"] = true, ["nodefault"] = true }, [VUHDO_SPELL_ID.PAIN_SUPPRESSION] = { ["isHot"] = true, ["nodefault"] = true },
[VUHDO_SPELL_ID.GRACE] = { ["isHot"] = true, ["nodefault"] = true },
[VUHDO_SPELL_ID.GUARDIAN_SPIRIT] = { ["isHot"] = true, ["nohelp"] = true, ["noselftarget"] = true }, [VUHDO_SPELL_ID.GUARDIAN_SPIRIT] = { ["isHot"] = true, ["nohelp"] = true, ["noselftarget"] = true },
[VUHDO_SPELL_ID.ECHO_OF_LIGHT] = { ["isHot"] = true }, [VUHDO_SPELL_ID.ECHO_OF_LIGHT] = { ["isHot"] = true },
[VUHDO_SPELL_ID.SERENDIPITY] = { ["isHot"] = true, ["nodefault"] = true }, [VUHDO_SPELL_ID.SERENDIPITY] = { ["isHot"] = true, ["nodefault"] = true },
...@@ -36,7 +34,6 @@ VUHDO_SPELLS = { ...@@ -36,7 +34,6 @@ VUHDO_SPELLS = {
[VUHDO_SPELL_ID.RIPTIDE] = { ["isHot"] = true }, [VUHDO_SPELL_ID.RIPTIDE] = { ["isHot"] = true },
[VUHDO_SPELL_ID.GIFT_OF_THE_NAARU] = { ["isHot"] = true }, [VUHDO_SPELL_ID.GIFT_OF_THE_NAARU] = { ["isHot"] = true },
[VUHDO_SPELL_ID.BUFF_EARTH_SHIELD] = { ["isHot"] = true }, [VUHDO_SPELL_ID.BUFF_EARTH_SHIELD] = { ["isHot"] = true },
[VUHDO_SPELL_ID.BUFF_WATER_SHIELD] = { ["isHot"] = true },
[VUHDO_SPELL_ID.TIDAL_WAVES] = { ["isHot"] = true, ["nodefault"] = true }, [VUHDO_SPELL_ID.TIDAL_WAVES] = { ["isHot"] = true, ["nodefault"] = true },
-- Druid -- Druid
...@@ -103,6 +100,7 @@ function VUHDO_initFromSpellbook() ...@@ -103,6 +100,7 @@ function VUHDO_initFromSpellbook()
if #tHotSlots == 10 then break; end if #tHotSlots == 10 then break; end
end end
end end
tHotSlots[10] = "BOUQUET_" .. VUHDO_I18N_DEF_AOE_ADVICE; tHotSlots[10] = "BOUQUET_" .. VUHDO_I18N_DEF_AOE_ADVICE;
end end
......
...@@ -66,16 +66,22 @@ end ...@@ -66,16 +66,22 @@ end
-- --
local VUHDO_TALENT_CHANGE_SPELLS = { local VUHDO_TALENT_CHANGE_SPELLS = {
[VUHDO_SPELL_ID.ACTIVATING_SPECIALIZATION] = true, [VUHDO_SPELL_ID.ACTIVATING_SPECIALIZATION] = true,
[VUHDO_SPELL_ID.BUFF_FROST_PRESENCE] = true,
[VUHDO_SPELL_ID.BUFF_BLOOD_PRESENCE] = true,
[VUHDO_SPELL_ID.BUFF_UNHOLY_PRESENCE] = true,
} }
-- --
function VUHDO_spellcastSucceeded(aUnit, aSpellName) local tSpellName;
if VUHDO_TALENT_CHANGE_SPELLS[aSpellName] then function VUHDO_spellcastSucceeded(aUnit, aSpellId)
if aSpellId then
tSpellName = GetSpellInfo(aSpellId);
end
if not tSpellName then
return;
end
if VUHDO_TALENT_CHANGE_SPELLS[tSpellName] then
VUHDO_resetTalentScan(aUnit); VUHDO_resetTalentScan(aUnit);
VUHDO_initDebuffs(); -- Talentabhngige Debuff-Fhigkeiten neu initialisieren. VUHDO_initDebuffs(); -- Talentabhngige Debuff-Fhigkeiten neu initialisieren.
VUHDO_timeReloadUI(1); VUHDO_timeReloadUI(1);
...@@ -83,12 +89,12 @@ function VUHDO_spellcastSucceeded(aUnit, aSpellName) ...@@ -83,12 +89,12 @@ function VUHDO_spellcastSucceeded(aUnit, aSpellName)
if "player" ~= aUnit and VUHDO_PLAYER_RAID_ID ~= aUnit then return; end if "player" ~= aUnit and VUHDO_PLAYER_RAID_ID ~= aUnit then return; end
if VUHDO_ACTIVE_HOTS[aSpellName] then if VUHDO_ACTIVE_HOTS[tSpellName] then
VUHDO_updateAllHoTs(); VUHDO_updateAllHoTs();
VUHDO_updateAllCyclicBouquets(true); VUHDO_updateAllCyclicBouquets(true);
end end
if aSpellName == VUHDO_SPELL_ID.ACTIVATING_SPECIALIZATION then if tSpellName == VUHDO_SPELL_ID.ACTIVATING_SPECIALIZATION then
VUHDO_activateSpecc(tostring(GetSpecialization()) or "1"); VUHDO_activateSpecc(tostring(GetSpecialization()) or "1");
end end
...@@ -100,13 +106,26 @@ end ...@@ -100,13 +106,26 @@ end
-- --
local tTargetUnit; local tTargetUnit;
local tCateg; local tCateg;
function VUHDO_spellcastSent(aUnit, aSpellName, aSpellRank, aTargetName) local tSpellName;
if "player" ~= aUnit then return; end function VUHDO_spellcastSent(aUnit, aTargetName, aSpellId)
if "player" ~= aUnit then
return;
end
if sIsShowGcd then VUHDO_initGcd(); end if sIsShowGcd then
VUHDO_initGcd();
end
if aSpellId then
tSpellName = GetSpellInfo(aSpellId);
end
if not tSpellName then
return;
end
-- Resurrection? -- Resurrection?
if aSpellName == sFirstRes or aSpellName == sSecondRes or aSpellName == sThirdRes then if tSpellName == sFirstRes or tSpellName == sSecondRes or tSpellName == sThirdRes then
if aTargetName and not VUHDO_strempty(aTargetName) then if aTargetName and not VUHDO_strempty(aTargetName) then
aTargetName = smatch(aTargetName, "^[^-]*"); aTargetName = smatch(aTargetName, "^[^-]*");
...@@ -134,7 +153,7 @@ function VUHDO_spellcastSent(aUnit, aSpellName, aSpellRank, aTargetName) ...@@ -134,7 +153,7 @@ function VUHDO_spellcastSent(aUnit, aSpellName, aSpellRank, aTargetName)
if not tTargetUnit then return; end if not tTargetUnit then return; end
tCateg = sUniqueSpells[aSpellName]; tCateg = sUniqueSpells[tSpellName];
if tCateg and not InCombatLockdown() if tCateg and not InCombatLockdown()
and (VUHDO_BUFF_SETTINGS or sEmpty)[tCateg] and aTargetName ~= VUHDO_BUFF_SETTINGS[tCateg]["name"] then and (VUHDO_BUFF_SETTINGS or sEmpty)[tCateg] and aTargetName ~= VUHDO_BUFF_SETTINGS[tCateg]["name"] then
......
...@@ -19,14 +19,12 @@ local IsInInstance = IsInInstance; ...@@ -19,14 +19,12 @@ local IsInInstance = IsInInstance;
local IsSpellInRange = IsSpellInRange; local IsSpellInRange = IsSpellInRange;
local GetTime = GetTime; local GetTime = GetTime;
local GetRealZoneText = GetRealZoneText; local GetRealZoneText = GetRealZoneText;
local GetMapInfo = GetMapInfo;
local GetSpellInfo = GetSpellInfo; local GetSpellInfo = GetSpellInfo;
local SetMapToCurrentZone = SetMapToCurrentZone; local SetMapToCurrentZone = SetMapToCurrentZone;
local UnitAlternatePowerInfo = UnitAlternatePowerInfo; local UnitAlternatePowerInfo = UnitAlternatePowerInfo;
local WorldMapFrame = WorldMapFrame; local WorldMapFrame = WorldMapFrame;
local GetMouseFocus = GetMouseFocus; local GetMouseFocus = GetMouseFocus;
local GetPlayerFacing = GetPlayerFacing; local GetPlayerFacing = GetPlayerFacing;
local GetPlayerMapPosition = GetPlayerMapPosition;
local GetSpellBookItemInfo = GetSpellBookItemInfo; local GetSpellBookItemInfo = GetSpellBookItemInfo;
local CheckInteractDistance = CheckInteractDistance; local CheckInteractDistance = CheckInteractDistance;
local UnitIsUnit = UnitIsUnit; local UnitIsUnit = UnitIsUnit;
...@@ -399,12 +397,13 @@ end ...@@ -399,12 +397,13 @@ end
-- --
local tZone, tIndex, tMap, tInfo; local tZone, tIndex, tMap, tMapId, tInfo;
function VUHDO_getUnitZoneName(aUnit) function VUHDO_getUnitZoneName(aUnit)
tInfo = VUHDO_RAID[aUnit]; tInfo = VUHDO_RAID[aUnit];
if not tInfo then return; end if not tInfo then return; end
if "player" == aUnit or tInfo["visible"] then tZone = GetRealZoneText(); if "player" == aUnit or tInfo["visible"] then
tZone = GetRealZoneText();
elseif VUHDO_GROUP_TYPE_RAID == VUHDO_getCurrentGroupType() then elseif VUHDO_GROUP_TYPE_RAID == VUHDO_getCurrentGroupType() then
tIndex = (VUHDO_RAID[aUnit] or sEmpty)["number"] or 1; tIndex = (VUHDO_RAID[aUnit] or sEmpty)["number"] or 1;
_, _, _, _, _, _, tZone = GetRaidRosterInfo(tIndex); _, _, _, _, _, _, tZone = GetRaidRosterInfo(tIndex);
...@@ -413,11 +412,20 @@ function VUHDO_getUnitZoneName(aUnit) ...@@ -413,11 +412,20 @@ function VUHDO_getUnitZoneName(aUnit)
VuhDoScanTooltip:ClearLines(); VuhDoScanTooltip:ClearLines();
VuhDoScanTooltip:SetUnit(aUnit) VuhDoScanTooltip:SetUnit(aUnit)
tZone = VuhDoScanTooltipTextLeft3:GetText(); tZone = VuhDoScanTooltipTextLeft3:GetText();
if tZone == "PvP" then tZone = VuhDoScanTooltipTextLeft4:GetText(); end
if tZone == "PvP" then
tZone = VuhDoScanTooltipTextLeft4:GetText();
end
end
-- 8.0.1 build 26567 added restrictions (must be in player's party) on which unit IDs can be queried
tMapId = C_Map.GetBestMapForUnit(aUnit);
if tMapId then
tMap = C_Map.GetMapInfo(tMapId);
end end
tMap = GetMapInfo(); return tZone or (tMap and tMap["name"]) or VUHDO_I18N_UNKNOWN, tMap and tMap["name"] or nil;
return tZone or tMap or VUHDO_I18N_UNKNOWN, tMap;
end end
...@@ -640,9 +648,15 @@ end ...@@ -640,9 +648,15 @@ end
-- Throttle resetting to current map to avoid conflicts with other addons -- Throttle resetting to current map to avoid conflicts with other addons
local tNextTime = 0; local tNextTime = 0;
local tMap;
function VUHDO_setMapToCurrentZone() function VUHDO_setMapToCurrentZone()
if tNextTime < GetTime() then if tNextTime < GetTime() then
SetMapToCurrentZone(); tMap = C_Map.GetBestMapForUnit("player");
if tMap and WorldMapFrame ~= nil then
WorldMapFrame:SetMapID(tMap);
end
tNextTime = GetTime() + 2; tNextTime = GetTime() + 2;
end end
end end
...@@ -808,14 +822,14 @@ function VUHDO_getUnitDirection(aUnit) ...@@ -808,14 +822,14 @@ function VUHDO_getUnitDirection(aUnit)
return nil; return nil;
end end
tPlayerX, tPlayerY = GetPlayerMapPosition("player"); tPlayerX, tPlayerY = VUHDO_getUnitMapPosition("player");
if (tPlayerX or 0) + (tPlayerY or 0) <= 0 then if (tPlayerX or 0) + (tPlayerY or 0) <= 0 then
VUHDO_setMapToCurrentZone(); VUHDO_setMapToCurrentZone();
tPlayerX, tPlayerY = GetPlayerMapPosition("player"); tPlayerX, tPlayerY = VUHDO_getUnitMapPosition("player");
if (tPlayerX or 0) + (tPlayerY or 0) <= 0 then return nil; end if (tPlayerX or 0) + (tPlayerY or 0) <= 0 then return nil; end
end end
tUnitX, tUnitY = GetPlayerMapPosition(aUnit); tUnitX, tUnitY = VUHDO_getUnitMapPosition(aUnit);
if (tUnitX or 0) + (tUnitY or 0) <= 0 then return nil; end if (tUnitX or 0) + (tUnitY or 0) <= 0 then return nil; end
tFacing = GetPlayerFacing(); tFacing = GetPlayerFacing();
...@@ -930,3 +944,21 @@ function VUHDO_round(number, digits) ...@@ -930,3 +944,21 @@ function VUHDO_round(number, digits)
end end
end end
function VUHDO_unitAura(aUnit, aSpell)
for tCnt = 1, 40 do
local tSpellName, tIcon, tCount, tDebuffType, tDuration, tExpirationTime, tSource, tIsStealable, tNameplateShowPersonal, tSpellId, tCanApplyAura, tIsBossDebuff, tNameplateShowAll, tTimeMod, tValue1, tValue2, tValue3 = UnitAura(aUnit, tCnt);
if (aSpell == tSpellName or tonumber(aSpell) == tSpellId) then
return tSpellName, tIcon, tCount, tDebuffType, tDuration, tExpirationTime, tSource, tIsStealable, tNameplateShowPersonal, tSpellId, tCanApplyAura, tIsBossDebuff, tNameplateShowAll, tTimeMod, tValue1, tValue2, tValue3;
end
end
return nil;
end
Version 3.93
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
Bugfixes:
-- Boss unit frames now apply hostile spell binds like a target unit frame
-- UNIT_SPELLCAST_* events no longer pass spell name or rank
-- UNIT_POWER event is now named UNIT_POWER_UPDATE
-- UnitAura/UnitBuff/UnitDebuff no longer accept spell name or ID
-- UnitAura/UnitBuff/UnitDebuff no longer return spell rank
-- Fixed cluster builder/AOE advice to use the new C_Map API
-- Fixed BuffWatch tracking of auras
-- Removed deprecated Death Knight aura 'Horn of Winter' from BuffWatch
-- Removed deprecated Death Knight aura 'Bone Shield' from BuffWatch
-- Removed deprecated Death Knight presences from BuffWatch
-- Removed deprecated Warlock pet aura 'Dark Intent' from BuffWatch
-- Removed deprecated Priest aura 'Fear Ward' from BuffWatch
-- Removed deprecated Priest chakras from BuffWatch
-- Removed deprecated Druid aura 'Leader of the Park' from BuffWatch
-- Removed deprecated Druid aura 'Mark of the Wild' from BuffWatch
-- Removed deprecated Monk 'Legacy of ...' auras from BuffWatch
-- Removed deprecated Paladin aura 'Blessing of Might' from BuffWatch
-- Removed deprecated Shaman aura 'Grace of Air' from BuffWatch
-- Removed deprecated Shaman aura 'Water Shield' from BuffWatch
-- Removed passive Shaman aura 'Ancestral Swiftness' from BuffWatch
-- Removed Shaman totem type buff-overwriting groups from BuffWatch
-- Removed deprecated Shaman totem 'Searing' from BuffWatch
-- Removed deprecated Shaman totem 'Stone Bulwark' from BuffWatch
-- Removed deprecated Hunter pet aura 'Spirit Beast' from BuffWatch
-- Removed depreacted Hunter pet aura 'Roar of Courage' from BuffWatch
-- Removed deprecated Hunter pet aura 'Still Water' from BuffWatch
-- Removed deprecated Hunter aura 'Trueshot Aura' from BuffWatch
-- Removed deprecated Hunter aura 'Aspect of the Pack' from BuffWatch
-- Removed deprecated Hunter aura 'Aspect of the Fox' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Cat' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Bear' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Raptor' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Hyena' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Serpent' from BuffWatch
-- Removed deprecated Hunter aura 'Lone Wolf Primates' from BuffWatch
-- Removed default Priest HoT for deprecated aura 'Grace'
-- Removed deprecated Paladin aura 'Righteous Fury' from BuffWatch
-- Removed deprecated Paladin aura 'Seal of Righteousness' from BuffWatch
-- Removed deprecated Paladin aura 'Seal of Justice' from BuffWatch
-- Removed deprecated Paladin aura 'Seal of Insight' from BuffWatch
-- Removed deprecated Paladin aura 'Seal of Truth' from BuffWatch
-- Removed deprecated Paladin aura 'Seal of Command' from BuffWatch
-- Removed deprecated Paladin spell 'Beacon of Insight'
-- Removed deprecated Warrior spell 'Vigilance' from BuffWatch
-- Removed deprecated Mage spell 'Frost Armor' from BuffWatch
-- Removed deprecated Mage spell 'Molten Armor' from BuffWatch
-- Removed deprecated Mage spell 'Mage Armor' from BuffWatch
-- Removed deprecated Mage spell 'Incanter's Ward' from BuffWatch
-- Removed deprecated Mage spell 'Invocation' from BuffWatch
-- Removed deprecated Rogue poison 'Instant Poison' from BuffWatch
-- Removed deprecated Monk stance 'Fierce Tiger' from BuffWatch
-- Removed deprecated Monk stance 'Sturdy Ox' from BuffWatch
-- Removed deprecated Monk stance 'Wise Serpent' from BuffWatch
-- Fixed preservation of BuffWatch settings for spec specific buffs
-- Fixed lack of explicit refresh on event UPDATE_ACTIVE_BATTLEFIELD
Improvements:
-- Misc fixes/changes needed for Battle for Azeroth 8.x
-- Added Hunter aura 'Aspect of the Chameleon' to BuffWatch
-- Added Hunter aura 'Aspect of the Eagle' to BuffWatch
-- Added Hunter aura 'Aspect of the Turtle' to BuffWatch
-- Added Hunter aura 'Aspect of the Wild' to BuffWatch
-- Added Hunter ability 'Misdirection' to BuffWatch
-- Added Paladin aura 'Greater Blessing of Kings' to BuffWatch
-- Added Paladin aura 'Greater Blessing of Wisdom' to BuffWatch
-- Added default custom debuffs for Uldir raid encounters
--------------------------------------------------------------
Version 3.92 Version 3.92
......
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