Commit c2a20ea1 authored by Ivaria's avatar Ivaria
Browse files

Check if GameTooltip is flagged forbidden before any interaction

parent 47d29904
......@@ -76,15 +76,19 @@ VuhDoMinimap = {
["OnEnter"] = function(self)
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
GameTooltip:AddLine("VuhDo");
GameTooltip:AddLine(VUHDO_I18N_MM_TOOLTIP, 0.8, 0.8, 0.8, 1);
GameTooltip:Show();
if not GameTooltip:IsForbidden() then
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
GameTooltip:AddLine("VuhDo");
GameTooltip:AddLine(VUHDO_I18N_MM_TOOLTIP, 0.8, 0.8, 0.8, 1);
GameTooltip:Show();
end
end,
["OnLeave"] = function(self)
GameTooltip:Hide()
if not GameTooltip:IsForbidden() then
GameTooltip:Hide()
end
end,
......
......@@ -402,11 +402,19 @@ function VUHDO_showDebuffTooltip(aDebuffIcon)
if not VUHDO_CONFIG["DEBUFF_TOOLTIP"] then return; end
tButton = aDebuffIcon:GetParent():GetParent():GetParent():GetParent();
GameTooltip:SetOwner(aDebuffIcon, "ANCHOR_RIGHT", 0, 0);
if not GameTooltip:IsForbidden() then
GameTooltip:SetOwner(aDebuffIcon, "ANCHOR_RIGHT", 0, 0);
end
if aDebuffIcon["debuffInfo"] then
if aDebuffIcon["isBuff"] then GameTooltip:SetUnitBuff(tButton["raidid"], aDebuffIcon["debuffInfo"]);
else GameTooltip:SetUnitDebuff(tButton["raidid"], aDebuffIcon["debuffInfo"]); end
if not GameTooltip:IsForbidden() then
if aDebuffIcon["isBuff"] then
GameTooltip:SetUnitBuff(tButton["raidid"], aDebuffIcon["debuffInfo"]);
else
GameTooltip:SetUnitDebuff(tButton["raidid"], aDebuffIcon["debuffInfo"]);
end
end
end
sDebuffIcon = aDebuffIcon;
end
......@@ -416,7 +424,10 @@ end
--
function VUHDO_hideDebuffTooltip()
sDebuffIcon = nil;
GameTooltip:Hide();
if not GameTooltip:IsForbidden() then
GameTooltip:Hide();
end
end
......
......@@ -115,9 +115,11 @@ function VUHDO_initFuBar()
VuhDo.name = "VuhDo";
tLibFuBarPlugin:OnEmbedInitialize(VuhDo, VuhDo);
function VuhDo:OnUpdateFuBarTooltip()
GameTooltip:AddLine("VuhDo");
GameTooltip:AddLine(VUHDO_I18N_BROKER_TOOLTIP_1);
GameTooltip:AddLine(VUHDO_I18N_BROKER_TOOLTIP_2);
if not GameTooltip:IsForbidden() then
GameTooltip:AddLine("VuhDo");
GameTooltip:AddLine(VUHDO_I18N_BROKER_TOOLTIP_1);
GameTooltip:AddLine(VUHDO_I18N_BROKER_TOOLTIP_2);
end
end
VuhDo:Show();
function VuhDo:OnFuBarClick(aButton)
......
......@@ -150,7 +150,9 @@ local function VUHDO_initTooltip()
VuhDoTooltip:SetPoint(tConfig["point"], "UIParent", tConfig["relativePoint"], tConfig["x"], tConfig["y"]);
elseif VUHDO_TOOLTIP_POS_STANDARD == tPos then
if (not VUHDO_CONFIG["STANDARD_TOOLTIP"]) then
GameTooltip:Hide();
if not GameTooltip:IsForbidden() then
GameTooltip:Hide();
end
end
VuhDoTooltip:SetPoint("BOTTOMRIGHT", "UIParent", "BOTTOMRIGHT", -CONTAINER_OFFSET_X - 13, CONTAINER_OFFSET_Y);
......@@ -352,9 +354,11 @@ function VUHDO_showTooltip(aButton)
end
if VUHDO_CONFIG["STANDARD_TOOLTIP"] then
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
GameTooltip:SetUnit(aButton:GetAttribute("unit"));
GameTooltip:Show();
if not GameTooltip:IsForbidden() then
GameTooltip_SetDefaultAnchor(GameTooltip, UIParent);
GameTooltip:SetUnit(aButton:GetAttribute("unit"));
GameTooltip:Show();
end
else
VUHDO_TT_UNIT = aButton:GetAttribute("unit");
VUHDO_TT_PANEL_NUM = tPanelNum;
......@@ -382,8 +386,13 @@ end
--
function VUHDO_hideTooltip()
if not VUHDO_IS_PANEL_CONFIG then
if VUHDO_CONFIG["STANDARD_TOOLTIP"] then GameTooltip:Hide();
else VuhDoTooltip:Hide(); end
if VUHDO_CONFIG["STANDARD_TOOLTIP"] then
if not GameTooltip:IsForbidden() then
GameTooltip:Hide();
end
else
VuhDoTooltip:Hide();
end
end
end
......
......@@ -22,6 +22,8 @@ Known issues:
Bugfixes:
-- Use full player name including realm for tell command
-- Check if GameTooltip is flagged forbidden before any interaction
-- Should fix taints related to Blizzard lock down in 7.2.5
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