Skip to content

Commit

Permalink
Another attempt to better refresh the status of weekly rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jan 24, 2023
1 parent 04774a4 commit 8ee414f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions REKeys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RE.KeyQueryLimit = false
RE.MPlusDataReceived = false
RE.GroupFound = false
RE.TooltipDirty = false
RE.RewardsDirty = false

RE.DefaultSettings = {["CurrentWeek"] = 0, ["ResetTimestamp"] = 0, ["ServerTimestamp"] = 0, ["PinnedCharacters"] = {}, ["Sorting"] = 1, ["FullDungeonName"] = false, ["ChatQueryGuild"] = true, ["ChatQueryGroup"] = true, ["OfflinePlayers"] = false, ["MinimapButtonSettings"] = {["hide"] = false}}
RE.AceConfig = {
Expand Down Expand Up @@ -237,6 +238,7 @@ end
function RE:OnLoad(self)
self:RegisterEvent("ADDON_LOADED")
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("ZONE_CHANGED_NEW_AREA")
self:RegisterEvent("CHAT_MSG_GUILD")
self:RegisterEvent("CHAT_MSG_PARTY")
self:RegisterEvent("CHAT_MSG_PARTY_LEADER")
Expand Down Expand Up @@ -319,13 +321,14 @@ function RE:OnEvent(self, event, name, ...)
RequestRewards()
After(10, RE.FindKeyDelay)
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
elseif event == "ZONE_CHANGED_NEW_AREA" and RE.RewardsDirty then
RE.RewardsDirty = false
RequestMapInfo()
RequestRewards()
elseif event == "CHALLENGE_MODE_COMPLETED" then
RE.RewardsDirty = true
RequestMapInfo()
RequestRewards()
After(60, function()
RequestMapInfo()
RequestRewards()
end)
After(5, function() RE:FindKey(true) end)
elseif event == "CHAT_MSG_GUILD" then
RE:ParseChat(name, "GUILD", RE.Settings.ChatQueryGuild)
Expand Down Expand Up @@ -427,6 +430,7 @@ function RE:FillTooltip()
end

RE.Tooltip:AddLine()
if pinSeparator or groupSeparator then RE.Tooltip:AddLine() end
RE.RowFill = true
end

Expand Down

0 comments on commit 8ee414f

Please sign in to comment.