[BUG] Lua error with target markers in TWW pre-patch
mbattersby opened this issue · 3 comments
Issue description:
Setting a target marker in raid with show target markers enabled causes a lua error (see end)
This call seems to return 4 values not a table (shown here fixed)
-- Get the texture coordinates for the marker
local left, right, top, bottom = _G["UnitPopupRaidTarget" .. index .. "ButtonMixin"]:GetTextureCoords()
-- Set the marker texture using trilinear filtering (reduces pixelation)
frame.ERF_targetMarkerFrame:SetTexture(texture, nil, nil, "TRILINEAR")
-- Set the texture coordinates to the correct icon of the larger texture
frame.ERF_targetMarkerFrame:SetTexCoord(left, right, top, bottom)
How to reproduce:
Set target marker in raid.
Technical info:
- Addon Version: 3.13.6
- Client: Retail
- Client Patch Version: 11.0.0
Additional context:
Add any other context about the problem here.
Screenshots:
If applicable, add screenshots to help explain your problem.
Lua error log:
Message: .../AddOns/EnhancedRaidFrames/Modules/TargetMarkers.lua:106: attempt to index local 'coords' (a number value)
Time: Wed Jul 24 20:11:11 2024
Count: 2
Stack: .../AddOns/EnhancedRaidFrames/Modules/TargetMarkers.lua:106: attempt to index local 'coords' (a number value)
[string "@Interface/AddOns/EnhancedRaidFrames/Modules/TargetMarkers.lua"]:106: in function `UpdateTargetMarker'
[string "@Interface/AddOns/EnhancedRaidFrames/Modules/TargetMarkers.lua"]:123: in function `func'
[string "@Interface/AddOns/Blizzard_UnitFrame/Mainline/CompactRaidGroup.lua"]:29: in function `CompactRaidGroup_ApplyFunctionToAllFrames'
[string "@Interface/AddOns/Blizzard_UnitFrame/Mainline/CompactPartyFrame.lua"]:40: in function `applyFunc'
[string "@Interface/AddOns/Blizzard_CompactRaidFrames/Blizzard_CompactRaidFrameContainer.lua"]:130: in function `ApplyToFrames'
[string "@Interface/AddOns/EnhancedRaidFrames/Modules/TargetMarkers.lua"]:122: in function `UpdateAllTargetMarkers'
[string "@Interface/AddOns/EnhancedRaidFrames/EnhancedRaidFrames.lua"]:72: in function <...ace/AddOns/EnhancedRaidFrames/EnhancedRaidFrames.lua:71>
[string "=[C]"]: ?
[string "@Interface/AddOns/DialogKey/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:19: in function <...Key/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@Interface/AddOns/DialogKey/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:54: in function `Fire'
[string "@Interface/AddOns/EnhancedRaidFrames/Libs/AceEvent-3.0/AceEvent-3.0.lua"]:120: in function <...nhancedRaidFrames/Libs/AceEvent-3.0/AceEvent-3.0.lua:119>
Locals: self = <table> {
iconCache = <table> {
}
modules = <table> {
}
allAuras = " dispel chi harmony renewing mist reversion prescience "
baseName = "EnhancedRaidFrames"
defaultModuleState = true
hooks = <table> {
}
db = <table> {
}
enabledState = true
YELLOW_COLOR = <table> {
}
POSITIONS = <table> {
}
auraStrings = <table> {
}
WHITE_COLOR = <table> {
}
PURPLE_COLOR = <table> {
}
defaultModuleLibraries = <table> {
}
BROWN_COLOR = <table> {
}
name = "EnhancedRaidFrames"
orderedModules = <table> {
Thanks for the report! I guess Blizz decided to change how it stores these raid icons. I'll get this fixed asap
New release is on its way. I had to fix this in such a way to retain the previous "packed" table functionality for Classic and Classic_Era. This new version should be compatible with all three clients though.