Commit 25394df4 authored by TOM_RUS's avatar TOM_RUS

WOW-33369patch8.3.0_PTR

parent 68d6bb2f
......@@ -296,6 +296,21 @@ local QuestLog =
{ Name = "isThreat", Type = "bool", Nilable = false },
},
},
{
Name = "QuestCanHaveWarModeBonus",
Type = "Function",
Documentation = { "Tests whether a quest is eligible for warmode bonuses (e.g. most world quests, some daily quests" },
Arguments =
{
{ Name = "questID", Type = "number", Nilable = false },
},
Returns =
{
{ Name = "hasBonus", Type = "bool", Nilable = false },
},
},
{
Name = "QuestHasQuestSessionBonus",
Type = "Function",
......@@ -313,6 +328,7 @@ local QuestLog =
{
Name = "QuestHasWarModeBonus",
Type = "Function",
Documentation = { "Tests whether a quest in the player's quest log that is eligible for warmode bonuses (see 'QuestCanHaveWarModeBOnus') has been completed in warmode (including accepting it)" },
Arguments =
{
......
......@@ -497,6 +497,7 @@ function QuestInfo_ShowRewards()
local totalHeight = 0;
local numSpellRewards = 0;
local rewardsFrame = QuestInfoFrame.rewardsFrame;
local hasWarModeBonus = false;
local spellGetter;
local questID;
......@@ -515,6 +516,7 @@ function QuestInfo_ShowRewards()
ProcessQuestLogRewardFactions();
numSpellRewards = GetNumQuestLogRewardSpells();
spellGetter = GetQuestLogRewardSpell;
hasWarModeBonus = C_QuestLog.QuestHasWarModeBonus(questID)
end
else
questID = GetQuestID();
......@@ -529,6 +531,7 @@ function QuestInfo_ShowRewards()
playerTitle = GetRewardTitle();
numSpellRewards = GetNumRewardSpells();
spellGetter = GetRewardSpell;
hasWarModeBonus = C_QuestLog.QuestCanHaveWarModeBonus(questID);
end
for rewardSpellIndex = 1, numSpellRewards do
......@@ -882,7 +885,7 @@ function QuestInfo_ShowRewards()
end
-- warmode bonus
if C_QuestLog.QuestHasWarModeBonus(questID) and C_PvP.IsWarModeDesired() then
if hasWarModeBonus and C_PvP.IsWarModeDesired() then
rewardsFrame.WarModeBonusFrame.Count:SetFormattedText(PLUS_PERCENT_FORMAT, C_PvP.GetWarModeRewardBonus());
AddRewardElement(rewardsFrame.WarModeBonusFrame);
end
......
......@@ -261,7 +261,7 @@ local function ShouldShowWarModeBonus(questID, currencyID, firstInstance)
return false;
end
return QuestUtils_IsQuestWorldQuest(questID) and C_QuestLog.QuestHasWarModeBonus(questID) and not C_CurrencyInfo.GetFactionGrantedByCurrency(currencyID);
return QuestUtils_IsQuestWorldQuest(questID) and C_QuestLog.QuestCanHaveWarModeBonus(questID) and not C_CurrencyInfo.GetFactionGrantedByCurrency(currencyID);
end
function QuestUtils_GetQuestDecorationLink(linkType, questID, icon, width, height)
......@@ -301,7 +301,7 @@ end
function QuestUtils_AddQuestRewardsToTooltip(tooltip, questID, style)
local hasAnySingleLineRewards = false;
local isWarModeDesired = C_PvP.IsWarModeDesired();
local questHasWarModeBonus = C_QuestLog.QuestHasWarModeBonus(questID);
local questHasWarModeBonus = C_QuestLog.QuestCanHaveWarModeBonus(questID);
-- xp
local totalXp, baseXp = GetQuestLogRewardXP(questID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment