The best way I can think of to populate the completed list is to declare a variable firstrun = 1 then run a function on
EVENT_PLAYER_ACTIVATED (or maybe EVENT_ADDON_LOADED):
if firstrun == 1 then
blabla loop over quests to populate table
firstrun = 0
end
Then you can easily add entries with EVENT_QUEST_COMPLETED.
I guess you would want the table to be alphabetized? So might have to have a separate function that is called to realphabetize the list, but if you figure out how to break them into categories you could make an efficient function that only reorders the quests under that zone category on quest completion.
|