Commit 28195443 authored by Ivaria's avatar Ivaria
Browse files

Initial support for LibClassicDurations and LibClassicHealComm

parent ba476fb7
......@@ -16,6 +16,15 @@ VUHDO_LibBase64 = LibStub:GetLibrary("LibBase64-1.0");
VUHDO_LibCustomGlow = LibStub("LibCustomGlow-1.0");
VUHDO_LibClassicHealComm = LibStub("LibClassicHealComm-1.0", true);
VUHDO_LibClassicDurations = LibStub("LibClassicDurations", true);
if VUHDO_LibClassicDurations then
VUHDO_LibClassicDurations:Register("VuhDo");
UnitAura = VUHDO_LibClassicDurations.UnitAuraWrapper;
end
VUHDO_LibSharedMedia:Register("font", "Arial Black", "Interface\\AddOns\\VuhDo\\Fonts\\ariblk.ttf");
VUHDO_LibSharedMedia:Register("font", "Emblem", "Interface\\AddOns\\VuhDo\\Fonts\\Emblem.ttf");
VUHDO_LibSharedMedia:Register("font", "Vixar", "Interface\\AddOns\\VuhDo\\Fonts\\vixar.ttf");
......
......@@ -824,7 +824,7 @@ end
--
local function VUHDO_hasSummonIconValidator(anInfo, _)
if C_IncomingSummon.HasIncomingSummon(anInfo["unit"]) then
if VUHDO_hasIncomingSummon(anInfo["unit"]) then
local status = C_IncomingSummon.IncomingSummonStatus(anInfo["unit"]);
if (status == Enum.SummonStatus.Pending) then
......
......@@ -1556,6 +1556,15 @@ function VUHDO_OnLoad(anInstance)
VUHDO_ALL_EVENTS = nil;
if VUHDO_LibClassicHealComm then
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_HealStarted", "HealComm_HealUpdated");
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_HealStopped");
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_HealDelayed", "HealComm_HealUpdated");
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_HealUpdated");
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_ModifierChanged");
VUHDO_LibClassicHealComm.RegisterCallback(anInstance, "HealComm_GUIDDisappeared");
end
SLASH_VUHDO1 = "/vuhdo";
SLASH_VUHDO2 = "/vd";
SlashCmdList["VUHDO"] = function(aMessage)
......
......@@ -1049,7 +1049,13 @@ end
function VUHDO_unitGetIncomingHeals(...)
if not UnitGetIncomingHeals then
return 0;
if VUHDO_LibClassicHealComm then
local targetGUID = UnitGUID(...);
return (VUHDO_LibClassicHealComm:GetHealAmount(targetGUID, VUHDO_LibClassicHealComm.ALL_HEALS) or 0) * (VUHDO_LibClassicHealComm:GetHealModifier(targetGUID) or 1);
else
return 0;
end
else
return UnitGetIncomingHeals(...);
end
......
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