Total-RP / Storyline

A World of Warcraft add-on that improves the questing experience by replacing the default dialog frame by a more immersive frame with 3D models.
https://www.curseforge.com/wow/addons/storyline
14 stars 6 forks source link

Display War Mode bonus #47

Closed Ellypse closed 4 years ago

Ellypse commented 4 years ago

Starting in 8.3, the default quest UI will be showing War Mode. We should do that too.

-- warmode bonus
if C_QuestLog.QuestHasWarModeBonus(questID) and C_PvP.IsWarModeDesired() then
    rewardsFrame.WarModeBonusFrame.Count:SetFormattedText(PLUS_PERCENT_FORMAT, C_PvP.GetWarModeRewardBonus());
    AddRewardElement(rewardsFrame.WarModeBonusFrame);
end
    <Button name="WarModeBonusFrameTemplate" virtual="true">
        <Scripts>
            <OnLoad>
                self.Name:SetText(WAR_MODE_BONUS);
                self.Name:SetTextColor(GREEN_FONT_COLOR:GetRGB());
                self.Count:SetTextColor(GREEN_FONT_COLOR:GetRGB());
                SetItemButtonTexture(self, "Interface\\Icons\\UI_WARMODE");
            </OnLoad>
            <OnEnter>
                GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
                GameTooltip_SetTitle(GameTooltip, WAR_MODE_BONUS, NORMAL_FONT_COLOR);
                GameTooltip_AddColoredLine(GameTooltip, WAR_MODE_BONUS_QUEST, HIGHLIGHT_FONT_COLOR);
                GameTooltip:Show();
            </OnEnter>
            <OnLeave function="GameTooltip_Hide" />
        </Scripts>
    </Button>