WoWInterface SVN Broadcaster

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/WotLK/Modules
    from Rev 11 to Rev 12
    Reverse comparison

Rev 11 → Rev 12

Mage.lua
6,9 → 6,12
--DEFINE MY LOCALS--
local Broadcaster = LibStub("AceAddon-3.0"):GetAddon("Broadcaster")
local Mage = Broadcaster:NewModule("Mage", "AceEvent-3.0", "AceConsole-3.0")
local MODNAME = "Mage"
-------------------
local L = LibStub("AceLocale-3.0"):GetLocale("Broadcaster")
 
local db, msgs
 
local player = UnitName("player")
local spell, spell2
local polySpellID = { [118] = true, --rank 1 sheep
21,31 → 24,65
 
 
local options = {
mage = {
name = "Mage",
type = "group",
args = {
config = {
name = L["Config"],
desc = L["Opens the options window."],
type = "execute",
func = function()
LibStub("AceConfigDialog-3.0"):Open("Broadcaster")
end,
guiHidden = true,
poly = {
name = "Polymorph",
type = "group",
arg = MODNAME,
args = {
enable = {
name = "Enable",
desc = "Announce messages for polymorph.",
type = "toggle",
get = function()
return db.polyenable
end,
set = function()
db.magepolyenable = not db.polyenable
Broadcaster:Print("Polymorph enabled: "..db.polyenable)
end,
},
},
},
port = {
name = "Portals",
type = "group",
arg = MODNAME,
args = {
enable = {
name = "Enable",
desc = "Announce messages for portals.",
type = "toggle",
get = function()
return db.portenable
end,
set = function()
db.portenable = not db.portenable
Broadcaster:Print("Polymorph enabled: "..db.portenable)
end,
},
},
},
}
 
--------------------------------------
--VOODOO MAGIC STUFF--
--------------------------------------
 
function Mage:OnInitialize()
self.db = Broadcaster.db:RegisterNamespace(MODNAME, defaults)
db = self.db.profile
coredb = Broadcaster.db.profile
msgs = BroadcasterMageMsgs
Broadcaster:InjectOptions(MODNAME, options)
end
 
function Mage:OnEnable()
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
self:RegisterEvent("UNIT_SPELLCAST_START")
end
 
--function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, eventType, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, spellID, spellName, spellSchool, eID, eName)
function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
local db = Broadcaster.db.profile
local msgs = BroadcasterMageMsgs
function Mage:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
--IS THE ADDON IN STANDBY?--
-- if not db.standby then
--FILTER THE COMBAT LOG--
118,9 → 155,7
end
 
--PORTAL MESSAGES--
function Broadcaster:UNIT_SPELLCAST_START(source, spell)
local db = Broadcaster.db.profile
local msgs = BroadcasterMageMsgs
function Mage:UNIT_SPELLCAST_START(source, spell)
--IS THE ADDON IN STANDBY AND AM I IN A GROUP?--
-- if not db.standby and db.channel then
--LOOK FOR PORTAL SPELL CAST BY ME--