ClassicCodex

ClassicCodex

435k Downloads

1.3.2 nameplateIcon option seems to have no effect

Road-block opened this issue ยท 3 comments

commented

After updating no matter what I set the option to, I see quest icon on top of enemy nameplates.

commented

nameplate frames are re-used.. is it possible that icons added to a previous nameplate show up? I still don't know why they would ignore the option though.

commented

will check it in CodexQuest:UpdateAllNameplates():

function CodexQuest:UpdateAllNameplates()
    for i = 1, 40 do
        local unitID = "nameplate" .. i
        -- Notice: nameplate IDs are not continuous, don't use break
        if UnitExists(unitID) then
            if CodexConfig.nameplateIcon then
                CodexQuest:UpdateNameplate(unitID)
            else
                CodexQuest:HideNameplate(unitID)
            end
        end
    end
end
commented

Found it. It's CodexQuest:UpdateAllNameplates() that's at fault, it doesn't check the option so it ends up "polluting" all nameplates with codexIcon:Show()

Either that method needs the check added or for it to be moved inside CodexQuest:UpdateNameplate() so it works no matter where that is called from.