Commit 2e226349 authored by TOM_RUS's avatar TOM_RUS

WOW-30634patch8.2.0_PTR

parent b264eae5
......@@ -2,16 +2,15 @@ CurrencyContainerUtil = {};
function CurrencyContainerUtil.GetCurrencyContainerInfo(currencyID, numItems, name, texture, quality)
local entry = C_CurrencyInfo.GetCurrencyContainerInfo(currencyID, numItems);
-- by default, the display amount we want to return is 1 for currencies
local displayAmount = entry.displayAmount;
if (entry) then
-- by default, the display amount we want to return is 1 for currencies
local displayAmount = entry.displayAmount;
if currencyID == C_CurrencyInfo.GetAzeriteCurrencyID() then
-- but for Azerite, we need the ACTUAL amount so that we can pick an appropriate texture to display
displayAmount = entry.actualAmount;
end
if currencyID == C_CurrencyInfo.GetAzeriteCurrencyID() then
-- but for Azerite, we need the ACTUAL amount so that we can pick an appropriate texture to display
displayAmount = entry.actualAmount;
end
if (entry) then
return entry.name, entry.icon, displayAmount, entry.quality;
end
return name, texture, numItems, quality;
......
......@@ -1337,10 +1337,10 @@ function LFGRewardsFrame_UpdateFrame(parentFrame, dungeonID, background)
local itemButtonIndex = 1;
for i=1, numRewards do
local name, texture, numItems, isBonusReward, rewardType, rewardID, quality = GetLFGDungeonRewardInfo(dungeonID, i);
if(rewardType == "currency") then
name, texture, numItems, quality = CurrencyContainerUtil.GetCurrencyContainerInfo(rewardID, numItems, name, texture, quality);
end
if ( not isBonusReward ) then
if (isBonusReward == false) then
if rewardType == "currency" and C_CurrencyInfo.IsCurrencyContainer(rewardID, numItems) then
name, texture, numItems, quality = CurrencyContainerUtil.GetCurrencyContainerInfo(rewardID, numItems, name, texture, quality);
end
lastFrame = LFGRewardsFrame_SetItemButton(parentFrame, dungeonID, itemButtonIndex, i, name, texture, numItems, rewardType, rewardID, quality);
itemButtonIndex = itemButtonIndex + 1;
end
......@@ -1352,7 +1352,7 @@ function LFGRewardsFrame_UpdateFrame(parentFrame, dungeonID, background)
if ( eligible and ((tankChecked and forTank) or (healerChecked and forHealer) or (damageChecked and forDamage)) ) then
for rewardIndex=1, itemCount do
local name, texture, numItems, _, rewardType, rewardID, quality = GetLFGDungeonShortageRewardInfo(dungeonID, shortageIndex, rewardIndex);
if(rewardType == "currency") then
if rewardType == "currency" and C_CurrencyInfo.IsCurrencyContainer(rewardID, numItems) then
name, texture, numItems, quality = CurrencyContainerUtil.GetCurrencyContainerInfo(rewardID, numItems, name, texture, quality);
end
lastFrame = LFGRewardsFrame_SetItemButton(parentFrame, dungeonID, itemButtonIndex, rewardIndex, name, texture, numItems, rewardType, rewardID, quality, shortageIndex, forTank, forHealer, forDamage);
......
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