Quantcast
WoWInterface - View Single Post - AlertFrame identified by numbers?
View Single Post
12-05-20, 12:53 PM   #3
LudiusMaximus
A Frostmaul Preserver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 280
All right, thanks! I was afraid so... :-)

I already looked in the Blizzard code and found AlertFrameSystems.lua to be most promising.
It includes this function:
Code:
function WorldQuestCompleteAlertFrame_SetUp(frame, questData)
  PlaySound(SOUNDKIT.UI_WORLDQUEST_COMPLETE);

  frame.questID = questData.questID;
  frame.QuestName:SetText(questData.taskName);

  frame.QuestTexture:SetTexture(questData.icon);

  frame.ToastText:SetText(questData.displayAsObjective and TOAST_OBJECTIVE_COMPLETE or WORLD_QUEST_COMPLETE);

  ResetRewardFrames(frame);

  if questData.money > 0 then
    local rewardFrame = GetRewardFrame(frame, "WorldQuestFrameRewardTemplate");
    DungeonCompletionAlertFrameReward_SetRewardMoney(rewardFrame, questData.money);
  end

  if questData.xp > 0 and not IsPlayerAtEffectiveMaxLevel() then
    local rewardFrame = GetRewardFrame(frame, "WorldQuestFrameRewardTemplate");
    DungeonCompletionAlertFrameReward_SetRewardXP(rewardFrame, questData.xp);
  end

  if questData.currencyRewards then
    for currencyIndex, currencyTexture in ipairs(questData.currencyRewards) do
      local rewardFrame = GetRewardFrame(frame, "WorldQuestFrameRewardTemplate");
      SetPortraitToTexture(rewardFrame.texture, currencyTexture);
      rewardFrame.currencyIndex = currencyIndex;
    end
  end

  StandardRewardAlertFrame_AdjustRewardAnchors(frame);
end

So I tried to hook it:
Code:
hooksecurefunc("WorldQuestCompleteAlertFrame_SetUp", function(...)
  print("WorldQuestCompleteAlertFrame_SetUp", ...)
end)

But I never see the print of my hook...

Am I missing something?
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote