Skip to content

Commit 3673564

Browse files
11.0.7 (58867)
1 parent 6375d71 commit 3673564

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

Interface/AddOns/Blizzard_AccountStore/Blizzard_AccountStoreCardTemplates.lua

+17-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ local AccountStoreBaseCardEvents = {
1919

2020
function AccountStoreBaseCardMixin:OnLoad()
2121
self.BuyButton:SetScript("OnEnter", function()
22-
if not self.BuyButton:IsEnabled() then
22+
if not self.BuyButton:IsEnabled() and self.itemInfo then
2323
AccountStoreUtil.ShowDisabledItemInfoTooltip(self.BuyButton, self.itemInfo);
2424
end
2525
end);
@@ -58,12 +58,16 @@ function AccountStoreBaseCardMixin:OnHide()
5858
end
5959

6060
function AccountStoreBaseCardMixin:OnEnter()
61+
local itemInfo = self.itemInfo;
62+
if not itemInfo then
63+
return;
64+
end
65+
6166
if not self.hoverSoundPlayed then
6267
self.hoverSoundPlayed = true;
6368
PlaySound(SOUNDKIT.ACCOUNT_STORE_ITEM_HOVER);
6469
end
6570

66-
local itemInfo = self.itemInfo;
6771
local description = itemInfo.description;
6872
if not description then
6973
return;
@@ -110,7 +114,7 @@ function AccountStoreBaseCardMixin:OnEvent(event, ...)
110114
self:UpdateCardDisplay();
111115
elseif event == "ACCOUNT_STORE_ITEM_INFO_UPDATED" then
112116
local itemID = ...;
113-
if itemID == self.itemInfo.id then
117+
if itemID == self.itemID then
114118
self:SetItemID(itemID);
115119
end
116120
end
@@ -161,9 +165,13 @@ function AccountStoreBaseCardMixin:SetItemID(itemID)
161165
end
162166

163167
function AccountStoreBaseCardMixin:SelectCard()
168+
local itemInfo = self.itemInfo;
169+
if not itemInfo then
170+
return;
171+
end
172+
164173
PlaySound(SOUNDKIT.ACCOUNT_STORE_ITEM_SELECT);
165174

166-
local itemInfo = self.itemInfo;
167175
local isRefundable = itemInfo.status == Enum.AccountStoreItemStatus.Refundable;
168176
local confirmationFormat = isRefundable and ACCOUNT_STORE_REFUND_CONFIRMATION_FORMAT or PLUNDERSTORE_PURCHASE_CONFIRMATION_FORMAT;
169177
local confirmation = confirmationFormat:format(itemInfo.name, AccountStoreUtil.FormatCurrencyDisplay(itemInfo.price, itemInfo.currencyID));
@@ -193,7 +201,7 @@ function AccountStoreBaseCardMixin:CheckForItemStateUpdate()
193201

194202
refreshedItemInfo.status = Enum.AccountStoreItemStatus.Refundable;
195203

196-
if refreshedItemInfo.status ~= self.itemInfo.status then
204+
if not self.itemInfo or (refreshedItemInfo.status ~= self.itemInfo.status) then
197205
self:SetItemID(self.itemID);
198206
elseif refreshedItemInfo.refundSecondsRemaining ~= self.itemInfo.refundSecondsRemaining then
199207
self.itemInfo.refundSecondsRemaining = refreshedItemInfo.refundSecondsRemaining;
@@ -203,6 +211,10 @@ end
203211

204212
function AccountStoreBaseCardMixin:UpdateRefundTime()
205213
local itemInfo = self.itemInfo;
214+
if not itemInfo then
215+
return;
216+
end
217+
206218
local refundable = (itemInfo.status == Enum.AccountStoreItemStatus.Refundable) and itemInfo.refundSecondsRemaining;
207219
self.RefundText:SetShown(refundable);
208220
self:SetScript("OnUpdate", refundable and self.OnUpdate or nil);

Interface/AddOns/Blizzard_ChatFrameBase/Mainline/FloatingChatFrame.xml

+9-5
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,17 @@
308308
return;
309309
end
310310

311-
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
312-
GameTooltip_SetTitle(GameTooltip, string.format(CHAT_TAB_NAME, tabName));
313-
GameTooltip_AddColoredLine(GameTooltip, CHAT_TAB_RIGHT_CLICK, GREEN_FONT_COLOR);
314-
GameTooltip:Show();
311+
if GameTooltip then
312+
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
313+
GameTooltip_SetTitle(GameTooltip, string.format(CHAT_TAB_NAME, tabName));
314+
GameTooltip_AddColoredLine(GameTooltip, CHAT_TAB_RIGHT_CLICK, GREEN_FONT_COLOR);
315+
GameTooltip:Show();
316+
end
315317
</OnEnter>
316318
<OnLeave>
317-
GameTooltip:Hide();
319+
if GameTooltip then
320+
GameTooltip:Hide();
321+
end
318322
</OnLeave>
319323
<OnClick>
320324
FCF_Tab_OnClick(self, button);

Interface/AddOns/Blizzard_ObjectiveTracker/Blizzard_BonusObjectiveTracker.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ function BonusObjectiveTrackerMixin:SetUpQuestBlock(block, forceShowCompleted)
362362

363363
local showAsCompleted = isThreatQuest and isQuestComplete;
364364
local hasAddedTimeLeft = false;
365-
for objectiveIndex = 1, block.numObjectives do
365+
local numObjectives = block.numObjectives or 0;
366+
for objectiveIndex = 1, numObjectives do
366367
local text, objectiveType, finished = GetQuestObjectiveInfo(questID, objectiveIndex, forceShowCompleted);
367368
if text then
368369
if finished then

0 commit comments

Comments
 (0)