Storyline

Storyline

1M Downloads

Display War Mode bonus

Ellypse opened this issue ยท 0 comments

commented

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>