Skip to content

Commit

Permalink
Added Primal Storm todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Breeni committed Dec 18, 2022
1 parent 7869cfc commit 66ae359
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions Register_Mainline.lua
Expand Up @@ -168,6 +168,18 @@ local function GetCommunityFeastCountdown()
end
Internal.RegisterCustomStateFunction("GetCommunityFeastCountdown", GetCommunityFeastCountdown)

local function GetPrimalStormCountdown()
local start = GetDFPreSeasonTimestamp()
local current = GetServerTime()
local seconds = (current - start) % 10800
if seconds < 7200 then
return true, 7200 - seconds
else
return false, 10800 - seconds
end
end
Internal.RegisterCustomStateFunction("GetPrimalStormCountdown", GetPrimalStormCountdown)

local function tMap(tbl, func)
local result = {}
for k,v in pairs(tbl) do
Expand Down Expand Up @@ -2024,6 +2036,29 @@ if Internal.IsDragonflight() then
completed = "return false",
text = [[return states[1]:GetQuantity()]],
},
{
id = "btwtodo:primalstorms",
name = L["Primal Storms"],
states = {
{ type = "quest", id = 70753, }, -- Air Invasions - Primal Air Core - Dissipating the Air Primalists
{ type = "quest", id = 70723, }, -- Earth Invasions - Primal Earth Core - Shattering the Earth Primalists
{ type = "quest", id = 70754, }, -- Fire Invasions - Primal Fire Core - Extinguishing the Fire Primalists
{ type = "quest", id = 70752, }, -- Water Invasions - Primal Water Core - Vaporizing the Water Primalists
},
completed = [[return tCount(states, "IsCompleted") == 4]],
text = [[
local items = {};
for index,letter in ipairs({"A", "E", "F", "W"}) do
if states[index]:IsCompleted() then
letter = Colors.COMPLETE:WrapTextInColorCode(letter);
elseif states[index]:IsActive() then
letter = Colors.STALLED:WrapTextInColorCode(letter);
end
items[#items+1] = letter;
end
return table.concat(items, " / ");
]],
},
{
id = "btwtodo:blacksmithingprofessionknowledge",
name = L["Blacksmithing Profession Knowledge"],
Expand Down Expand Up @@ -2427,7 +2462,7 @@ return 1
{
id = "btwtodo:100",
name = L["Dragonflight"],
version = 2,
version = 3,
todos = {
{
id = "btwtodo:itemlevel",
Expand Down Expand Up @@ -2491,6 +2526,11 @@ return 1
category = "btwtodo:weekly",
version = 2,
},
{
id = "btwtodo:primalstorms",
category = "btwtodo:weekly",
version = 3,
},
{
id = "btwtodo:dragonislessupplies",
category = "btwtodo:currency",
Expand Down Expand Up @@ -2647,7 +2687,7 @@ if Internal.IsDragonflightExpansion() then
{
id = "btwtodo:default",
name = L["Default"],
version = 9,
version = 10,
todos = {
{
id = "btwtodo:itemlevel",
Expand Down Expand Up @@ -2793,6 +2833,11 @@ if Internal.IsDragonflightExpansion() then
category = "btwtodo:weekly",
version = 9,
},
{
id = "btwtodo:primalstorms",
category = "btwtodo:weekly",
version = 10,
},
{
id = "btwtodo:torghast",
category = "btwtodo:weekly",
Expand Down

0 comments on commit 66ae359

Please sign in to comment.