-- 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 -- Blizzard_TrainerUI.xml sizes ClassTrainerDetailScrollFrame 135 high from 288 below the frame's -- top, so it ends at 423 while the bottom strip of money and buttons starts at 409 (the Train -- button, 22 high, centred at 420): a description long enough to scroll ran over the strip. It -- ends 3 above the strip; its scroll bar follows its height. local TRAINER_DETAIL_HEIGHT = 118 local function fitTrainerDetail() if ClassTrainerDetailScrollFrame then ClassTrainerDetailScrollFrame:SetHeight(TRAINER_DETAIL_HEIGHT) end end local trainerWatcher = CreateFrame("Frame") trainerWatcher:RegisterEvent("ADDON_LOADED") trainerWatcher:SetScript("OnEvent", function() if arg1 == "Blizzard_TrainerUI" then fitTrainerDetail() end end) fitTrainerDetail()