EDIT:
Sharlikran made me aware of something I did not know.
Originally Posted by Sharlikran
...
Events always have an event code not shown in the ESO documentation that most authors know is present. Which is why that's there.
...
|
Originally Posted by Baertram
Originally Posted by Smugger21
...
Guess that would be helpful information in the documentation, but now I know this will sure help me out.
|
Good point, as we cannot change the API documentation Pxx.txt files I added that as bold info to the Wiki Event introduction page:
https://wiki.esoui.com/Events#Introduction
|
ORIGINAL POST:
I went to post in LibQuestData here:
https://esoui.com/downloads/info2625....html#comments
However the comment section is closed and I found and Error in the code:
In LibQuestData_Scan.lua on Line 178,
It Accepts 2 arguments, however the calling event only returns 1 value!
Here is the code:
Lua Code:
local function OnQuestCompleteDialog(eventCode, journalIndex)
--d("OnQuestCompleteDialog")
local numRewards = GetJournalQuestNumRewards(journalIndex)
if numRewards <= 0 then return end
reward = {}
for i = 1, numRewards do
local rewardType = GetJournalQuestRewardInfo(journalIndex, i)
table.insert(reward, rewardType)
end
end
EVENT_MANAGER:RegisterForEvent(lib.libName, EVENT_QUEST_COMPLETE_DIALOG, OnQuestCompleteDialog) -- Verified
It needs to be this:
Lua Code:
local function OnQuestCompleteDialog(journalIndex)
--d("OnQuestCompleteDialog")
local numRewards = GetJournalQuestNumRewards(journalIndex)
if numRewards <= 0 then return end
reward = {}
for i = 1, numRewards do
local rewardType = GetJournalQuestRewardInfo(journalIndex, i)
table.insert(reward, rewardType)
end
end
EVENT_MANAGER:RegisterForEvent(lib.libName, EVENT_QUEST_COMPLETE_DIALOG, OnQuestCompleteDialog) -- Verified
This is because the ESOUIDocumentation.txt posted by sirinsidiator here:
https://www.esoui.com/forums/showpos...14&postcount=1
States this as the event:
Code:
EVENT_QUEST_COMPLETE_DIALOG (*luaindex* _journalIndex_)
I posted an issue on the GitHub Page, just not sure why the comments are closed for this Addon though...