Syling Tracker

Syling Tracker

28.6k Downloads

[Cata Classic] tag error v2.5.0

Road-block opened this issue ยท 6 comments

commented

Describe the bug
A clear and concise description of what the bug is.

Do you have an error log of what happened?
If you don't see any errors, make sure that error reporting is enabled (/console scriptErrors 1) or install BugSack.

3x ...ylingTracker/Cataclysm/Contents/Quests/QuestView.lua:234: attempt to index field 'tag' (a number value)
[string "@Scorpio/Modules/Core.lua"]:400: in function <Scorpio/Modules/Core.lua:198>
[string "=(tail call)"]: ?

Locals:
now = 93143.550000
r_Header = <table> {
 1 = <no value>
 -1 = 2
}
runoutIdx = nil
(for index) = 1
(for limit) = 1
(for step) = 1
i = 1
task = <no value>
ok = false
msg = "...ylingTracker/Cataclysm/Contents/Quests/QuestView.lua:234: attempt to index field 'tag' (a number value)"
queueTaskList = <function> defined @Scorpio/Modules/Core.lua:187
_CancelSingleAsync = <table> {
}
_RunSingleAsync = <table> {
  = <table> {
 }
}
_SingleAsync = <table> {
 F9F2CC91-097D-EEB9-459B-6983037BEADA = false
 FEBCC64E-8359-DD8F-BD7C-5F40458C6095 = false
 017DDD99-8AF6-1CC9-B26C-F3E485F79813 = false
 D08ED622-C4B1-CC69-EE4F-DD5230320E9A = false
 814AB0E2-8AAD-B677-7126-A763B169CEDD = false
 83F14929-E379-DDFD-1AC7-555B6EE19290 = false
}
_ResidentService = <table> {
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
  = <function> defined @Scorpio/Modules/Core.lua:621
}
recycleCache = <function> defined @Scorpio/Modules/Core.lua:100
processPhase = <function> defined @Scorpio/Modules/Core.lua:198

To Reproduce
Steps to reproduce the behavior:
I didn't do anything special.
Entered ZG, picked up some quests
Auto-tracking is enabled so they got tracked.
Somewhere in that process I got spammed with the error.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

What is the version of SylingTracker you use ?
2.5.0 (cataclysm package)

What are the versions of PLoop and Scorpio you use ?

  • PLoop: 'Put the version here'
  • Scorpio: 'Put the version here'
    Whatever was pulled as a required dependency by Curseforge app
    r220 from what I can see.

Additional context
Add any other context about the problem here.

commented

One way to fix the breaking error (not the only one, maybe not even the best one, but this is enough to illustrate)

  1. Cataclysm/Contents/Quests/Quests.lua#L137 changed to
local tagID, tagName = GetQuestTagInfo(questID)
  1. The block at /Cataclysm/Contents/Quests/Quests.lua#L143 to 151 changed to
if tagID then
  if tagID == EQuestTag.Dungeon then
    isDungeon = true 
  elseif tagID == EQuestTag.Legendary then
    isLegendary = true 
  elseif tagID == EQuestTag.Raid or tagID == EQuestTag.Raid10 or tagID == EQuestTag.Raid25 then
    isRaid = true 
  end
end
  1. Finally /Cataclysm/Contents/Quests/Quests.lua#L185 changed to
questData.tag = {tagID=tagID,tagName=tagName}

This will stop the tracker breaking before it finishes drawing.

commented

With the changes above the tracker works but Scorpio complains that QUEST_TAG_ATLAS does not exist.

It's not lying .. there's no such global in Cataclysm Classic live (4.4.0)

commented

Ah I see what's the problem.
_G.GetQuestTagInfo (the Cataclysm version of the API) returns a tuple.
C_QuestLog.GetQuestTagInfo (the mainline version) returns an array.

There's no code to massage the data and make them conform between the two versions.

commented

Adding this to /Cataclysm/Contents/Quests/QuestView.lua#L22 exports "solves" that last issue.

  -- Wow API & Utils
  QUEST_TAG_ATLAS                       = _G.QUEST_TAG_ATLAS or {
    ["COMPLETED"] = "questlog-questtypeicon-quest",
    ["COMPLETED_LEGENDARY"] = "questlog-questtypeicon-legendaryturnin",
    ["DAILY"] = "questlog-questtypeicon-daily",
    ["WEEKLY"] = "questlog-questtypeicon-weekly",
    ["FAILED"] = "questlog-questtypeicon-questfailed",
    ["STORY"] = "questlog-questtypeicon-story",
    ["ALLIANCE"] = "questlog-questtypeicon-alliance",
    ["HORDE"] = "questlog-questtypeicon-horde",
    ["EXPIRING_SOON"] = "questlog-questtypeicon-expiringsoon",
    ["EXPIRING"] = "questlog-questtypeicon-expiring",
    [_G.Enum.QuestTag.Dungeon] = "questlog-questtypeicon-dungeon",
    [_G.Enum.QuestTag.Scenario] = "questlog-questtypeicon-scenario",
    [_G.Enum.QuestTag.Group] = "questlog-questtypeicon-group",
    [_G.Enum.QuestTag.PvP] = "questlog-questtypeicon-pvp",
    [_G.Enum.QuestTag.Heroic] = "questlog-questtypeicon-heroic",
    -- same texture for all raids
    [_G.Enum.QuestTag.Raid] = "questlog-questtypeicon-raid",
    [_G.Enum.QuestTag.Raid10] = "questlog-questtypeicon-raid",
    [_G.Enum.QuestTag.Raid25] = "questlog-questtypeicon-raid",
  },
commented

Hello,

Thank you for the very detailed posts.

Indeed, i had forgotten that QUEST_TAG_ATLAS is a fairly recent constant. Before that, QUEST_TAG_TCOORDS was used. I updated it, and everything should work in version 2.5.1

commented

Curseforge is having a bad day so this didn't syndicate but I tested the 2.5.1 tag and it's indeed fixed, this can be closed.