-- Fixes to stock 1.12 Lua that MoonWell needs in both styles. -- PaperDollStatTooltip (PaperDollFrame.lua) builds the class line's string name from -- UnitClass(unit)'s token with strupper. A unit whose class byte has no ChrClasses row answers -- two nils (UnitClass, 0x518350): the server's demons do, so the pet page's stats raised -- "bad argument #1 to `strupper'". Such a unit gets the default line, the stock fallback. local stockStatTooltip = PaperDollStatTooltip function PaperDollStatTooltip(unit, stat) local _, token = UnitClass(unit or "player") if token then return stockStatTooltip(unit, stat) end GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(this.tooltip) GameTooltip:AddLine(getglobal("DEFAULT_" .. stat .. "_TOOLTIP"), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1) GameTooltip:Show() end