mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- implemented Quartz's method of checking spell interrupts through the chat interrupt events for hostile damage to attempt to fix IceCastBar not showing player interrupts
This commit is contained in:
@ -1,4 +1,7 @@
|
|||||||
local AceOO = AceLibrary("AceOO-2.0")
|
local AceOO = AceLibrary("AceOO-2.0")
|
||||||
|
local deformat = AceLibrary("Deformat-2.0")
|
||||||
|
|
||||||
|
local SPELLINTERRUPTOTHERSELF = SPELLINTERRUPTOTHERSELF
|
||||||
|
|
||||||
IceCastBar = AceOO.Class(IceBarElement)
|
IceCastBar = AceOO.Class(IceBarElement)
|
||||||
|
|
||||||
@ -39,6 +42,10 @@ function IceCastBar.prototype:Enable(core)
|
|||||||
|
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_FAILED", "SpellCastFailed") -- unit
|
self:RegisterEvent("UNIT_SPELLCAST_FAILED", "SpellCastFailed") -- unit
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "SpellCastInterrupted") -- unit
|
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "SpellCastInterrupted") -- unit
|
||||||
|
|
||||||
|
self:RegisterEvent("CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE", "CheckChatInterrupt")
|
||||||
|
self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE", "CheckChatInterrupt")
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_DELAYED", "SpellCastDelayed") -- unit
|
self:RegisterEvent("UNIT_SPELLCAST_DELAYED", "SpellCastDelayed") -- unit
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "SpellCastSucceeded") -- "player", spell, rank
|
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "SpellCastSucceeded") -- "player", spell, rank
|
||||||
|
|
||||||
@ -254,6 +261,16 @@ function IceCastBar.prototype:SpellCastFailed(unit)
|
|||||||
self:StartBar(IceCastBar.Actions.Failure, "Failed")
|
self:StartBar(IceCastBar.Actions.Failure, "Failed")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceCastBar.prototype:CheckChatInterrupt(msg)
|
||||||
|
local player, spell = deformat(msg, SPELLINTERRUPTOTHERSELF)
|
||||||
|
--IceHUD:Debug("CheckChatInterrupt", msg)
|
||||||
|
|
||||||
|
if player then
|
||||||
|
self.current = nil
|
||||||
|
self:StartBar(IceCastBar.Actions.Failure, "Interrupted")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastInterrupted(unit)
|
function IceCastBar.prototype:SpellCastInterrupted(unit)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
--IceHUD:Debug("SpellCastInterrupted", unit)
|
--IceHUD:Debug("SpellCastInterrupted", unit)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
## Interface: 20300
|
## Interface: 20300
|
||||||
## Author: Iceroth
|
## Author: Iceroth, continued by Parnic
|
||||||
## Name: IceHUD
|
## Name: IceHUD
|
||||||
## Title: IceHUD |cff7fff7f -Ace2-|r
|
## Title: IceHUD |cff7fff7f -Ace2-|r
|
||||||
## Notes: Another HUD addon
|
## Notes: Another HUD addon
|
||||||
## Version: 1.0 ($Revision$)
|
## Version: 1.1 ($Revision$)
|
||||||
## SavedVariables: IceCoreDB
|
## SavedVariables: IceCoreDB
|
||||||
## OptionalDeps: Ace2, GratuityLib, LibSharedMedia, WaterfallLib, MobHealth
|
## OptionalDeps: Ace2, GratuityLib, LibSharedMedia, WaterfallLib, MobHealth, Deformat
|
||||||
## X-Embeds: Ace2, GratuityLib, LibSharedMedia, WaterfallLib
|
## X-Embeds: Ace2, GratuityLib, LibSharedMedia, WaterfallLib, Deformat
|
||||||
## X-Category: UnitFrame
|
## X-Category: UnitFrame
|
||||||
## X-Date: $Date$
|
## X-Date: $Date$
|
||||||
## X-Website: http://www.wowace.com/forums/index.php/topic,1705.0.html
|
## X-Website: http://www.wowace.com/forums/index.php/topic,1705.0.html
|
||||||
|
Reference in New Issue
Block a user