From 21a0c8abf2edbb957ec2b562a50cb4cb3e1f3ad5 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Tue, 27 Aug 2024 22:27:10 -0300 Subject: [PATCH] Settings a default factionID if the faction is nil --- WorldQuestTracker_Core.lua | 4 ++-- WorldQuestTracker_WorldMap.lua | 4 ++-- WorldQuestTracker_ZoneMap.lua | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WorldQuestTracker_Core.lua b/WorldQuestTracker_Core.lua index dfb95e50..7dfb1e9f 100644 --- a/WorldQuestTracker_Core.lua +++ b/WorldQuestTracker_Core.lua @@ -2381,7 +2381,7 @@ WorldQuestTracker.OnToggleWorldMap = function(self) --play quick flash on squares showing quests of this faction for _, widget in ipairs(WorldQuestTracker.WorldSummaryQuestsSquares) do if (widget.FactionID == self.MyObject.FactionID) then - local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(widget.questID, factionID) + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(widget.questID or 0, factionID or 0) if (bAwardReputation) then widget.LoopFlash:Play() end @@ -2391,7 +2391,7 @@ WorldQuestTracker.OnToggleWorldMap = function(self) --play quick flash on widgets shown in the world map(quest locations) for questCounter, button in pairs(WorldQuestTracker.WorldMapSmallWidgets) do if (button.FactionID == self.MyObject.FactionID) then - local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(button.questID, factionID) + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(button.questID or 0, factionID or 0) if (bAwardReputation) then button.FactionPulseAnimation:Play() end diff --git a/WorldQuestTracker_WorldMap.lua b/WorldQuestTracker_WorldMap.lua index 3f2c5d4b..bc9afaaf 100644 --- a/WorldQuestTracker_WorldMap.lua +++ b/WorldQuestTracker_WorldMap.lua @@ -186,7 +186,7 @@ local onleave_scale_animation = function(self, scale) local originalScale = self.OriginalScale if (self.OnLeaveAnimation.ScaleAnimation.SetScaleFrom) then - self.OnLeaveAnimation.ScaleAnimation:SetScaleFrom(currentScale, currentScale) + self.OnLeaveAnimation.ScaleAnimation:SetScaleFrom(currentScale, currentScale) --error bad argument #1 to 'SetScaleFrom' (Usage: self:SetScaleFrom(scale)) self.OnLeaveAnimation.ScaleAnimation:SetScaleTo(originalScale, originalScale) else self.OnLeaveAnimation.ScaleAnimation:SetFromScale(currentScale, currentScale) @@ -913,7 +913,7 @@ function WorldQuestTracker.UpdateWorldWidget(widget, questID, numObjectives, map widget.IsCriteria = isCriteria widget.TimeLeft = timeLeft - local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID, factionID) + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID or 0, factionID or 0) if (not bAwardReputation) then widget.FactionID = nil factionID = nil diff --git a/WorldQuestTracker_ZoneMap.lua b/WorldQuestTracker_ZoneMap.lua index 13230a9f..5ce6112c 100644 --- a/WorldQuestTracker_ZoneMap.lua +++ b/WorldQuestTracker_ZoneMap.lua @@ -1819,7 +1819,7 @@ function WorldQuestTracker.SetupZoneSummaryButton(summaryWidget, zoneWidget) local factionTexture = WorldQuestTracker.MapData.FactionIcons[factionID] if (factionTexture) then --check if this quest is realy giving reputation - local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID, factionID) + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID or 0, factionID or 0) if (bAwardReputation) then summaryWidget.factionIcon:SetTexture(factionTexture) end