Mythic Dungeon Tools - MDT

Mythic Dungeon Tools - MDT

77M Downloads

When creating a note in WOTLK Version, it throws a error

JulianStiebler opened this issue ยท 1 comments

commented

When creating a Note, it throws a error.

3x: GetScale: ...erface/AddOns/MythicDungeonTools/Modules/Toolbar.lua:1123: attempt to index field 'NormalTexture' (a nil value)

25/02/24 09:21:55
MDT: 4.3.4.5
Client: 30403 enUS
Character: Prephalia-Everlook (Europe)
Out of combat
Zone: Kalimdor (1439)

Route:
!1bz3Qnmmmu4NOco(VyFBxPqVjRG71cstLlzZZEKA3192p5KaDmyKqsK058Dum0aNax68B4q(g9z3CDe2cUllL7nnmPvOKMwLuluwWVrkHooSFJuXSYwdV1OKCMUPosdDIQVojbPtboitxK8tprQ1CRWQ1gwRGtV)fYwROHXBmkgLQXQ(pKZ7yLS7leFVo1DVpuWAmdLPjmMpwcH5bR1UY5aEhx6nn6ZV693WN)2Z0w1UReVIP4HlpOa5GlJ4hJXRWzWDdd0H1ykU4JUjBFsz988BifstGZ7fO3pZnxr8GEUd99LqEvZX(aMZ4HOpv91xYPxQ9RrT9pAQRISc6YO3poqq(MIJrDGF(d
Stacktraces

TableToString:
[string "@Interface/AddOns/MythicDungeonTools/Modules/ErrorHandling.lua"]:282: in function DrawNote' [string "@Interface/AddOns/MythicDungeonTools/Wrath/core.lua"]:4086: in function <Interface/AddOns/MythicDungeonTools/Wrath/core.lua:4069> [string "=[C]"]: in function xpcall'
[string "@Interface/AddOns/MythicDungeonTools/Modules/ErrorHandling.lua"]:277: in function `DrawPresetObject'
[string "@Interface/AddOns/MythicDungeonTools/Wrath/core.lua"]:4062: in function <Interface/AddOns/MythicDungeonTools/Wrath/core.lua:4054>

commented

Related code:

function MDT:DrawNote(x, y, text, objectIndex)
  if not notePoolCollection then
    notePoolCollection = CreateFramePoolCollection()
    notePoolCollection:CreatePool("Button", MDT.main_frame.mapPanelFrame, "QuestPinTemplate")
  end
  local scale = MDT:GetScale()
  --setup
  local note = notePoolCollection:Acquire("QuestPinTemplate")
  -- FramePoolCollection_GetPoolKey is concatenating the sixth argument of CreatePool ("specialization").
  -- This naive approach is just using toString on any value, even nil, which results in "nil" as a string.
  -- Because of this our pool key is "QuestPinTemplatenil" instead of "QuestPinTemplate".
  note.noteIdx = notePoolCollection.pools.QuestPinTemplatenil.numActiveObjects
  note.objectIndex = objectIndex
  note:ClearAllPoints()
  note:SetPoint("CENTER", MDT.main_frame.mapPanelTile1, "TOPLEFT", x, y)
  note:SetSize(12 * scale, 12 * scale)
  note.NormalTexture:SetSize(15 * scale, 15 * scale)
  note.PushedTexture:SetSize(15 * scale, 15 * scale)
  note.HighlightTexture:SetSize(15 * scale, 15 * scale)
  note.Display.Icon:SetSize(16 * scale, 16 * scale)
  note.NormalTexture:SetTexture("Interface/WorldMap/UI-QuestPoi-NumberIcons")
  note.PushedTexture:SetTexture("Interface/WorldMap/UI-QuestPoi-NumberIcons")
  note.HighlightTexture:SetTexture("Interface/WorldMap/UI-QuestPoi-NumberIcons")
  note.Display.Icon:SetTexture("Interface/WorldMap/UI-QuestPoi-NumberIcons")
  note.NormalTexture:SetTexCoord(0.500, 0.625, 0.375, 0.5)
  note.PushedTexture:SetTexCoord(0.375, 0.500, 0.375, 0.5)
  note.HighlightTexture:SetTexCoord(0.625, 0.750, 0.375, 0.5)
  -- temporary fix for there not being enough textures in the atlas
  -- should copy and fix the atlas instead
  local idx = note.noteIdx % 25
  if idx == 0 then idx = 1 end
  note.Display.Icon:SetTexCoord(POIButton_CalculateNumericTexCoords(idx, 0))
  note.Display.Icon:Show()
  note.tooltipText = text or ""