Update TimeToDrink.lua to version 1.3

This commit is contained in:
Fayz
2026-08-03 14:40:52 -05:00
committed by GitHub
parent 1bbfe7bc63
commit 6f134a9eee
+5 -2
View File
@@ -105,6 +105,9 @@ function TTD_InitHealerDropdown()
local t = getglobal("TimeToDrinkHealerDropdownText")
if t then t:SetText(nm) end
dbg("healer set to " .. nm)
if TTD_InFivePlayerParty() then
SendChatMessage(nm .. " has been set as the healer in Time To Drink. The party will be alerted when they drop below " .. TTD.threshold .. "% mana.", "PARTY")
end
end
UIDropDownMenu_AddButton(info)
i = i + 1
@@ -235,7 +238,7 @@ local function TTD_CheckHealer()
local pct = (UnitMana(unit) / maxMana) * 100
if pct < TTD.threshold then
if (GetTime() - TTD.lastAnnounce) >= TTD.cooldown then
SendChatMessage(TTD.selectedHealer .. " has less than " .. TTD.threshold .. "% mana", "PARTY")
SendChatMessage("The healer has less than " .. TTD.threshold .. "% mana", "PARTY")
TTD.lastAnnounce = GetTime()
dbg("announced (" .. math.floor(pct) .. "% now)")
end
@@ -313,4 +316,4 @@ SlashCmdList["TIMETODRINK"] = function(arg)
if not ok then err(e) end
end
msg("loaded v1.2. /ttd to open, /ttd status, /ttd test. (5-man parties only)")
msg("loaded v1.3. /ttd to open, /ttd status, /ttd test. (5-man parties only)")