fix(learner): guard HasQuestReferences against flat-number entries on Area 52
Some Area 52 quest records store qData[2][3] as a flat number instead of a table-of-tables. The inner loop's entry[1] index then crashes with 'attempt to index local entry (a number value)'. Normalize with a type check before comparing.
This commit is contained in:
@@ -2212,7 +2212,8 @@ local function HasQuestReferences(itemId)
|
||||
end
|
||||
if qData[2] and qData[2][3] then
|
||||
for _, entry in ipairs(qData[2][3]) do
|
||||
if entry[1] == itemId then
|
||||
local entryId = type(entry) == "table" and entry[1] or entry
|
||||
if entryId == itemId then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user