Skip to content

Commit

Permalink
Settings a default factionID if the faction is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 28, 2024
1 parent ccfc56b commit 21a0c8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions WorldQuestTracker_WorldMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion WorldQuestTracker_ZoneMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21a0c8a

Please sign in to comment.