assert(BigWigs, "BigWigs not found!")local L = AceLibrary("AceLocale-2.0"):new("BigWigsZombieFood")L:RegisterTranslations("enUS", function() return { ["Zombie Food"] = true, ["Options for Zombie Food."] = true, ["broadcast"] = true, ["raidwarn"] = true, ["Broadcast"] = true, ["Toggle broadcasting over Raidwarning."] = true, ["performs Dazed on"] = true, ["performs Dazed on (.+)."] = true, [" has been Dazed, HEAL!"] = true,} end )BigWigsZombieFood = BigWigs:NewModule(L"Zombie Food")BigWigsZombieFood.defaultDB = { broadcast = false,}BigWigsZombieFood.consoleCmd = L"raidwarn"BigWigsZombieFood.consoleOptions = { type = "group", name = L"Zombie Food", desc = L"Options for Zombie Food.", args = { [L"broadcast"] = { type = "toggle", name = L"Broadcast", desc = L"Toggle broadcasting over Raidwarning.", get = function() return BigWigsZombieFood.db.profile.broadcast end, set = function(v) BigWigsZombieFood.db.profile.broadcast = v end, }, }}function BigWigsZombieFood:OnEnable() self:RegisterEvent("BigWigs_SendSync") self:RegisterEvent("BigWigs_RecvSync") self:TriggerEvent("BigWigs_ThrottleSync", "ZombieFood", 2)endfunction BigWigsZombieFood:BigWigs_RecvSync( sync, victim, nick ) if sync ~= "ZombieFood" then return end --if not BigWigsZombieFood.db.profile.broadcast then return end --if not IsRaidLeader() and not IsRaidOfficer() then return end self:TriggerEvent("BigWigs_Message", victim .. L" has been Dazed, HEAL!", "Red")endfunction BigWigsZombieFood:BigWigs_SendSync( module ) -- module is "EnableModule <Module Name>" -- Maybe we should check that a bossmod was actually enabled here. --DEFAULT_CHAT_FRAME:AddMessage("Registering for CvC_Dmg.") self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE") self:RegisterEvent("CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS") self:RegisterEvent("PLAYER_REGEN_ENABLED")endfunction BigWigsZombieFood:PLAYER_REGEN_ENABLED() --DEFAULT_CHAT_FRAME:AddMessage("Unregistering for CvC_Dmg.") self:UnregisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE") self:UnregisterEvent("CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS") self:UnregisterEvent("PLAYER_REGEN_ENABLED")endfunction BigWigsZombieFood:CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE() if (string.find(arg1, L"performs Dazed on")) then local _, _, victim = string.find(arg1, "performs Dazed on (.+).") self:TriggerEvent("BigWigs_SendSync", "ZombieFood "..victim) endend--[[function BigWigsZombieFood:CHAT_MSG_COMBAT_CREATURE_VS_SELF_HITS() self:TriggerEvent("BigWigs_SendSync", "ZombieFood", "you")end]]