Commit 5edff430 authored by Ivaria's avatar Ivaria
Browse files

Workaround for Antoran High Command vehicles, see known issues

parent 895d4c31
......@@ -441,8 +441,12 @@ function VUHDO_updateHealth(aUnit, aMode)
tOwner = VUHDO_RAID[aUnit]["ownerUnit"];
-- tOwner may not be present when leaving a vehicle
if VUHDO_RAID[tOwner] and VUHDO_RAID[tOwner]["isVehicle"] then
VUHDO_setHealth(tOwner, aMode);
VUHDO_updateHealthBarsFor(tOwner, aMode);
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--VUHDO_setHealth(tOwner, aMode);
--VUHDO_updateHealthBarsFor(tOwner, aMode);
VUHDO_setHealth(aUnit, aMode);
VUHDO_updateHealthBarsFor(aUnit, aMode);
end
end
......
......@@ -307,9 +307,11 @@ function VUHDO_getDisplayUnit(aButton)
return VUHDO_CUSTOM_INFO["fixResolveId"], VUHDO_RAID[VUHDO_CUSTOM_INFO["fixResolveId"]];
end
else
if VUHDO_RAID[tUnit] and VUHDO_RAID[tUnit]["isVehicle"] then
tUnit = VUHDO_RAID[tUnit]["petUnit"];
end
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if VUHDO_RAID[tUnit] and VUHDO_RAID[tUnit]["isVehicle"] then
-- tUnit = VUHDO_RAID[tUnit]["petUnit"];
--end
return tUnit, VUHDO_RAID[tUnit];
end
end
......@@ -382,6 +384,7 @@ function VUHDO_customizeText(aButton, aMode, anIsTarget)
tOwnerInfo = VUHDO_RAID[tInfo["ownerUnit"]];
tIndex = tInfo["name"] .. (tInfo["ownerUnit"] or "") .. tPanelNum;
if not VUHDO_NAME_TEXTS[tIndex] then
if tSetup["ID_TEXT"]["showName"] then
......@@ -411,9 +414,15 @@ function VUHDO_customizeText(aButton, aMode, anIsTarget)
-- Add title flags
if tSetup["ID_TEXT"]["showTags"] and not anIsTarget then
if "focus" == tUnit then tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_FOC, tTextString);
elseif "target" == tUnit then tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_TAR, tTextString);
elseif tOwnerInfo and tOwnerInfo["isVehicle"] then tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_VEHICLE, tTextString); end
if "focus" == tUnit then
tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_FOC, tTextString);
elseif "target" == tUnit then
tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_TAR, tTextString);
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--elseif tOwnerInfo and tOwnerInfo["isVehicle"] then
-- tTextString = format("|cffff0000%s|r-%s", VUHDO_I18N_VEHICLE, tTextString);
end
end
end
......
......@@ -501,11 +501,13 @@ local tSpellId, tDebuffOffset;
local tNow;
local tFilter;
local function VUHDO_updateHots(aUnit, anInfo)
if anInfo["isVehicle"] then
VUHDO_removeHots(aUnit);
aUnit = anInfo["petUnit"];
if not aUnit then return; end-- bei z.B. focus/target
end
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if anInfo["isVehicle"] then
-- VUHDO_removeHots(aUnit);
-- aUnit = anInfo["petUnit"];
-- if not aUnit then return; end-- bei z.B. focus/target
--end
if not VUHDO_MY_HOTS[aUnit] then VUHDO_MY_HOTS[aUnit] = { }; end
if not VUHDO_OTHER_HOTS[aUnit] then VUHDO_OTHER_HOTS[aUnit] = { }; end
......
......@@ -43,13 +43,15 @@ local tPowerType;
function VUHDO_updateManaBars(aUnit, aChange)
tInfo = VUHDO_RAID[aUnit];
if (tInfo["isVehicle"]) then
aUnit = tInfo["petUnit"];
if not aUnit then return; end
tInfo = VUHDO_RAID[aUnit];
if not tInfo then return; end
end
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if (tInfo["isVehicle"]) then
-- aUnit = tInfo["petUnit"];
-- if not aUnit then return; end
--
-- tInfo = VUHDO_RAID[aUnit];
-- if not tInfo then return; end
--end
if not VUHDO_isConfigDemoUsers() then
if 1 == aChange then
......
......@@ -348,22 +348,26 @@ end
--
local function VUHDO_playerTargetValidator(anInfo, _)
if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
return anInfo["ownerUnit"] == VUHDO_getCurrentPlayerTarget(), nil, -1, -1, -1;
else
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
-- return anInfo["ownerUnit"] == VUHDO_getCurrentPlayerTarget(), nil, -1, -1, -1;
--else
return anInfo["unit"] == VUHDO_getCurrentPlayerTarget(), nil, -1, -1, -1;
end
--end
end
--
local function VUHDO_playerFocusValidator(anInfo, _)
if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
return anInfo["ownerUnit"] == VUHDO_getCurrentPlayerFocus(), nil, -1, -1, -1;
else
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
-- return anInfo["ownerUnit"] == VUHDO_getCurrentPlayerFocus(), nil, -1, -1, -1;
--else
return anInfo["unit"] == VUHDO_getCurrentPlayerFocus(), nil, -1, -1, -1;
end
--end
end
......@@ -371,11 +375,13 @@ end
--
local function VUHDO_mouseOverTargetValidator(anInfo, _)
if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
return anInfo["ownerUnit"] == VUHDO_getCurrentMouseOver(), nil, -1, -1, -1;
else
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if anInfo["isPet"] and (VUHDO_RAID[anInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
-- return anInfo["ownerUnit"] == VUHDO_getCurrentMouseOver(), nil, -1, -1, -1;
--else
return anInfo["unit"] == VUHDO_getCurrentMouseOver(), nil, -1, -1, -1;
end
--end
end
......
......@@ -218,7 +218,10 @@ local tEmptyInfo = { };
local function VUHDO_evaluateBouquet(aUnit, aBouquetName, anInfo)
tUnit = (VUHDO_RAID[aUnit] or tEmptyInfo)["isVehicle"] and VUHDO_RAID[aUnit]["petUnit"] or aUnit;
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--tUnit = (VUHDO_RAID[aUnit] or tEmptyInfo)["isVehicle"] and VUHDO_RAID[aUnit]["petUnit"] or aUnit;
tUnit = aUnit;
tInfo = anInfo or VUHDO_RAID[tUnit];
if not tInfo then
......
......@@ -84,11 +84,13 @@ function VUHDO_clParserSetCurrentFocus()
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
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or {})["isVehicle"] then
-- sCurrentFocus = tInfo["ownerUnit"];
--else
sCurrentFocus = tUnit;
end
--end
break;
end
end
......
......@@ -386,6 +386,8 @@ local function VUHDO_generateRaidMacroTemplate(anAction, anIsKeyboard, aTarget,
else
tVehicleCond = "";
end
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
tText = tText .. tCastText .. "[" .. tModiSpell .. "nounithasvehicleui,@vuhdo]" .. tVehicleCond .. " " .. anAction .. "\n";
tText = tText .. tSpellPost;
if aPet then
......
......@@ -44,11 +44,13 @@ function VUHDO_updatePlayerTarget()
tTargetUnit = nil;
for tUnit, tInfo in pairs(VUHDO_RAID) do
if UnitIsUnit("target", tUnit) and tUnit ~= "focus" and tUnit ~= "target" and not VUHDO_isBossUnit(tUnit) then
if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
tTargetUnit = tInfo["ownerUnit"];
else
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--if tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or tEmptyInfo)["isVehicle"] then
-- tTargetUnit = tInfo["ownerUnit"];
--else
tTargetUnit = tUnit;
end
--end
break;
end
end
......
......@@ -552,9 +552,12 @@ end
--
local tInfo;
function VUHDO_resolveVehicleUnit(aUnit)
tInfo = VUHDO_RAID[aUnit] or sEmpty;
return tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or sEmpty)["isVehicle"]
and tInfo["ownerUnit"] or aUnit;
-- Blizzard has broken the way vehicles work for the Antoran High Command encounter
-- For now just disable vehicle support (note: this breaks encounters like Malygos)
--tInfo = VUHDO_RAID[aUnit] or sEmpty;
--return tInfo["isPet"] and (VUHDO_RAID[tInfo["ownerUnit"]] or sEmpty)["isVehicle"]
-- and tInfo["ownerUnit"] or aUnit;
return aUnit;
end
......
......@@ -11,11 +11,16 @@ Known issues:
-- 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
-- Blizzard has changed the way vehicles work for Antoran High Command
-- For now I've just disabled the proper vehicle support
-- Targeting a player in vehicle will still targe the vehicle unit
-- However, mouseover/click-to-heal should work properly
-- Healing actual vehicles (e.g. Ulduar) is now broken though
Bugfixes:
-- Fixed saving/loading of per profile Spell Trace settings
-- Workaround for Antoran High Command vehicles, see known issues
Improvements:
......
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