Fix false-positive 'broken quest log' error on WotLK servers
GetQuestObjectives returns nil for quests with no trackable objectives on WotLK private servers. The original code set hasInvalidObjective=true but left isQuestLogGood=true, causing goodQuestsCount to stay 0 while numQuests was 19 -> 'Good quest: 0/19' error on every login/reload. Treat a non-table return as an empty valid objective list. Demote the Questie:Error to Questie:Debug so it doesn't spam chat.
This commit is contained in:
@@ -92,10 +92,10 @@ local function OnQuestLogUpdate()
|
|||||||
local objectiveList = GetQuestObjectives(questId, i)
|
local objectiveList = GetQuestObjectives(questId, i)
|
||||||
|
|
||||||
if type(objectiveList) ~= "table" then
|
if type(objectiveList) ~= "table" then
|
||||||
-- I couldn't find yet a quest returning nil like older code suggested for example for quest 2744, which isn't true.
|
-- On WotLK private servers, GetQuestObjectives can return nil for quests with
|
||||||
-- I guess older code queried data before HaveQuestData() was true.
|
-- no trackable objectives. This is not a broken cache state; treat it as an
|
||||||
Questie:Error("REPORT THIS ERROR! Quest objectives aren't a table. This may stop Questie from loading. questId =", questId)
|
-- empty (valid) objective list so goodQuestsCount increments correctly.
|
||||||
hasInvalidObjective = true
|
Questie:Debug(Questie.DEBUG_DEVELOP, "[QuestieValidateGameCache] GetQuestObjectives returned non-table for questId:", questId, "- treating as empty objectives")
|
||||||
objectiveList = {}
|
objectiveList = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user