View Single Post
01/08/16, 11:40 AM   #7
dominoid
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 34
Argh. Using MailR as an example, which apparently may not be the best case, I put this at the top:

Lua Code:
  1. local GetJournalQuestInfo_Orig = GetJournalQuestInfo

Assigned the following in my intialization:

Lua Code:
  1. GetJournalQuestInfo = QuestMaker.GetJournalQuestInfo

And created this:

Lua Code:
  1. function QuestMaker:GetJournalQuestInfo(questIndex)
  2.  
  3.         local questName, bgText, stepText, stepType, stepOverrideText, completed, tracked, _, _, _, instanceDisplayType = GetJournalQuestInfo_Orig(questIndex)
  4.         return questName, bgText, stepText, stepType, stepOverrideText, completed, tracked, _, _, _, instanceDisplayType
  5.  
  6. end

Which to my limited knowledge should simply run the original GetJournalQuestInfo, but questIndex is coming in nil. I got it to not come in nil once by accident, made some changes, and can't get it back. What am I missing? The plan would be to check the quest index number and if it's a custom quest pass back custom quest info, but if it's a vanilla quest to use the vanilla function as coded above.

Thank again.

Last edited by dominoid : 01/08/16 at 11:43 AM.
  Reply With Quote