Back to Home

ESO Lua File v101050

ingame/veterancy/gamepad/veterancy_tooltips.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function ZO_Tooltip:LayoutVeterancyPerkTooltip(veterancyPerkData)
    if veterancyPerkData then
        local veterancyRankPerkRewardData = veterancyPerkData:GetVeterancyRankPerkRewardData()
        local perkSlotSection = self:AcquireSection(self:GetStyle("bodyHeader"))
        local slotFlags = veterancyRankPerkRewardData:GetSlotFlags()
        for slot in ZO_FlagHelpers.FlagIterator(VENGEANCE_PERK_SLOT_RED, VENGEANCE_PERK_SLOT_BLUE) do
            if ZO_FlagHelpers.MaskHasFlag(slotFlags, slot) then
                local perkSlotText = ZO_VENGEANCE_MANAGER:GetPerkColorBySlot(slot):Colorize(zo_strformat(SI_CAMPAIGN_VENGEANCE_PERKS_SLOT, ZO_VENGEANCE_MANAGER:GetPerkSlotName(slot)))
                perkSlotSection:AddLine(perkSlotText)
            end
        end
        self:AddSection(perkSlotSection)
        local titleTextSection = self:AcquireSection(self:GetStyle("title"))
        titleTextSection:AddLine(veterancyPerkData:GetFormattedName())
        self:AddSection(titleTextSection)
        local descriptionSection = self:AcquireSection(self:GetStyle("bodySection"))
        descriptionSection:AddLine(GetVengeancePerkTooltipText(veterancyPerkData:GetRewardId()), self:GetStyle("bodyDescription"))
        self:AddSection(descriptionSection)
    end
end