You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
965 B
32 lines
965 B
|
2 years ago
|
local mod = DBM:NewMod("CannonClassic", "DBM-WorldEvents", 3)
|
||
|
|
local L = mod:GetLocalizedStrings()
|
||
|
|
|
||
|
|
mod:SetRevision("20240427220735")
|
||
|
|
mod:SetZone(DBM_DISABLE_ZONE_DETECTION)
|
||
|
|
mod:RegisterEvents(
|
||
|
|
"SPELL_AURA_APPLIED 24742",
|
||
|
|
"SPELL_AURA_REMOVED 24742"
|
||
|
|
)
|
||
|
|
mod.noStatistics = true
|
||
|
|
|
||
|
|
local timerMagicWings = mod:NewBuffFadesTimer(0, 24742, nil, nil, nil, 5, nil, nil, nil, 1, 5)
|
||
|
|
local specWarnCancelNow = mod:NewSpecialWarningSpell(24742)
|
||
|
|
|
||
|
|
function mod:SPELL_AURA_APPLIED(args)
|
||
|
|
if args:IsSpell(24742) and args:IsPlayer() then
|
||
|
|
local timer = C_Map.GetBestMapForUnit("player") == 1456 and 14.8 -- Thunder Bluff
|
||
|
|
or C_Map.GetBestMapForUnit("player") == 1429 and false -- TODO: Alliance
|
||
|
|
if timer then
|
||
|
|
timerMagicWings:Start(timer)
|
||
|
|
specWarnCancelNow:Schedule(timer)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
function mod:SPELL_AURA_REMOVED(args)
|
||
|
|
if args:IsSpell(24742) and args:IsPlayer() then
|
||
|
|
timerMagicWings:Cancel()
|
||
|
|
specWarnCancelNow:Cancel()
|
||
|
|
end
|
||
|
|
end
|