|
|
|
@ -7,6 +7,7 @@ local Spell = { |
|
|
|
|
PreCastFunc = false, |
|
|
|
|
OnCastFunc = false, |
|
|
|
|
PostCastFunc = false, |
|
|
|
|
lastCastAttempt = 0, |
|
|
|
|
wasLooking = false, |
|
|
|
|
lastCastAt = 0, |
|
|
|
|
conditions = {}, |
|
|
|
@ -305,6 +306,15 @@ function Spell:GetTimeSinceLastCast() |
|
|
|
|
return GetTime() - self:GetLastCastTime() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- Get the time since the last cast attempt |
|
|
|
|
---@return number |
|
|
|
|
function Spell:GetTimeSinceLastCastAttempt() |
|
|
|
|
if not self.lastCastAttempt then |
|
|
|
|
return math.huge |
|
|
|
|
end |
|
|
|
|
return GetTime() - self.lastCastAttempt |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-- Get the spells charges |
|
|
|
|
---@return number |
|
|
|
|
function Spell:GetCharges() |
|
|
|
@ -404,7 +414,19 @@ end |
|
|
|
|
---@return boolean |
|
|
|
|
function Spell:IsMagicDispel() |
|
|
|
|
return ({ |
|
|
|
|
[88423] = true |
|
|
|
|
[88423] = true, -- Druid - Natures Cure |
|
|
|
|
[115310] = true, -- Monk - Revival |
|
|
|
|
[77130] = true, -- Shaman - Purify Spirit |
|
|
|
|
[383016] = true, -- Shaman - Improved Purify Spirit |
|
|
|
|
[115450] = true, -- Monk - Detox |
|
|
|
|
[388874] = true, -- Monk - Improved Detox |
|
|
|
|
[4987] = true, -- Paladin - Cleanse |
|
|
|
|
[393024] = true, -- Paladin - Improved Cleanse |
|
|
|
|
[527] = true, -- Priest - Purify |
|
|
|
|
[390632] = true, -- Priest - Improved Purify |
|
|
|
|
[89808] = true, -- Warlock - Singe Magic - Imp Spell |
|
|
|
|
[278326] = true, -- Demon Hunter - Consume Magic |
|
|
|
|
[393278] = true -- Druid - Improved Natures Cure |
|
|
|
|
})[self:GetID()] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -412,7 +434,11 @@ end |
|
|
|
|
---@return boolean |
|
|
|
|
function Spell:IsCurseDispel() |
|
|
|
|
return ({ |
|
|
|
|
[88423] = true |
|
|
|
|
[393278] = true, -- Druid - Improved Natures Cure |
|
|
|
|
[2782] = true, -- Druid - Remove Corruption |
|
|
|
|
[475] = true, -- Mage - Remove Curse |
|
|
|
|
[383016] = true, -- Shaman - Improved Purify Spirit |
|
|
|
|
[51886] = true -- Shaman - Cleanse Spirit |
|
|
|
|
})[self:GetID()] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -420,7 +446,11 @@ end |
|
|
|
|
---@return boolean |
|
|
|
|
function Spell:IsPoisonDispel() |
|
|
|
|
return ({ |
|
|
|
|
[88423] = true |
|
|
|
|
[393278] = true, -- Druid - Improved Natures Cure |
|
|
|
|
[115310] = true, -- Monk - Revival |
|
|
|
|
[388874] = true, -- Monk - Improved Detox |
|
|
|
|
[393024] = true, -- Paladin - Improved Cleanse |
|
|
|
|
[213644] = true -- Paladin - Cleanse Toxins |
|
|
|
|
})[self:GetID()] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -428,7 +458,12 @@ end |
|
|
|
|
---@return boolean |
|
|
|
|
function Spell:IsDiseaseDispel() |
|
|
|
|
return ({ |
|
|
|
|
|
|
|
|
|
[115310] = true, -- Monk - Revival |
|
|
|
|
[388874] = true, -- Monk - Improved Detox |
|
|
|
|
[393024] = true, -- Paladin - Improved Cleanse |
|
|
|
|
[213644] = true, -- Paladin - Cleanse Toxins |
|
|
|
|
[390632] = true, -- Priest - Improved Purify |
|
|
|
|
[213634] = true -- Priest - Purify Disease |
|
|
|
|
})[self:GetID()] |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|