Commit 48ef9258 authored by Ivaria's avatar Ivaria
Browse files

Merge branch 'master' into tbcc

parents 4588bc98 79d69e1f
......@@ -29,6 +29,26 @@ VUHDO_BUFF_ORDER = { };
local sEmpty = { };
local sCooldownAliases = { };
-- Backdrops
BACKDROP_VUHDO_BUFF_SWATCH_PANEL_8_8_0000 = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 8,
edgeSize = 8,
};
BACKDROP_COLOR_VUHDO_BUFF_SWATCH_PANEL = CreateColor(0, 0, 0);
BACKDROP_VUHDO_BUFF_WATCH_MAIN_FRAME_16_16_5555 = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 },
};
......@@ -665,7 +685,7 @@ local function VUHDO_getMissingBuffsForCode(aTargetCode, aBuffInfo, aCategSpec)
return VUHDO_PLAYER_GROUP, sEmpty, "player", 0, "player", sEmpty, sEmpty, 0;
elseif VUHDO_BUFF_TARGET_ENCHANT_OFF == tTargetType then
_, _, _, tHasEnchant, tEnchantDuration = GetWeaponEnchantInfo();
_, _, _, _, tHasEnchant, tEnchantDuration = GetWeaponEnchantInfo();
if tHasEnchant and (not sGermanOrEnglish or strfind(aBuffInfo[1], VUHDO_getWeaponEnchantName(17), 1, true)) then
return sEmpty, sEmpty, "player", tEnchantDuration * 0.001, "player", VUHDO_PLAYER_GROUP, sEmpty, 0;
......
......@@ -22,23 +22,14 @@
</Scripts>
</Button>
<Frame name="VuhDoBuffSwatchPanelTemplate" virtual="true">
<Frame name="VuhDoBuffSwatchPanelTemplate" virtual="true" inherits="BackdropTemplate" mixin="BackdropTemplateMixin">
<KeyValues>
<KeyValue key="backdropInfo" value="BACKDROP_VUHDO_BUFF_SWATCH_PANEL_8_8_0000" type="global" />
<KeyValue key="backdropColor" value="BACKDROP_COLOR_VUHDO_BUFF_SWATCH_PANEL" type="global" />
</KeyValues>
<Size>
<AbsDimension x="75" y="24" />
</Size>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<Color r="0" g="0" b="0" />
<BackgroundInsets>
<AbsInset left="0" right="0" top="0" bottom="0" />
</BackgroundInsets>
<TileSize>
<AbsValue val="8" />
</TileSize>
<EdgeSize>
<AbsValue val="8" />
</EdgeSize>
</Backdrop>
<Frames>
<Button name="$parentGlassButton" setAllPoints="true" inherits="SecureUnitButtonTemplate,SecureHandlerEnterLeaveTemplate,SecureHandlerShowHideTemplate">
......@@ -242,18 +233,10 @@
</Frame>
<Frame name="VuhDoBuffWatchMainFrameTemplate" virtual="true" toplevel="true" frameStrata="MEDIUM"
movable="true" parent="UIParent" enableMouse="true">
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5" />
</BackgroundInsets>
<TileSize>
<AbsValue val="16" />
</TileSize>
<EdgeSize>
<AbsValue val="16" />
</EdgeSize>
</Backdrop>
movable="true" parent="UIParent" enableMouse="true" inherit="BackdropTemplate" mixin="BackdropTemplateMixin">
<KeyValues>
<KeyValue key="backdropInfo" value="BACKDROP_VUHDO_BUFF_WATCH_MAIN_FRAME_16_16_5555" type="global" />
</KeyValues>
<Frames>
<Frame name="$parentInfoLabel" hidden="true" inherits="VuhDoLabelFrameTemplate" >
<Size>
......
local VUHDO_RAID = { };
local VUHDO_RAID_GUIDS = { };
local VUHDO_INTERNAL_TOGGLES = { };
local strsplit = strsplit;
local pairs = pairs;
local select = select;
local VUHDO_updateHealth;
local sCurrentTarget = nil;
local sCurrentFocus = nil;
--
function VUHDO_combatLogInitLocalOverrides()
VUHDO_RAID = _G["VUHDO_RAID"];
VUHDO_RAID_GUIDS = _G["VUHDO_RAID_GUIDS"];
VUHDO_INTERNAL_TOGGLES = _G["VUHDO_INTERNAL_TOGGLES"];
VUHDO_updateHealth = _G["VUHDO_updateHealth"];
end
--
local tInfo;
local tNewHealth;
local tDeadInfo = { ["dead"] = true };
local function VUHDO_addUnitHealth(aUnit, aDelta, aSrcGUID)
tInfo = VUHDO_RAID[aUnit] or tDeadInfo;
if not tInfo["dead"] then
-- filter exception data from combat log in classic
-- sometimes combat log shows 19000+ damage but it's not correct e.g Ragnaros's Melt Weapon
if aSrcGUID and abs(aDelta) > 10000 then
local tSrc, _, _, _, _, tNpcId = strsplit("-", aSrcGUID);
-- 11502 - Ragnaros
-- 11583 - Nefarian
if tNpcId and (tNpcId == "11502" or tNpcId == "11583") then
return;
end
-- 18168 - Force Reactive Disk
if tSrc and tSrc == "Player" and abs(aDelta) == 18168 then
return;
end
end
-- avoid the calculation to be disturbed by the exception data
if UnitHealth(aUnit) ~= 0 or tInfo["health"] ~= 0 then
tNewHealth = tInfo["health"] + aDelta;
else
tNewHealth = tInfo["loghealth"] + aDelta;
end
if tNewHealth < 0 then
tNewHealth = 0;
elseif tNewHealth > tInfo["healthmax"] then
tNewHealth = tInfo["healthmax"];
end
tInfo["loghealth"] = tNewHealth;
tInfo["updateTime"] = GetTime();
if tInfo["health"] ~= tNewHealth then
VUHDO_updateHealth(aUnit, 12); -- VUHDO_UPDATE_HEALTH_COMBAT_LOG
end
end
end
--
local tPre, tSuf, tSpec;
local function VUHDO_getTargetHealthImpact(aMsg, aMsg1, aMsg2, aMsg4)
tPre, tSuf, tSpec = strsplit("_", aMsg);
if "SPELL" == tPre then
if ("HEAL" == tSuf or "HEAL" == tSpec) and "MISSED" ~= tSpec then
return aMsg4;
elseif "DAMAGE" == tSuf or "DAMAGE" == tSpec then
return -aMsg4;
end
elseif "DAMAGE" == tSuf then
if "SWING" == tPre then
return -aMsg1;
elseif "RANGE" == tPre then
return -aMsg4;
elseif "ENVIRONMENTAL" == tPre then
return -aMsg2;
end
elseif "DAMAGE" == tPre and "MISSED" ~= tSpec and "RESISTED" ~= tSpec then
return -aMsg4;
end
return 0;
end
--
function VUHDO_clParserSetCurrentTarget(aUnit)
sCurrentTarget = VUHDO_INTERNAL_TOGGLES[27] and aUnit or "*"; -- VUHDO_UPDATE_PLAYER_TARGET
end
--
function VUHDO_clParserSetCurrentFocus()
sCurrentFocus = nil;
for tUnit, tInfo in pairs(VUHDO_RAID) do
if UnitIsUnit("focus", tUnit) and tUnit ~= "focus" and tUnit ~= "target" then
if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or {})["isVehicle"] then
sCurrentFocus = tInfo["ownerUnit"];
else
sCurrentFocus = tUnit;
end
break;
end
end
end
--
local tUnit;
local tImpact;
function VUHDO_parseCombatLogEvent(aMsg, aDstGUID, aMsg1, aMsg2, aMsg4, aSrcGUID)
tUnit = VUHDO_RAID_GUIDS[aDstGUID];
if not tUnit then return; end
-- as of patch 7.1 we are seeing empty values on health related events
tImpact = tonumber(VUHDO_getTargetHealthImpact(aMsg, aMsg1, aMsg2, aMsg4)) or 0;
if tImpact ~= 0 then
VUHDO_addUnitHealth(tUnit, tImpact, aSrcGUID);
if tUnit == sCurrentTarget then VUHDO_addUnitHealth("target", tImpact); end
if tUnit == sCurrentFocus then VUHDO_addUnitHealth("focus", tImpact); end
end
end
--
function VUHDO_getCurrentPlayerFocus()
return sCurrentFocus;
end
local VUHDO_RAID = { };
local VUHDO_RAID_GUIDS = { };
local VUHDO_INTERNAL_TOGGLES = { };
local strsplit = strsplit;
local pairs = pairs;
local VUHDO_updateHealth;
local sCurrentTarget = nil;
local sCurrentFocus = nil;
--
function VUHDO_combatLogInitLocalOverrides()
VUHDO_RAID = _G["VUHDO_RAID"];
VUHDO_RAID_GUIDS = _G["VUHDO_RAID_GUIDS"];
VUHDO_INTERNAL_TOGGLES = _G["VUHDO_INTERNAL_TOGGLES"];
VUHDO_updateHealth = _G["VUHDO_updateHealth"];
end
--
local tInfo;
local tNewHealth;
local tDeadInfo = { ["dead"] = true };
local function VUHDO_addUnitHealth(aUnit, aDelta)
tInfo = VUHDO_RAID[aUnit] or tDeadInfo;
if not tInfo["dead"] then
tNewHealth = tInfo["health"] + aDelta;
if tNewHealth < 0 then tNewHealth = 0;
elseif tNewHealth > tInfo["healthmax"] then tNewHealth = tInfo["healthmax"]; end
if tInfo["health"] ~= tNewHealth then
tInfo["health"] = tNewHealth;
VUHDO_updateHealth(aUnit, 2); -- VUHDO_UPDATE_HEALTH
end
end
end
--
local tPre, tSuf, tSpec;
local function VUHDO_getTargetHealthImpact(aMsg, aMsg1, aMsg2, aMsg4)
tPre, tSuf, tSpec = strsplit("_", aMsg);
if "SPELL" == tPre then
if ("HEAL" == tSuf or "HEAL" == tSpec) and "MISSED" ~= tSpec then
return aMsg4;
elseif "DAMAGE" == tSuf or "DAMAGE" == tSpec then
return -aMsg4;
end
elseif "DAMAGE" == tSuf then
if "SWING" == tPre then
return -aMsg1;
elseif "RANGE" == tPre then
return -aMsg4;
elseif "ENVIRONMENTAL" == tPre then
return -aMsg2;
end
elseif "DAMAGE" == tPre and "MISSED" ~= tSpec and "RESISTED" ~= tSpec then
return -aMsg4;
end
return 0;
end
--
function VUHDO_clParserSetCurrentTarget(aUnit)
sCurrentTarget = VUHDO_INTERNAL_TOGGLES[27] and aUnit or "*"; -- VUHDO_UPDATE_PLAYER_TARGET
end
--
function VUHDO_clParserSetCurrentFocus()
sCurrentFocus = nil;
for tUnit, tInfo in pairs(VUHDO_RAID) do
if UnitIsUnit("focus", tUnit) and tUnit ~= "focus" and tUnit ~= "target" then
if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or {})["isVehicle"] then
sCurrentFocus = tInfo["ownerUnit"];
else
sCurrentFocus = tUnit;
end
break;
end
end
end
--
local tUnit;
local tImpact;
function VUHDO_parseCombatLogEvent(aMsg, aDstGUID, aMsg1, aMsg2, aMsg4)
tUnit = VUHDO_RAID_GUIDS[aDstGUID];
if not tUnit then return; end
-- as of patch 7.1 we are seeing empty values on health related events
tImpact = tonumber(VUHDO_getTargetHealthImpact(aMsg, aMsg1, aMsg2, aMsg4)) or 0;
if tImpact ~= 0 then
VUHDO_addUnitHealth(tUnit, tImpact);
if tUnit == sCurrentTarget then VUHDO_addUnitHealth("target", tImpact); end
if tUnit == sCurrentFocus then VUHDO_addUnitHealth("focus", tImpact); end
end
end
--
function VUHDO_getCurrentPlayerFocus()
return sCurrentFocus;
end
VUHDO_VERSION = GetAddOnMetadata("VuhDo", "Version");
VUHDO_MIN_TOC_VERSION = 11302;
VUHDO_MIN_TOC_VERSION = 20501;
VUHDO_COMMS_PREFIX = "VUHDO";
VUHDO_YES = 1;
......@@ -252,7 +252,6 @@ VUHDO_UPDATE_TARGET = 8;
VUHDO_UPDATE_INC = 9;
VUHDO_UPDATE_ALIVE = 10;
VUHDO_UPDATE_EMERGENCY = 11;
VUHDO_UPDATE_HEALTH_COMBAT_LOG = 12;
-- nur fr bouquets
VUHDO_UPDATE_MANA = 13;
VUHDO_UPDATE_THREAT_PERC = 14;
......@@ -365,8 +364,7 @@ VUHDO_HEALING_HOTS = {
[VUHDO_SPELL_ID.PAIN_SUPPRESSION] = true,
[VUHDO_SPELL_ID.ECHO_OF_LIGHT] = true,
[VUHDO_SPELL_ID.ATONEMENT] = true,
[VUHDO_SPELL_ID.CLARITY_OF_WILL] = true,
[VUHDO_SPELL_ID.LUMINOUS_BARRIER] = true,
[VUHDO_SPELL_ID.SPIRIT_SHELL] = true,
-- Druid
[VUHDO_SPELL_ID.REJUVENATION] = true,
[VUHDO_SPELL_ID.REGROWTH] = true,
......@@ -404,8 +402,7 @@ VUHDO_EXCLUSIVE_HOTS = {
[VUHDO_SPELL_ID.BUFF_EARTH_SHIELD] = true,
[VUHDO_SPELL_ID.GUARDIAN_SPIRIT] = true,
[VUHDO_SPELL_ID.PAIN_SUPPRESSION] = true,
[VUHDO_SPELL_ID.CLARITY_OF_WILL] = true,
[VUHDO_SPELL_ID.LUMINOUS_BARRIER] = true,
[VUHDO_SPELL_ID.SPIRIT_SHELL] = true,
};
......
......@@ -31,7 +31,8 @@ VUHDO_DEBUFF_BLACKLIST = {
-- [GetSpellInfo(57724)] = true, -- Sated (Bloodlust)
-- [GetSpellInfo(71328)] = true, -- Dungeon Cooldown
-- [GetSpellInfo(57723)] = true, -- Exhaustion (Heroism)
-- [GetSpellInfo(80354)] = true -- Temporal Displacement
-- [GetSpellInfo(80354)] = true, -- Temporal Displacement (Time Warp)
-- [VUHDO_SPELL_ID.DEBUFF_FATIGUED] = true -- Fatigued (Primal Fury)
};
......@@ -67,6 +68,7 @@ local sIsUseDebuffIconBossOnly;
local sIsMiBuColorsInFight;
local sStdDebuffSound;
local sAllDebuffSettings;
local sIsShowOnlyForFriendly;
local sEmpty = { };
--local sColorArray = nil;
......@@ -85,6 +87,8 @@ function VUHDO_debuffsInitLocalOverrides()
sIsMiBuColorsInFight = VUHDO_BUFF_SETTINGS["CONFIG"]["BAR_COLORS_IN_FIGHT"];
sStdDebuffSound = VUHDO_CONFIG["SOUND_DEBUFF"];
sAllDebuffSettings = VUHDO_CONFIG["CUSTOM_DEBUFF"]["STORED_SETTINGS"];
sIsShowOnlyForFriendly = VUHDO_CONFIG["CUSTOM_DEBUFF"]["isShowOnlyForFriendly"];
VUHDO_DEBUFF_COLORS = {
[1] = VUHDO_PANEL_SETUP["BAR_COLORS"]["DEBUFF1"],
[2] = VUHDO_PANEL_SETUP["BAR_COLORS"]["DEBUFF2"],
......@@ -312,7 +316,6 @@ function VUHDO_determineDebuff(aUnit)
for tCnt = 1, huge do
tName, tIcon, tStacks, tTypeString, tDuration, tExpiry, tUnitCaster, _, _, tSpellId, _, tIsBossDebuff = UnitDebuff(aUnit, tCnt);
if not tIcon then
break;
end
......@@ -422,23 +425,25 @@ function VUHDO_determineDebuff(aUnit)
for tName, tDebuffInfo in pairs(sCurIcons) do
if not VUHDO_UNIT_CUSTOM_DEBUFFS[aUnit][tName] then
-- tExpiry, tStacks, tIcon
VUHDO_UNIT_CUSTOM_DEBUFFS[aUnit][tName] = { tDebuffInfo[2], tDebuffInfo[3], tDebuffInfo[1], tDebuffInfo[7] };
if not sIsShowOnlyForFriendly or UnitIsFriend("player", aUnit) then
-- tExpiry, tStacks, tIcon
VUHDO_UNIT_CUSTOM_DEBUFFS[aUnit][tName] = { tDebuffInfo[2], tDebuffInfo[3], tDebuffInfo[1], tDebuffInfo[7] };
VUHDO_addDebuffIcon(aUnit, tDebuffInfo[1], tName, tDebuffInfo[2], tDebuffInfo[3], tDebuffInfo[4], tDebuffInfo[5], tDebuffInfo[6], tDebuffInfo[7]);
VUHDO_addDebuffIcon(aUnit, tDebuffInfo[1], tName, tDebuffInfo[2], tDebuffInfo[3], tDebuffInfo[4], tDebuffInfo[5], tDebuffInfo[6], tDebuffInfo[7]);
if not VUHDO_IS_CONFIG and VUHDO_MAY_DEBUFF_ANIM then
-- the key used to store the debuff settings is either the debuff name or spell ID
tDebuffSettings = sAllDebuffSettings[tName] or sAllDebuffSettings[tostring(tDebuffInfo[6])];
if not VUHDO_IS_CONFIG and VUHDO_MAY_DEBUFF_ANIM then
-- the key used to store the debuff settings is either the debuff name or spell ID
tDebuffSettings = sAllDebuffSettings[tName] or sAllDebuffSettings[tostring(tDebuffInfo[6])];
if tDebuffSettings then -- particular custom debuff sound?
VUHDO_playDebuffSound(tDebuffSettings["SOUND"], tName);
elseif VUHDO_CONFIG["CUSTOM_DEBUFF"]["SOUND"] then -- default custom debuff sound?
VUHDO_playDebuffSound(VUHDO_CONFIG["CUSTOM_DEBUFF"]["SOUND"], tName);
if tDebuffSettings then -- particular custom debuff sound?
VUHDO_playDebuffSound(tDebuffSettings["SOUND"], tName);
elseif VUHDO_CONFIG["CUSTOM_DEBUFF"]["SOUND"] then -- default custom debuff sound?
VUHDO_playDebuffSound(VUHDO_CONFIG["CUSTOM_DEBUFF"]["SOUND"], tName);
end
end
end
VUHDO_updateBouquetsForEvent(aUnit, 29); -- VUHDO_UPDATE_CUSTOM_DEBUFF
VUHDO_updateBouquetsForEvent(aUnit, 29); -- VUHDO_UPDATE_CUSTOM_DEBUFF
end
-- update number of stacks?
elseif VUHDO_UNIT_CUSTOM_DEBUFFS[aUnit][tName][1] ~= tDebuffInfo[2]
or VUHDO_UNIT_CUSTOM_DEBUFFS[aUnit][tName][2] ~= tDebuffInfo[3]
......
......@@ -542,6 +542,7 @@ local VUHDO_DEFAULT_CONFIG = {
["SHOW_OWN_INCOMING"] = true,
["SHOW_TEXT_OVERHEAL"] = true,
["SHOW_SHIELD_BAR"] = true,
["SHOW_OVERSHIELD_BAR"] = false,
["RANGE_CHECK_DELAY"] = 260,
......@@ -597,7 +598,8 @@ local VUHDO_DEFAULT_CONFIG = {
["isIcon"] = true,
["isColor"] = false,
["isStacks"] = false,
["isName"] = false,
["isName"] = false,
["isShowOnlyForFriendly"] = false,
["blacklistModi"] = "ALT-CTRL-SHIFT",
["selected"] = "",
["point"] = "TOPRIGHT",
......@@ -848,124 +850,8 @@ function VUHDO_loadDefaultConfig()
VUHDO_CONFIG["VERSION"] = 4;
end
-- 1.13.2 - Classic
VUHDO_addCustomSpellIds(45,
-- [[ MolTon Core ]]
-- Baron Geddon
20475 -- Living Bomb
);
-- 1.13.5 - Classic - part 5
VUHDO_addCustomSpellIds(46,
-- [[ TAQ ]]
26143, -- Mind Flay
26476, -- Digestive Acid
26079, -- Cause Insanity
25991, -- Poison Bolt Volley
26077, -- Itch
26044, -- Mind Flay
25989, -- Toxin
26078, -- Vekniss Catalyst
9907, -- Faerie Fire
27648, -- Thunderfury
21992, -- Thunderfury
18327, -- Silence
25812, -- Toxic Volley
12721, -- Deep Wound
25174, -- Sundering Cleave
26613, -- Unbalancing Strike
26053, -- Noxious Poison
26050, -- Acid Spit
26025, -- Impale
25646, -- Mortal Wound
19134, -- Intimidating Shout
26072, -- Dust Cloud
25051, -- Sunder Armor
-- 26049, -- Mana Burn
26180, -- Wyvern Sting
-- 26211, -- Hamstring
26070, -- Fear
26102, -- Sand Blast
24573, -- Mortal Strike
26552, -- Nullify
26580, -- Fear
25810, -- Mind-numbing Poison
26601, -- Poison Bolt
22412, -- Virulent Poison
25809, -- Crippling Poison
19128, -- Knockdown
785, -- True Fulfillment
1906 -- Debilitating Charge
);
-- 1.13.5 - Classic - part 6
VUHDO_addCustomSpellIds(47,
-- [[ Naxxramas ]]
-- Anub'Rekhan
28969, -- Acid Spit
-- 28783, -- Impale
28786, -- Locust Swarm
-- 28991, -- Web
-- Anub'Rekhan
22886, -- Berserker Charge
28796, -- Poison Bolt Volley
28794, -- Rain of Fire
30225, -- Silence
-- Maexxna
28741, -- Poison Shock
29484, -- Web Spray
28622, -- Web Wrap
-- Noth the Plaguebringer
29212, -- Cripple
13737, -- Mortal Strike
30138, -- Shadow Shock
29214, -- Wrath of the Plaguebringer
-- Heigan the Unclean
29998, -- Decrepit Fever
-- 29371, -- Eruption
30113, -- Putrid Bite
30109, -- Slime Burst
-- Loatheb
29204, -- Inevitable Doom
29184, -- Corrupted Mind
11196, -- Recently Bandaged
-- Instructor Razuvious
26613, -- Unbalancing Strike
-- Gothik the Harvester
27994, -- Drain Life
-- The Four Horsemen
28884, -- Meteor
28882, -- Righteous Fire
-- Patchwerk
-- 28308, -- Hateful Strike
-- Grobbulus
28153, -- Disease Cloud
28206, -- Mutagen Explosion
28169, -- Mutating Injection
-- Gluth
29685, -- Terrifying Roar
25646, -- Mortal Wound
29306, -- Infected Wound
-- Thaddius
28125, -- War Stomp
28167, -- Chain Lightning
-- 28059, -- Positive Charge
-- 28084, -- Negative Charge
-- Sapphiron
28542, -- Life Drain
15847, -- Tail Sweep
28547, -- Chill
28522, -- Icebolt
-- Kel'Thuzad
-- 29879, -- Frost Blast
-- 10187, -- Blizzard
-- 28479, -- Frostbolt
-- 28478, -- Frostbolt
27819, -- Detonate Mana
27808, -- Frost Blast
28408, -- Chains of Kel'Thuzad
28409, -- Chains of Kel'Thuzad
28410 -- Chains of Kel'Thuzad
);
-- add relevant custom debuffs for raid bosses
-- TODO: Naxxramas left off at 47, start TBCC at 48
local debuffRemovalList = {};
......@@ -1125,6 +1011,11 @@ local VUHDO_DEFAULT_PANEL_SETUP = {
["TR"] = 0.35, ["TG"] = 0.52, ["TB"] = 1, ["TO"] = 1,
["useText"] = false, ["useBackground"] = true, ["useOpacity"] = true,
},
["OVERSHIELD"] = {
["R"] = 0.35, ["G"] = 0.52, ["B"] = 1, ["O"] = 1,
["TR"] = 0.35, ["TG"] = 0.52, ["TB"] = 1, ["TO"] = 1,
["useText"] = false, ["useBackground"] = true, ["useOpacity"] = true,
},
["DIRECTION"] = {
["R"] = 1, ["G"] = 0.4, ["B"] = 0.4, ["O"] = 1,
["useBackground"] = true,
......
......@@ -94,6 +94,7 @@ VUHDO_DEFAULT_BOUQUETS = {
},
},
[VUHDO_I18N_DEF_BOUQUET_BORDER_MULTI] = {
{
["name"] = "PLAYER_TARGET", -- "Player Target",
......@@ -852,6 +853,31 @@ VUHDO_DEFAULT_ICON_IS_PHASED = {
--
VUHDO_DEFAULT_BAR_MANA_TANK_ONLY = {
[VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY] = {
{
["name"] = "NO_RANGE",
["mine"] = true, ["icon"] = 2,
["color"] = {
["R"] = 0, ["G"] = 0, ["B"] = 0, ["O"] = 0.25,
["TR"] = 0, ["TG"] = 0, ["TB"] = 0, ["TO"] = 0.25,
["useText"] = false, ["useBackground"] = false, ["useOpacity"] = true,
["isManuallySet"] = true,
},
["custom"] = { [1] = 1, ["radio"] = 2, ["bright"] = 1.0 },
},
{
["name"] = "STATUS_POWER_TANK_ONLY",
["mine"] = true, ["icon"] = 2,
["color"] = VUHDO_makeFullColorForBouquet(0, 0, 1, 1, 0, 0, 1, 1),
["custom"] = { [1] = 1, ["radio"] = 1, ["bright"] = 1.0 },
},
},
}
--
VUHDO_DEFAULT_INDICATOR_CONFIG = {
["BOUQUETS"] = {
......@@ -1035,6 +1061,32 @@ VUHDO_SANE_BOUQUET_ITEM = {
};
--
VUHDO_DEFAULT_MONK_STAGGER_BOUQUET = {
[VUHDO_I18N_DEF_BOUQUET_MONK_STAGGER] = {
{
["name"] = GetSpellInfo(124273), -- "Heavy Stagger",
["mine"] = true, ["others"] = true, ["icon"] = 1,
["color"] = VUHDO_makeFullColorForBouquet(1, 1, 1, 1, 1, 1, 1, 1),
["custom"] = { [1] = 1, ["radio"] = 1, ["bright"] = 1.0 },
},
{
["name"] = GetSpellInfo(124274), -- "Moderate Stagger",
["mine"] = true, ["others"] = true, ["icon"] = 1,
["color"] = VUHDO_makeFullColorForBouquet(1, 1, 1, 1, 1, 1, 1, 1),
["custom"] = { [1] = 1, ["radio"] = 1, ["bright"] = 1.0 },
},
{
["name"] = GetSpellInfo(124275), -- "Light Stagger",
["mine"] = true, ["others"] = true, ["icon"] = 1,
["color"] = VUHDO_makeFullColorForBouquet(1, 1, 1, 1, 1, 1, 1, 1),
["custom"] = { [1] = 1, ["radio"] = 1, ["bright"] = 1.0 },
}
}
}
local pairs = pairs;
--
......@@ -1364,119 +1416,144 @@ end
local tTankCdsExtended = {
49222, --Bone Shield
116888, --Shroud of Purgatory
48792, --Icebound Fortitude
49028, --Dancing Rune Weapon
55233, --Vampiric Blood
194679, --Rune Tap
48707, --Anti-Magic Shell
50461, --Anti-Magic Zone
49222, --Bone Shield
49039, --Lichborne
81164, --Will of the Necropolis
642, --Divine Shield
498, --Divine Protection
31850, --Ardent Defender
1022, --Hand of Protection
6940, --Hand of Sacrifice
70940, --Divine Guardian
64205, --Divine Sacrifine
86659, --Ancient Guardian
86659, --Guardian of Ancient Kings
53600, --Shield of the Righteous
871, --Shield Wall
2565, --Shield Block
12975, --Last Stand
3411, --Intervene
55694, --Enraged Regeneration
23920, --Spell Reflection
190456, --Ignore Pain
2565, --Shield Block
22812, --Barkskin
102558, --Incarnation: Guardian of Ursoc
61336, --Survival Instincts
22842 --Frenzied Regeneration
22842, --Frenzied Regeneration
22812, --Barkskin
102342, --Ironbark
192081, --Ironfur
187827, --Metamorphosis
203720, --Demon Spikes
115203, --Fortifying Brew
122278, --Dampen Harm
115176 --Zen meditation
};
local tRaidCds = {
-- Pally
642, -- Divine Shield
498, -- Divine Protection
1022, -- Hand of Protection
6940, -- Hand of Sacrifice
31850, -- Ardent Defender
86659, -- Guardian of Ancient Kings
31821, -- Devotion Aura
114039, -- Hand of Purity
-- Warrior
871, -- Shield Wall
642, --Divine Shield
498, --Divine Protection
31850, --Ardent Defender
1022, --Blessing of Protection
204018, --Blessing of Spellwarding
86659, --Guardian of Ancient Kings
6940, --Blessing of Sacrifice
31821, --Aura Mastery
53600, --Shield of the Righteous
-- Warrior
97462, -- Rallying Cry
118038, -- Die by the Sword
12975, -- Last Stand
114028, -- Mass Spell Reflect
114030, -- Vigilance
55694, -- Enraged Regeneration
105914, -- Shield Fortress
871, --Shield Wall
12975, --Last Stand
23920, --Spell Reflection
190456, --Ignore Pain
2565, --Shield Block
3411, --Intervene
114028, --Mass Spell Reflect
118038, --Die by the Sword
55694, --Enraged Regeneration
-- Druid
22812, -- Barkskin
106922, -- Might of Ursoc
740, -- Tranquility
102342, -- Ironbark
61336, -- Survival Instincts
105739, -- Mass Regeneration
-- DK
48792, -- Icebound Fortitude
48707, -- Anti-Magic Shell
49222, -- Bone Shield
49028, -- Dancing Rune Weapon
55233, -- Vampiric Blood
81164, -- Will of the Necropolis
51052, -- Anti-Magic Zone
116888, -- Shroud of Purgatory
-- WL
104773, -- Unending Resolve
119899, -- Cauterize Master
755, -- Health Funnel
110913, -- Dark Bargain
108359, -- Dark Regeneration
108503, -- Grimmoire of Sacrifice
102558, --Incarnation: Guardian of Ursoc
61336, --Survival Instincts
22842, --Frenzied Regeneration
22812, --Barkskin
102342, --Ironbark
192081, --Ironfur
740, --Tranquility
-- Death Knight
116888, --Shroud of Purgatory
48792, --Icebound Fortitude
49028, --Dancing Rune Weapon
55233, --Vampiric Blood
194679, --Rune Tap
48707, --Anti-Magic Shell
50461, --Anti-Magic Zone
49222, --Bone Shield
49039, --Lichborne
81164, --Will of the Necropolis
-- Warlock
104773, --Unending Resolve
108359, --Dark Regeneration
108416, --Dark Pact
-- Priest
47585, -- Dispersion
64843, -- Divine Hymn
47788, -- Guardian Spirit
33206, -- Pain Suppression
62618, -- Power Word: Barrier
108945, -- Angelic Bulwark
47585, --Dispersion
64843, --Divine Hymn
47788, --Guardian Spirit
33206, --Pain Suppression
62618, --Power Word: Barrier
19236, --Desperate Prayer
-- Shaman
30823, -- Shamanistic Rage
98008, -- Spirit Link Totem
16190, -- Mana Tide Totem
108280, -- Healing Tide Totem
108271, -- Astral Shift
98008, --Spirit Link Totem
16190, --Mana Tide Totem
108280, --Healing Tide Totem
118337, --Harden Skin
108271, --Astral Shift
-- Rogue
5277, -- Evasion
73651, -- Recuperate
1966, -- Feint
31224, -- Cloak of Shadows
114018, -- Shroud of Concealment
76577, -- Smoke Bomb
5277, --Evasion
185311, --Crimson Vial
1966, --Feint
31224, --Cloak of Shadows
114018, --Shroud of Concealment
76577, --Smoke Bomb
31230, --Cheat death
-- Mage,
45438, -- Ice Block
86949, -- Cauterize
110959, -- Greater Invisibility
159916, -- Amplify Magic
45438, --Ice Block
86949, --Cauterize
110959, --Greater Invisibility
-- Hunter
19263, -- Deterrence
90361, -- Spirit Mend
186265, --Aspect of the Turtle
264735, --Survival of the Fittest
90361, --Spirit Mend
-- Monk
115203, -- Fortifying Brew
116849, -- Life Cocoon
122278, -- Dampen Harm
122783 -- Diffuse Magic
115203, --Fortifying Brew
115176, --Zen meditation
122278, --Dampen Harm
116849, --Life Cocoon
122783, --Diffuse Magic
122470, --Touch of Karma
-- Demon Hunter
187827, --Metamorphosis
203720, --Demon Spikes
198589, --Blur
196555, --Netherwalk
196718 --Darkness
};
......@@ -1638,6 +1715,18 @@ function VUHDO_loadDefaultBouquets()
VUHDO_DEFAULT_RUNES_BOUQUET = nil;
VUHDO_DEFAULT_ARCANE_CHARGES_BOUQUET = nil;
if VUHDO_BOUQUETS["VERSION"] < 24 then
VUHDO_BOUQUETS["VERSION"] = 24;
VUHDO_addDefaultBouquet(VUHDO_DEFAULT_MONK_STAGGER_BOUQUET);
end
VUHDO_DEFAULT_MONK_STAGGER_BOUQUET = nil;
if VUHDO_BOUQUETS["VERSION"] < 25 then
VUHDO_BOUQUETS["VERSION"] = 25;
VUHDO_addDefaultBouquet(VUHDO_DEFAULT_BAR_MANA_TANK_ONLY);
end
VUHDO_DEFAULT_BAR_MANA_TANK_ONLY = nil;
VUHDO_buildGenericHealthBarBouquet();
VUHDO_buildGenericTargetHealthBouquet();
......
......@@ -425,7 +425,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
-- SWING_DAMAGE - the amount of damage is the 12th arg
-- ENVIRONMENTAL_DAMAGE - the amount of damage is the 13th arg
-- for all other events with the _DAMAGE suffix the amount of damage is the 15th arg
VUHDO_parseCombatLogEvent(anArg2, anArg8, anArg12, anArg13, anArg15, anArg4);
VUHDO_parseCombatLogEvent(anArg2, anArg8, anArg12, anArg13, anArg15);
if VUHDO_INTERNAL_TOGGLES[36] then -- VUHDO_UPDATE_SHIELD
-- for SPELL events with _AURA suffixes the amount healed is the 16th arg
......@@ -452,26 +452,18 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
VUHDO_updateBouquetsForEvent(anArg1, 4); -- VUHDO_UPDATE_DEBUFF
end
-- elseif "UNIT_HEALTH" == anEvent then
-- as of patch 7.1 we are seeing empty units on health related events
-- if anArg1 and (VUHDO_RAID or tEmptyRaid)[anArg1] then
-- VUHDO_updateHealth(anArg1, 2); -- VUHDO_UPDATE_HEALTH
-- end
-- TODO: is it ok to listen to both UNIT_HEALTH and UNIT_HEALTH_FREQUENT?
-- TODO: add options based on desired responsiveness and performance
elseif "UNIT_HEALTH_FREQUENT" == anEvent then
elseif "UNIT_HEALTH" == anEvent then
-- as of patch 7.1 we are seeing empty units on health related events
if anArg1 and ((VUHDO_RAID or tEmptyRaid)[anArg1] or VUHDO_isBossUnit(anArg1)) then
VUHDO_updateHealth(anArg1, 2);
end
--[[ elseif "UNIT_HEAL_PREDICTION" == anEvent then
elseif "UNIT_HEAL_PREDICTION" == anEvent then
if (VUHDO_RAID or tEmptyRaid)[anArg1] then -- auch target, focus
VUHDO_updateHealth(anArg1, 9); -- VUHDO_UPDATE_INC
VUHDO_updateBouquetsForEvent(anArg1, 9); -- VUHDO_UPDATE_ALT_POWER
end
]]
elseif "UNIT_POWER_UPDATE" == anEvent or "UNIT_POWER_FREQUENT" == anEvent then
if (VUHDO_RAID or tEmptyRaid)[anArg1] then
if "CHI" == anArg2 then
......@@ -493,21 +485,28 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
end
end
--[[ elseif "UNIT_ABSORB_AMOUNT_CHANGED" == anEvent then
elseif "UNIT_ABSORB_AMOUNT_CHANGED" == anEvent then
if (VUHDO_RAID or tEmptyRaid)[anArg1] then -- auch target, focus
VUHDO_updateBouquetsForEvent(anArg1, 36); -- VUHDO_UPDATE_SHIELD
VUHDO_updateShieldBar(anArg1);
-- 9.0.1 added Priest 'Spirit Shell' which does not fire SPELL_AURA__REFRESH events as normal
-- instead use this event handler to track the 'Spirit Shell' absorb amount
if VUHDO_getShieldPerc(anArg1, VUHDO_SPELL_ID.SPIRIT_SHELL) > 0 then
-- 114908 is the spell ID of the 'Spirit Shell' absorb aura
VUHDO_updateShield(anArg1, 114908);
end
end
]]
elseif "UNIT_SPELLCAST_SUCCEEDED" == anEvent then
if (VUHDO_RAID or tEmptyRaid)[anArg1] then VUHDO_spellcastSucceeded(anArg1, anArg3); end
elseif "UNIT_SPELLCAST_SENT" == anEvent then
if VUHDO_VARIABLES_LOADED then VUHDO_spellcastSent(anArg1, anArg2, anArg4); end
--[[ elseif "UNIT_THREAT_SITUATION_UPDATE" == anEvent then
elseif "UNIT_THREAT_SITUATION_UPDATE" == anEvent then
if VUHDO_VARIABLES_LOADED then VUHDO_updateThreat(anArg1); end
]]
elseif "PLAYER_REGEN_ENABLED" == anEvent then
if VUHDO_VARIABLES_LOADED then
for tUnit, _ in pairs(VUHDO_RAID) do
......@@ -551,10 +550,10 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
else VUHDO_normalRaidReload(); end
end
--[[ elseif "UNIT_ENTERED_VEHICLE" == anEvent or "UNIT_EXITED_VEHICLE" == anEvent or "UNIT_EXITING_VEHICLE" == anEvent then
elseif "UNIT_ENTERED_VEHICLE" == anEvent or "UNIT_EXITED_VEHICLE" == anEvent or "UNIT_EXITING_VEHICLE" == anEvent then
VUHDO_REMOVE_HOTS = false;
VUHDO_normalRaidReload();
]]
elseif "RAID_TARGET_UPDATE" == anEvent then
VUHDO_TIMERS["CUSTOMIZE"] = 0.1;
......@@ -569,7 +568,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
if VUHDO_TIMERS["RELOAD_ROSTER"] < 0.4 then VUHDO_TIMERS["RELOAD_ROSTER"] = 0.6; end
end
--[[ elseif "PLAYER_FOCUS_CHANGED" == anEvent then
elseif "PLAYER_FOCUS_CHANGED" == anEvent then
VUHDO_removeAllDebuffIcons("focus");
VUHDO_quickRaidReload();
VUHDO_clParserSetCurrentFocus();
......@@ -578,7 +577,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
VUHDO_determineIncHeal("focus");
VUHDO_updateHealth("focus", 9); -- VUHDO_UPDATE_INC
end
]]
elseif "PARTY_MEMBER_ENABLE" == anEvent or "PARTY_MEMBER_DISABLE" == anEvent then
VUHDO_TIMERS["CUSTOMIZE"] = 0.2;
......@@ -665,7 +664,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
elseif "PLAYER_EQUIPMENT_CHANGED" == anEvent then
VUHDO_aoeUpdateSpellAverages();
--[[ elseif "LFG_PROPOSAL_SHOW" == anEvent then
elseif "LFG_PROPOSAL_SHOW" == anEvent then
VUHDO_buildSafeParty();
elseif "LFG_PROPOSAL_FAILED" == anEvent then
......@@ -673,7 +672,6 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
elseif "LFG_PROPOSAL_SUCCEEDED" == anEvent then
VUHDO_lateRaidReload();
]]
--elseif("UPDATE_MACROS" == anEvent) then
--VUHDO_timeReloadUI(0.1); -- @WARNING Ldt wg. shield macro alle 8 sec.
......@@ -683,34 +681,34 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
elseif "INCOMING_RESURRECT_CHANGED" == anEvent then
if ((VUHDO_RAID or tEmptyRaid)[anArg1] ~= nil) then VUHDO_updateBouquetsForEvent(anArg1, VUHDO_UPDATE_RESURRECTION); end
--[[ elseif "PET_BATTLE_OPENING_START" == anEvent then
elseif "PET_BATTLE_OPENING_START" == anEvent then
VUHDO_setPetBattle(true);
elseif "PET_BATTLE_CLOSE" == anEvent then
VUHDO_setPetBattle(false);
]]
--[[ elseif "INCOMING_SUMMON_CHANGED" == anEvent then
elseif "INCOMING_SUMMON_CHANGED" == anEvent then
if ((VUHDO_RAID or tEmptyRaid)[anArg1] ~= nil) then
VUHDO_updateBouquetsForEvent(anArg1, VUHDO_UPDATE_SUMMON);
end
]]
elseif "UNIT_PHASE" == anEvent then
if ((VUHDO_RAID or tEmptyRaid)[anArg1] ~= nil) then
VUHDO_updateBouquetsForEvent(anArg1, VUHDO_UPDATE_PHASE);
end
--[[ elseif "RUNE_POWER_UPDATE" == anEvent then
elseif "RUNE_POWER_UPDATE" == anEvent then
VUHDO_updateBouquetsForEvent("player", 42); -- VUHDO_UPDATE_RUNES
elseif "PLAYER_SPECIALIZATION_CHANGED" == anEvent then
if VUHDO_VARIABLES_LOADED and not InCombatLockdown() then
if "player" == anArg1 then
local tSpecNum = tostring(VUHDO_getSpecialization()) or "1";
local tSpecNum = tostring(GetSpecialization()) or "1";
local tBestProfile = VUHDO_getBestProfileAfterSpecChange();
-- event sometimes fires multiple times so we must de-dupe
if (VUHDO_SPEC_LAYOUTS["selected"] ~= VUHDO_SPEC_LAYOUTS[tSpecNum]) or
(VUHDO_CONFIG["CURRENT_PROFILE"] ~= tBestProfile) then
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
end
......@@ -721,7 +719,7 @@ function VUHDO_OnEvent(_, anEvent, anArg1, anArg2, anArg3, anArg4, anArg5, anArg
VUHDO_timeReloadUI(1);
end
end
]]
else
VUHDO_Msg("Error: Unexpected event: " .. anEvent);
end
......@@ -746,7 +744,7 @@ end
--
local function VUHDO_printAbout()
VUHDO_Msg("VuhDo |cffffe566['vu:du:]|r v" .. VUHDO_VERSION .. " (use /vd). Currently maintained by Ivaria@US-Hyjal in honor of Marshy.");
VUHDO_Msg("VuhDo |cffffe566['vu:du:]|r v" .. VUHDO_VERSION .. " (use /vd). Currently maintained by Ivaria@US-Hyjal in honor of Marshy and our newborn daughter Kiana.");
end
......@@ -924,11 +922,11 @@ function VUHDO_updateGlobalToggles()
VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_THREAT_LEVEL] = VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_THREAT_LEVEL);
--[[ VUHDO_UnRegisterEvent(VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_THREAT_LEVEL]
VUHDO_UnRegisterEvent(VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_THREAT_LEVEL]
or VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_AGGRO),
"UNIT_THREAT_SITUATION_UPDATE"
);
]]
VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_THREAT_PERC] = VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_THREAT_PERC);
VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_AGGRO] = VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_AGGRO);
......@@ -990,9 +988,9 @@ function VUHDO_updateGlobalToggles()
= (VUHDO_isModelConfigured(VUHDO_ID_PRIVATE_TANKS) and not VUHDO_CONFIG["OMIT_TARGET"])
or VUHDO_isModelConfigured(VUHDO_ID_TARGET);
--[[ VUHDO_UnRegisterEvent(VUHDO_CONFIG["SHOW_INCOMING"] or VUHDO_CONFIG["SHOW_OWN_INCOMING"],
VUHDO_UnRegisterEvent(VUHDO_CONFIG["SHOW_INCOMING"] or VUHDO_CONFIG["SHOW_OWN_INCOMING"],
"UNIT_HEAL_PREDICTION");
]]
VUHDO_UnRegisterEvent(not VUHDO_CONFIG["IS_READY_CHECK_DISABLED"],
"READY_CHECK", "READY_CHECK_CONFIRM", "READY_CHECK_FINISHED");
......@@ -1001,7 +999,7 @@ function VUHDO_updateGlobalToggles()
or VUHDO_CONFIG["SHOW_SHIELD_BAR"]
or VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_SHIELD);
-- VUHDO_UnRegisterEvent(VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_SHIELD], "UNIT_ABSORB_AMOUNT_CHANGED");
VUHDO_UnRegisterEvent(VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_SHIELD], "UNIT_ABSORB_AMOUNT_CHANGED");
VUHDO_INTERNAL_TOGGLES[VUHDO_UPDATE_SPELL_TRACE] = VUHDO_CONFIG["SHOW_SPELL_TRACE"]
or VUHDO_isAnyoneInterstedIn(VUHDO_UPDATE_SPELL_TRACE);
......@@ -1050,7 +1048,7 @@ local function VUHDO_updateAllAggro()
tInfo["aggro"] = true;
end
tTarget = tInfo["targetUnit"];
if tTarget and UnitExists(tTarget) and not UnitIsFriend(tUnit, tTarget) then
if UnitIsEnemy(tUnit, tTarget) then
if VUHDO_INTERNAL_TOGGLES[14] then -- VUHDO_UPDATE_AGGRO
_, _, tThreatPerc = UnitDetailedThreatSituation(tUnit, tTarget);
tInfo["threatPerc"] = tThreatPerc or 0;
......@@ -1058,7 +1056,7 @@ local function VUHDO_updateAllAggro()
tAggroUnit = VUHDO_RAID_NAMES[UnitName(tTarget .. "target")];
if tAggroUnit and UnitExists(tAggroUnit) then
if tAggroUnit then
if VUHDO_INTERNAL_TOGGLES[14] then -- VUHDO_UPDATE_AGGRO
_, _, tThreatPerc = UnitDetailedThreatSituation(tAggroUnit, tTarget);
VUHDO_RAID[tAggroUnit]["threatPerc"] = tThreatPerc or 0;
......@@ -1102,7 +1100,7 @@ local function VUHDO_updateAllRange()
end
-- Check if unit is phased
if VUHDO_unitIsWarModePhased(tUnit) or not UnitInPhase(tUnit) then
if VUHDO_unitPhaseReason(tUnit) then
tIsInRange = false;
else
-- Check if unit is in range
......@@ -1509,24 +1507,24 @@ end
local VUHDO_ALL_EVENTS = {
"VARIABLES_LOADED", "PLAYER_ENTERING_WORLD",
"UNIT_HEALTH_FREQUENT", "UNIT_MAXHEALTH", -- "UNIT_HEALTH",
"UNIT_MAXHEALTH", "UNIT_HEALTH",
"UNIT_AURA",
"UNIT_TARGET",
"GROUP_ROSTER_UPDATE", "INSTANCE_ENCOUNTER_ENGAGE_UNIT", "UPDATE_ACTIVE_BATTLEFIELD",
"UNIT_PET",
-- "UNIT_ENTERED_VEHICLE", "UNIT_EXITED_VEHICLE", "UNIT_EXITING_VEHICLE",
"UNIT_ENTERED_VEHICLE", "UNIT_EXITED_VEHICLE", "UNIT_EXITING_VEHICLE",
"CHAT_MSG_ADDON",
"RAID_TARGET_UPDATE",
"LEARNED_SPELL_IN_TAB",
"PLAYER_FLAGS_CHANGED",
"PLAYER_LOGOUT",
"UNIT_DISPLAYPOWER", "UNIT_MAXPOWER", "UNIT_POWER_UPDATE", -- "RUNE_POWER_UPDATE",
"UNIT_DISPLAYPOWER", "UNIT_MAXPOWER", "UNIT_POWER_UPDATE", "RUNE_POWER_UPDATE",
"UNIT_SPELLCAST_SENT", "UNIT_SPELLCAST_SUCCEEDED",
"PARTY_MEMBER_ENABLE", "PARTY_MEMBER_DISABLE",
"COMBAT_LOG_EVENT_UNFILTERED",
-- "UNIT_THREAT_SITUATION_UPDATE",
"UNIT_THREAT_SITUATION_UPDATE",
"UPDATE_BINDINGS",
"PLAYER_TARGET_CHANGED", -- "PLAYER_FOCUS_CHANGED",
"PLAYER_TARGET_CHANGED", "PLAYER_FOCUS_CHANGED",
"PLAYER_EQUIPMENT_CHANGED",
"READY_CHECK", "READY_CHECK_CONFIRM", "READY_CHECK_FINISHED",
"ROLE_CHANGED_INFORM",
......@@ -1534,19 +1532,19 @@ local VUHDO_ALL_EVENTS = {
"INSPECT_READY",
"MODIFIER_STATE_CHANGED",
"UNIT_CONNECTION",
-- "UNIT_HEAL_PREDICTION",
"UNIT_HEAL_PREDICTION",
"UNIT_POWER_BAR_SHOW","UNIT_POWER_BAR_HIDE",
"UNIT_NAME_UPDATE",
-- "LFG_PROPOSAL_SHOW", "LFG_PROPOSAL_FAILED", "LFG_PROPOSAL_SUCCEEDED",
"LFG_PROPOSAL_SHOW", "LFG_PROPOSAL_FAILED", "LFG_PROPOSAL_SUCCEEDED",
--"UPDATE_MACROS",
"UNIT_FACTION",
"INCOMING_RESURRECT_CHANGED",
-- "PET_BATTLE_CLOSE", "PET_BATTLE_OPENING_START",
"PET_BATTLE_CLOSE", "PET_BATTLE_OPENING_START",
"PLAYER_REGEN_ENABLED", "PLAYER_REGEN_DISABLED",
-- "UNIT_ABSORB_AMOUNT_CHANGED",
-- "INCOMING_SUMMON_CHANGED",
"UNIT_ABSORB_AMOUNT_CHANGED",
"INCOMING_SUMMON_CHANGED",
"UNIT_PHASE",
-- "PLAYER_SPECIALIZATION_CHANGED",
"PLAYER_SPECIALIZATION_CHANGED",
};
......
......@@ -320,10 +320,10 @@ local VUHDO_BLIZZ_EVENTS = {
"PLAYER_LEAVE_COMBAT",
"PLAYER_ENTERING_WORLD",
"PLAYER_FLAGS_CHANGED",
-- "PLAYER_FOCUS_CHANGED",
"PLAYER_FOCUS_CHANGED",
"PLAYER_LOGIN",
"PLAYER_ROLES_ASSIGNED",
-- "PLAYER_SPECIALIZATION_CHANGED",
"PLAYER_SPECIALIZATION_CHANGED",
"PLAYER_TARGET_CHANGED",
"PLAYER_UPDATE_RESTING",
"PLAYTIME_CHANGED",
......@@ -331,7 +331,7 @@ local VUHDO_BLIZZ_EVENTS = {
"READY_CHECK",
"READY_CHECK_CONFIRM",
"READY_CHECK_FINISHED",
-- "RUNE_POWER_UPDATE",
"RUNE_POWER_UPDATE",
"UI_SCALE_CHANGED",
"UNIT_AURA",
"UNIT_CLASSIFICATION_CHANGED",
......@@ -339,15 +339,14 @@ local VUHDO_BLIZZ_EVENTS = {
"UNIT_COMBAT",
"UNIT_COMBO_POINTS",
"UNIT_DISPLAYPOWER",
-- "UNIT_ENTERED_VEHICLE",
-- "UNIT_ENTERING_VEHICLE",
-- "UNIT_EXITED_VEHICLE",
-- "UNIT_EXITING_VEHICLE",
"UNIT_ENTERED_VEHICLE",
"UNIT_ENTERING_VEHICLE",
"UNIT_EXITED_VEHICLE",
"UNIT_EXITING_VEHICLE",
"UNIT_FACTION",
"UNIT_FLAGS",
-- "UNIT_HEAL_PREDICTION",
-- "UNIT_HEALTH",
"UNIT_HEALTH_FREQUENT",
"UNIT_HEAL_PREDICTION",
"UNIT_HEALTH",
"UNIT_LEVEL",
"UNIT_MAXHEALTH",
"UNIT_MAXPOWER",
......@@ -361,7 +360,7 @@ local VUHDO_BLIZZ_EVENTS = {
"UNIT_POWER_BAR_SHOW",
"UNIT_POWER_FREQUENT",
"UNIT_TARGETABLE_CHANGED",
-- "UNIT_THREAT_SITUATION_UPDATE",
"UNIT_THREAT_SITUATION_UPDATE",
"UPDATE_ACTIVE_BATTLEFIELD",
"UPDATE_INSTANCE_INFO",
"UPDATE_SHAPESHIFT_FORM",
......@@ -379,8 +378,7 @@ local VUHDO_FIX_EVENTS = {
"UNIT_AURA",
"UNIT_COMBAT",
"UNIT_HEAL_PREDICTION",
-- "UNIT_HEALTH",
"UNIT_HEALTH_FREQUENT",
"UNIT_HEALTH",
"UNIT_MAXHEALTH",
"UNIT_MAXPOWER",
"UNIT_PET",
......
----------------------------------------------------
local UnitGetIncomingHeals = VUHDO_unitGetIncomingHeals;
local sIsOthers, sIsOwn, sIsNoInc;
function VUHDO_healCommAdapterInitLocalOverrides()
sIsOthers = VUHDO_CONFIG["SHOW_INCOMING"];
......@@ -26,12 +27,12 @@ function VUHDO_determineIncHeal(aUnit)
if sIsOthers then
if sIsOwn then
VUHDO_INC_HEAL[aUnit] = VUHDO_unitGetIncomingHeals(aUnit);
VUHDO_INC_HEAL[aUnit] = UnitGetIncomingHeals(aUnit);
else
tAllIncoming = (VUHDO_unitGetIncomingHeals(aUnit) or 0) - (VUHDO_unitGetIncomingHeals(aUnit, "player") or 0);
tAllIncoming = (UnitGetIncomingHeals(aUnit) or 0) - (UnitGetIncomingHeals(aUnit, "player") or 0);
VUHDO_INC_HEAL[aUnit] = tAllIncoming < 0 and 0 or tAllIncoming;
end
else
VUHDO_INC_HEAL[aUnit] = VUHDO_unitGetIncomingHeals(aUnit, "player");
VUHDO_INC_HEAL[aUnit] = UnitGetIncomingHeals(aUnit, "player");
end
end
......@@ -480,3 +480,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -489,3 +489,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -490,3 +490,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -488,3 +488,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -492,3 +492,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "\"%s\"소리를 재생할 수 없음: %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "기본 디버프에 대하여 소리 \"%s\" |1을;를; 재생할 수 없습니다. 'VuhDo 옵션> 디버프> 기본> 디버프 사운드'에서 설정을 조정하십시오.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "사용자 정의 디버프 \"%s\"에 대해 \"%s\"소리를 재생할 수 없습니다. 'VuhDo 옵션> 디버프> 사용자 정의'에서 설정을 조정하십시오.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -554,3 +554,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -491,3 +491,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "无法播放音效 \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "无法为标准的DEBUFF \"%s\" 播放音效. 调整设置 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "无法为自定义的DEBUFF \"%s\" 播放音效 \"%s\". 调整设置 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
......@@ -482,3 +482,6 @@ VUHDO_I18N_PLAY_SOUND_FILE_ERR = "Could not play sound \"%s\": %s";
VUHDO_I18N_PLAY_SOUND_FILE_DEBUFF_ERR = "Could not play sound \"%s\" for standard debuff. Adjust your settings under 'VuhDo Options > Debuffs > Standard > Debuff Sound'.";
VUHDO_I18N_PLAY_SOUND_FILE_CUSTOM_DEBUFF_ERR = "Could not play sound \"%s\" for custom debuff \"%s\". Adjust your settings under 'VuhDo Options > Debuffs > Custom'.";
-- 3.122
VUHDO_I18N_BOUQUET_STATUS_POWER_TANK_ONLY = "Statusbar: Power % (Tank Only)";
VUHDO_I18N_DEF_BOUQUET_BAR_MANA_TANK_ONLY = "Manabars: Power (Tank Only)";
local GetSpecialization = VUHDO_getSpecialization;
local GetNumGroupMembers = GetNumGroupMembers;
local twipe = table.wipe;
local tonumber = tonumber;
......@@ -84,7 +85,8 @@ local VUHDO_DEFAULT_PROFILES = {
},
["point"] = "TOPRIGHT",
["timer"] = true,
["isName"] = false,
["isName"] = false,
["isShowOnlyForFriendly"] = false,
["xAdjust"] = -2,
["max_num"] = 3,
["blacklistModi"] = "ALT-CTRL-SHIFT",
......@@ -2004,7 +2006,7 @@ end
--
local tSpec;
function VUHDO_getBestProfileAfterSpecChange()
tSpec = VUHDO_getSpecialization();
tSpec = GetSpecialization();
return VUHDO_getBestProfileForSpecAndSize(tSpec, VUHDO_GROUP_SIZE)
or VUHDO_getBestProfileForSpec(tSpec)
or VUHDO_getBestProfileForSize(VUHDO_GROUP_SIZE);
......@@ -2014,7 +2016,7 @@ end
--
function VUHDO_getBestProfileAfterSizeChange()
tSpec = VUHDO_getSpecialization();
tSpec = GetSpecialization();
return VUHDO_getBestProfileForSpecAndSize(tSpec, VUHDO_GROUP_SIZE)
or VUHDO_getBestProfileForSize(VUHDO_GROUP_SIZE)
or VUHDO_getBestProfileForSpec(tSpec);
......
......@@ -1141,3 +1141,8 @@ VUHDO_I18N_BLACKLIST_KEY_MODIFIES = "Ignore List Modifier Key";
VUHDO_I18N_NICKNAME = "Details!\nNickname"
VUHDO_I18N_DEBUFF_SHOW_ONLY_FOR_FRIENDLY_TEXT = "Show only\nfor friendly";
VUHDO_I18N_DEBUFF_SHOW_ONLY_FOR_FRIENDLY_TOOLTIP = "Shows debuffs only for friendly units";
VUHDO_I18N_SHOW_OVERSHIELD = "Show\nOvershield";
VUHDO_I18N_OVERSHIELD_BAR = "Overshield Bar";
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