- fix for Details! Streamer plugin.

This commit is contained in:
Tercio
2016-08-11 14:06:41 -03:00
parent 07ed01c097
commit 439bdc3cd8
3 changed files with 54 additions and 12 deletions
+13 -4
View File
@@ -994,22 +994,21 @@ end
local lastspell, lastcastid, lastchannelid, ischanneling
local channelspells = {}
local lastChannelSpell = ""
listener:SetScript ("OnEvent", function (self, event, ...)
--print (event, ...)
if (event == "UNIT_SPELLCAST_SENT") then
local unitID, spell, rank, target, id = ...
if (unitID == "player") then
CastsTable [id] = {Target = target, Id = id, CastStart = GetTime()}
lastChannelSpell = id
lastspell = spell
lastcastid = id
end
elseif (event == "UNIT_SPELLCAST_START") then
local unitID, spell, rank, id, spellID = ...
if (unitID == "player" and CastsTable [id]) then
CastsTable [id].SpellId = spellID
CastsTable [id].HasCastTime = true
@@ -1028,6 +1027,11 @@ listener:SetScript ("OnEvent", function (self, event, ...)
local unitID, spell, rank, id, spellID = ...
if (unitID == "player") then
if (not CastsTable [id]) then
--print ("not", " - ", id, " - ", lastChannelSpell)
id = lastChannelSpell
end
id = lastchannelid
CastsTable [id].Interrupted = true
ischanneling = false
@@ -1046,6 +1050,11 @@ listener:SetScript ("OnEvent", function (self, event, ...)
CastsTable [lastchannelid].Interrupted = true
end
if (not CastsTable [id]) then
--print ("not", " - ", id, " - ", lastChannelSpell)
id = lastChannelSpell
end
CastsTable [id].HasCastTime = true
CastsTable [id].IsChanneled = true
CastsTable [id].SpellId = spellID