View Single Post
11-19-23, 06:59 AM   #1
wisocko
A Murloc Raider
Join Date: Nov 2023
Posts: 6
C_TaskQuest.GetQuestTimeLeftMinutes

I'm trying to get expirations on certain world quests as soon as I log in. Any ideas why print() step 4 below is failing? If I wait for 10-15 sec and run lines 4-8 again from a function, it reports the minutes as expected. It also succeeds if I have been logged in for 10-15 sec and /reload. It only fails when first logging in. I have tried all of the RegisterEvent() options listed in the login sequence of the addon loading process.

Lua Code:
  1. local f=CreateFrame("Frame");
  2. f:RegisterEvent("PLAYER_LOGIN");
  3. f:SetScript("OnEvent",function(self,event,...)
  4.     print(1)
  5.     print(2,C_TaskQuest.GetQuestInfoByQuestID(65143))
  6.     print(3,GetTaskInfo(65143))
  7.     print(4,C_TaskQuest.GetQuestTimeLeftMinutes(65143))
  8.     print(5)
  9. end);

Last edited by wisocko : 11-19-23 at 07:02 AM.
  Reply With Quote