WoWInterface SVN Broadcaster

Compare Revisions

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

Rev 13 → Rev 14

Priest.lua
39,7 → 39,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for resurrection.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
68,7 → 68,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%t = the spell's target",
type = "input",
order = 3,
multiline = true,
123,16 → 123,18
--------------------------------------
 
function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING RESURRECTION?--
if resurrectionSpellID[spellID] then
list = msgs.Resurrection
if db.reschoose == "Custom" then
list = {strsplit("\n", db.customres)}
elseif db.reschoose == "Both" then
custom = {strsplit("\n", db.customres)}
if not coredb.standby then
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING RESURRECTION?--
if resurrectionSpellID[spellID] then
list = msgs.Resurrection
if db.reschoose == "Custom" then
list = {strsplit("\n", db.customres)}
elseif db.reschoose == "Both" then
custom = {strsplit("\n", db.customres)}
end
self:CompileMessage(list, custom)
end
self:CompileMessage(list, custom)
end
end
end
Druid.lua
39,7 → 39,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for rebirth.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
68,7 → 68,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%t = the spell's target",
type = "input",
order = 3,
multiline = true,
122,19 → 122,21
--------------------------------------
 
function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
--IS THE ADDON IN STANDBY?--
if not Broadcaster.db.profile.standby then
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING REBIRTH?--
if rebirthSpellID[spellID] then
list = msgs.Rebirth
if db.rebirthchoose == "Custom" then
list = {strsplit("\n", db.customrebirth)}
elseif db.rebirthchoose == "Both" then
custom = {strsplit("\n", db.customrebirth)}
if not coredb.standby then
--IS THE ADDON IN STANDBY?--
if not Broadcaster.db.profile.standby then
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING REBIRTH?--
if rebirthSpellID[spellID] then
list = msgs.Rebirth
if db.rebirthchoose == "Custom" then
list = {strsplit("\n", db.customrebirth)}
elseif db.rebirthchoose == "Both" then
custom = {strsplit("\n", db.customrebirth)}
end
self:CompileMessage(list, custom)
end
self:CompileMessage(list, custom)
end
end
end
Shaman.lua
38,7 → 38,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for ancestral spirit.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
67,7 → 67,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%t = the spell's target",
type = "input",
order = 3,
multiline = true,
120,16 → 120,18
--VOODOO MAGIC STUFF--
--------------------------------------
function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING ANCESTRALSPIRIT?--
if ancSpiritSpellID[spellID] then
list = msgs.AncestralSpirit
if db.ancspchoose == "Custom" then
list = {strsplit("\n", db.customancsp)}
elseif db.ancspchoose == "Both" then
custom = {strsplit("\n", db.customancsp)}
if not coredb.standby then
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING ANCESTRALSPIRIT?--
if ancSpiritSpellID[spellID] then
list = msgs.AncestralSpirit
if db.ancspchoose == "Custom" then
list = {strsplit("\n", db.customancsp)}
elseif db.ancspchoose == "Both" then
custom = {strsplit("\n", db.customancsp)}
end
self:CompileMessage(list, custom)
end
self:CompileMessage(list, custom)
end
end
end
Paladin.lua
38,7 → 38,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for redemption.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
67,7 → 67,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%t = the spell's target",
type = "input",
order = 3,
multiline = true,
121,17 → 121,19
--------------------------------------
 
function Broadcaster:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING REDEMPTION?--
if redemptionSpellID[spellID] then
list = msgs.Redemption
if db.redemptchoose == "Custom" then
list = {strsplit("\n", db.customredempt)}
elseif db.redemptchoose == "Both" then
custom = {strsplit("\n", db.customredempt)}
if not coredb.standby then
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING REDEMPTION?--
if redemptionSpellID[spellID] then
list = msgs.Redemption
if db.redemptchoose == "Custom" then
list = {strsplit("\n", db.customredempt)}
elseif db.redemptchoose == "Both" then
custom = {strsplit("\n", db.customredempt)}
end
self:CompileMessage(list, custom)
end
self:CompileMessage(list, custom)
end
end
end
Mage.lua
57,7 → 57,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for polymorph.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
86,7 → 86,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%t = the spell's target",
type = "input",
order = 3,
multiline = true,
103,7 → 103,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for portals.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
132,7 → 132,7
},
custom = {
name = "Custom messages",
desc = "Enter in any custom messages you would like to use, one per line.",
desc = "Enter in any custom messages you would like to use, one per line.\n\n%d = the portal's destination",
type = "input",
order = 3,
multiline = true,
149,7 → 149,7
args = {
enable = {
name = "Enable",
desc = "Announce messages for tables.",
desc = "Announce messages for this spell.",
type = "toggle",
order = 1,
get = function()
233,90 → 233,79
--VOODOO MAGIC STUFF--
--------------------------------------
 
function Mage:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, _, dstFlags, spellID, spellName, spellSchool, eID, eName)
--FILTER THE COMBAT LOG--
function Mage:COMBAT_LOG_EVENT_UNFILTERED(event, _, eventType, _, srcName, _, _, dstName, dstFlags, spellID, spellName, spellSchool, eID, eName)
if not coredb.standby then
--FILTER THE COMBAT LOG--
-- local isDestEnemy = (bit.band(dstFlags, COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE)
-- local isDestTarget = (bit.band(dstFlags, COMBATLOG_OBJECT_TARGET) == COMBATLOG_OBJECT_TARGET)
local isDestFocus = (bit.band(dstFlags, COMBATLOG_OBJECT_FOCUS) == COMBATLOG_OBJECT_FOCUS)
if eventType == "SPELL_CAST_SUCCESS" and srcName == player then --removed "and isDestFocus" to try to remedy Zidomo's problem
--CHECK FOR PoM POLY--
if polySpellID[spellID] then
spell = spellID
local isDestTarget = (bit.band(dstFlags, COMBATLOG_OBJECT_TARGET) == COMBATLOG_OBJECT_TARGET)
local isDestFocus = (bit.band(dstFlags, COMBATLOG_OBJECT_FOCUS) == COMBATLOG_OBJECT_FOCUS)
if eventType == "SPELL_CAST_SUCCESS" and srcName == player then
--CHECK FOR PoM POLY--
if polySpellID[spellID] and db.polyenable then
spell = spellID
end
end
--CHECK FOR RITUAL OF REFRESHMENT--
if spellID == 43987 then
list = msgs.Table
if db.tablechoose == "Custom" then
list = {strsplit("\n", db.customtable)}
elseif db.tablechoose == "Both" then
custom = {strsplit("\n", db.customtable)}
if eventType == "SPELL_CREATE" and srcName == player then
--CHECK FOR RITUAL OF REFRESHMENT--
if spellID == 43987 and db.tableenable then
list = msgs.Table
if db.tablechoose == "Custom" then
list = {strsplit("\n", db.customtable)}
elseif db.tablechoose == "Both" then
custom = {strsplit("\n", db.customtable)}
end
self:CompileMessage(list, custom)
end
self:CompileMessage(list, custom)
--CHECK FOR PORTALS--
if portSpellID[spellID] and db.portenable then
--TRIM SPELL NAME TO GET DESTINATION--
local dest = strtrim(select(2, strsplit(":", spellName)))
list = msgs.Portals
replacee = "%%d"
replacer = dest
if db.portchoose == "Custom" then
list = {strsplit("\n", db.customport)}
elseif db.portchoose == "Both" then
custom = {strsplit("\n", db.customport)}
end
self:CompileMessage(list, custom, replacee, replacer)
end
end
--CHECK FOR PORTALS--
if portSpellID[spellID] then
--TRIM SPELL NAME TO GET DESTINATION--
local dest = strtrim(select(2, strsplit(":", spellName)))
list = msgs.Portals
replacee = "%%d"
replacer = dest
if db.portchoose == "Custom" then
list = {strsplit("\n", db.customport)}
elseif db.portchoose == "Both" then
custom = {strsplit("\n", db.customport)}
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player and db.polyenable then
--AND AM I CASTING POLYMORPH?--
if polySpellID[spellID] then
spell = spellID
end
self:CompileMessage(list, custom, replacee, replacer)
end
--AM I CASTING?--
if eventType == "SPELL_CAST_START" and srcName == player then
--AND AM I CASTING POLYMORPH?--
if polySpellID[spellID] then
spell = spellID
end
end
--DID MY FOCUS GET POLYMORPHED?--
if eventType == "SPELL_AURA_APPLIED" and isDestFocus then
if polySpellID[spellID] then
spell2 = spellID
--WAS IT CAST BY ME?--
if spell == spell2 then
--IF PIG, THEN PIGGIE MESSAGE--
if spell2 == 28272 then
list = msgs.PolyPig
--IF TURTLE, THEN TURTLE MESSAGE--
elseif spell2 == 28271 then
list = msgs.PolyTurtle
--IF SHEEP, THEN SHEEP MESSAGE--
else
list = msgs.PolySheep
--DID MY FOCUS GET POLYMORPHED?--
if eventType == "SPELL_AURA_APPLIED" and db.polyenable and (isDestFocus or isDestTarget or (dstName == UnitName("mouseover"))) then
if polySpellID[spellID] then
spell2 = spellID
--WAS IT CAST BY ME?--
if spell == spell2 then
--IF PIG, THEN PIGGIE MESSAGE--
if spell2 == 28272 then
list = msgs.PolyPig
--IF TURTLE, THEN TURTLE MESSAGE--
elseif spell2 == 28271 then
list = msgs.PolyTurtle
--IF SHEEP, THEN SHEEP MESSAGE--
else
list = msgs.PolySheep
end
if db.polychoose == "Custom" then
list = {strsplit("\n", db.custompoly)}
elseif db.polychoose == "Both" then
custom = {strsplit("\n", db.custompoly)}
end
replacee = "%%t"
replacer = dstName
self:CompileMessage(list, custom, replacee, replacer)
--CLEAR SPELL IDs JUST IN CASE ANOTHER MAGE RESHEEPS MY FOCUS--
spell, spell2 = nil
end
if db.polychoose == "Custom" then
list = {strsplit("\n", db.custompoly)}
elseif db.polychoose == "Both" then
custom = {strsplit("\n", db.custompoly)}
end
self:CompileMessage(list, custom)
--CLEAR SPELL IDs JUST IN CASE ANOTHER MAGE RESHEEPS MY FOCUS--
spell, spell2 = nil
end
end
end
end
 
--PORTAL MESSAGES--
--[[function Mage:UNIT_SPELLCAST_START(source, spell)
--LOOK FOR PORTAL SPELL CAST BY ME--
if source == "player" and string.match(spell, L["Portal:"]) then
--TRIM SPELL NAME TO GET DESTINATION--
local dest = strtrim(select(2, strsplit(":", spell)))
list = msgs.Portals
replacee = "%%d"
replacer = dest
if db.portchoose == "Custom" then
list = {strsplit("\n", db.customport)}
elseif db.portchoose == "Both" then
custom = {strsplit("\n", db.customport)}
end
self:CompileMessage(list, custom, replacee, replacer)
end
end]]--