Lua Code:
function WorldQuestPinMixin:OnMouseEnter()
WorldMap_HijackTooltip(self:GetMap());
TaskPOI_OnEnter(self);
end
Lua Code:
function WorldMap_HijackTooltip(owner)
WorldMapTooltip:SetParent(owner);
WorldMapTooltip:SetFrameStrata("TOOLTIP");
for i, tooltip in ipairs(WorldMapTooltip.ItemTooltip.Tooltip.shoppingTooltips) do
tooltip:SetParent(owner);
tooltip:SetFrameStrata("TOOLTIP");
end
end
Lua Code:
function TaskPOI_OnEnter(self)
WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT");
if ( not HaveQuestData(self.questID) ) then
WorldMapTooltip:SetText(RETRIEVING_DATA, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b);
WorldMapTooltip:Show();
return;
end
local title, factionID, capped = C_TaskQuest.GetQuestInfoByQuestID(self.questID);
if ( self.worldQuest ) then
local tagID, tagName, worldQuestType, rarity, isElite, tradeskillLineIndex = GetQuestTagInfo(self.questID);
local color = WORLD_QUEST_QUALITY_COLORS[rarity];
WorldMapTooltip:SetText(title, color.r, color.g, color.b);
QuestUtils_AddQuestTypeToTooltip(WorldMapTooltip, self.questID, NORMAL_FONT_COLOR);
if ( factionID ) then
local factionName = GetFactionInfoByID(factionID);
if ( factionName ) then
if (capped) then
WorldMapTooltip:AddLine(factionName, GRAY_FONT_COLOR:GetRGB());
else
WorldMapTooltip:AddLine(factionName);
end
end
end
WorldMap_AddQuestTimeToTooltip(self.questID);
else
WorldMapTooltip:SetText(title);
end
for objectiveIndex = 1, self.numObjectives do
local objectiveText, objectiveType, finished = GetQuestObjectiveInfo(self.questID, objectiveIndex, false);
if ( objectiveText and #objectiveText > 0 ) then
local color = finished and GRAY_FONT_COLOR or HIGHLIGHT_FONT_COLOR;
WorldMapTooltip:AddLine(QUEST_DASH .. objectiveText, color.r, color.g, color.b, true);
end
end
local percent = C_TaskQuest.GetQuestProgressBarInfo(self.questID);
if ( percent ) then
GameTooltip_InsertFrame(WorldMapTooltip, WorldMapTaskTooltipStatusBar);
WorldMapTaskTooltipStatusBar.Bar:SetValue(percent);
WorldMapTaskTooltipStatusBar.Bar.Label:SetFormattedText(PERCENTAGE_STRING, percent);
end
WorldMap_AddQuestRewardsToTooltip(self.questID);
if ( self.worldQuest and WorldMapTooltip.AddDebugWorldQuestInfo ) then
WorldMapTooltip:AddDebugWorldQuestInfo(self.questID);
end
WorldMapTooltip:Show();
WorldMapTooltip.recalculatePadding = true;
end
Lua Code:
-- from WorldMapTooltip in WorldMapFrame.xml
<OnUpdate>
if ( self.recalculatePadding ) then
self.recalculatePadding = nil;
WorldMapTooltip_CalculatePadding();
end
self.updateTooltip = (self.updateTooltip or TOOLTIP_UPDATE_TIME) - elapsed;
if ( self.updateTooltip > 0 ) then
return;
end
self.updateTooltip = TOOLTIP_UPDATE_TIME;
local owner = self:GetOwner();
if ( owner and owner.UpdateTooltip ) then
owner:UpdateTooltip();
end
</OnUpdate>
All this stuff is running every 0.2 seconds on your game client, so I'm not surprised it causes your FPS to drop.