Everything is now working well...almost. Since my hook runs after ShowBountyTooltip is done, I expected that it would be the last line and sometimes it is. But the last thing Blizzard function does is add the Reward and I guess it's a deferred call, so sometimes my line get added in the middle of the rewards like:
Rewards
You are now Friendly with the Champions of Azeroth (my text)
Radiant Azerite Fragment
I tried preloading the rewards (C_TaskQuest.RequestPreloadRewardData(questID)) but that didn't help. My hook is just:
Lua Code:
local msg = "stuff"
WorldMapTooltip:AddLine(msg);
WorldMapTooltip:Show();
The only thing I can think of is to Clear the tooltip and completely duplicate all of Blizzard's code, but that would be kind of awful, wouldn't it?