Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ru BigBrother/BigBrother.lua BigBrother_NEW/BigBrother.lua
- --- BigBrother/BigBrother.lua 2013-09-12 20:10:11.000000000 +0100
- +++ BigBrother_NEW/BigBrother.lua 2013-09-12 19:39:54.000000000 +0100
- @@ -78,6 +78,24 @@
- self:ToggleBuffWindow()
- end
- +function addon:Print(...)
- + addon:GetSelfChatFrame(addon.db.profile.SelfChatFrame):AddMessage(strjoin(" ", tostringall(...)))
- +end
- +
- +
- +function addon:ConfirmChatFrame(msg)
- + BigBrother:Print(string.format(color, (addon.db.profile.ShortChat and "[BB]" or "[Big Brother]")) .. ": " .. L["BigBrother will use this window for self output"])
- +end
- +
- +function addon:GetSelfChatFrame(...)
- + -- return current chatframe
- + local frameid = addon.db.profile.SelfChatFrame
- + local f = getglobal("ChatFrame" .. frameid)
- + local name = GetChatWindowInfo(frameid)
- + if (not (f and string.len(name))) then f = DEFAULT_CHAT_FRAME end
- + return f
- +end
- +
- function addon:OnTextUpdate()
- self:SetText("BigBrother")
- local f = addon.minimapFrame;
- @@ -111,6 +129,8 @@
- Taunt = false,
- Interrupt = false,
- Dispel = false,
- + SelfChatFrame = 0, -- 0 = defaultchatframe/fallback
- + ShortChat = false,
- })
- -- ACE options menu
- @@ -602,6 +622,111 @@
- },
- }
- },
- + selfchatwindow = {
- + name = L["Self Chat Window"],
- + desc = L["Set which chat window to use for SELF output"],
- + type = 'group',
- + args = {
- + chatframe1 = {
- + name = "1:" .. getglobal("ChatFrame1").name,
- + desc = L["Chat Window"] .. " 1",
- + type = 'toggle',
- + order = 1,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame1") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 1; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(1); return string.len(name) == 0 end,
- + },
- + chatframe2 = {
- + name = "2:" .. getglobal("ChatFrame2").name,
- + desc = L["Chat Window"] .. " 2",
- + type = 'toggle',
- + order = 2,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame2") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 2; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(2); return string.len(name) == 0 end,
- + },
- + chatframe3 = {
- + name = "3:" .. getglobal("ChatFrame3").name,
- + desc = L["Chat Window"] .. " 3",
- + type = 'toggle',
- + order = 3,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame3") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 3; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(3); return string.len(name) == 0 end,
- + },
- + chatframe4 = {
- + name = "4:" .. getglobal("ChatFrame4").name,
- + desc = L["Chat Window"] .. " 4",
- + type = 'toggle',
- + order = 4,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame4") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 4; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(4); return string.len(name) == 0 end,
- + },
- + chatframe5 = {
- + name = "5:" .. getglobal("ChatFrame5").name,
- + desc = L["Chat Window"] .. " 5",
- + type = 'toggle',
- + order = 5,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame5") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 5; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(5); return string.len(name) == 0 end,
- + },
- + chatframe6 = {
- + name = "6:" .. getglobal("ChatFrame6").name,
- + desc = L["Chat Window"] .. " 6",
- + type = 'toggle',
- + order = 6,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame6") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 6; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(6); return string.len(name) == 0 end,
- + },
- + chatframe7 = {
- + name = "7:" .. getglobal("ChatFrame7").name,
- + desc = L["Chat Window"] .. " 7",
- + type = 'toggle',
- + order = 7,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame7") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 7; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(7); return string.len(name) == 0 end,
- + },
- + chatframe8 = {
- + name = "8:" .. getglobal("ChatFrame8").name,
- + desc = L["Chat Window"] .. " 8",
- + type = 'toggle',
- + order = 8,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame8") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 8; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(8); return string.len(name) == 0 end,
- + },
- + chatframe9 = {
- + name = "9:" .. getglobal("ChatFrame9").name,
- + desc = L["Chat Window"] .. " 9",
- + type = 'toggle',
- + order = 9,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame9") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 9; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(9); return string.len(name) == 0 end,
- + },
- + chatframe10 = {
- + name = "10:" .. getglobal("ChatFrame10").name,
- + desc = L["Chat Window"] .. " 10",
- + type = 'toggle',
- + order = 10,
- + get = function() return addon:GetSelfChatFrame() == getglobal("ChatFrame10") end,
- + set = function(v) addon.db.profile.SelfChatFrame = 10; addon:ConfirmChatFrame() end,
- + hidden = function() local name = GetChatWindowInfo(10); return string.len(name) == 0 end,
- + },
- + },
- + },
- + shortchat = {
- + name = L["Short Chat Prefix"],
- + desc = L["Shortens chat lines by changing [Big Brother] to [BB]"],
- + type = 'toggle',
- + get = function() return addon.db.profile.ShortChat end,
- + set = function(v) addon.db.profile.ShortChat = v end,
- + map = { [false] = "|cffff4040Disabled|r", [true] = "|cff40ff40Enabled|r" }
- + },
- }
- },
- buffcheck = {
- @@ -609,7 +734,7 @@
- desc = L["Pops up a window to check various raid/elixir buffs (drag the bottom to resize)."],
- type = 'execute',
- func = function() BigBrother:ToggleBuffWindow() end,
- - }
- + },
- }
- }
- @@ -1076,9 +1201,9 @@
- local output = SYMDECODE(spam, false)
- output = SPELLDECODE(output)
- local data = SYMDECODE(spam, true)
- - local link = "24Hplayer::BigBrother:"..time()..":"..data.."24h24cff8888ff[Big Brother]24r24h24h: "
- + local link = "24Hplayer::BigBrother:"..time()..":"..data.."24h24cff8888ff" .. (addon.db.profile.ShortChat and "[BB]" or "[Big Brother]") .. "24r24h24h: "
- --addon:Print(output)
- - print(link..output)
- + BigBrother:Print(link..output)
- end
- local it = select(2, IsInInstance())
- diff -ru BigBrother/locale.lua BigBrother_NEW/locale.lua
- --- BigBrother/locale.lua 2013-09-12 20:10:11.000000000 +0100
- +++ BigBrother_NEW/locale.lua 2013-09-12 19:05:29.000000000 +0100
- @@ -32,6 +32,10 @@
- Ld["Crit chance"] = "Crit chance"
- Ld["Custom"] = "Custom"
- Ld["Custom Channel"] = "Custom Channel"
- +Ld["Self Chat Window"] = "Self Chat Window"
- +Ld["Set which chat window to use for SELF output"] = "Set which chat window to use for SELF output"
- +Ld["Chat Window"] = "Chat Window"
- +Ld["BigBrother will use this window for self output"] = "BigBrother will use this window for self output"
- Ld["Damage"] = "Damage"
- Ld["Dispel"] = "Dispel"
- Ld["Electrified"] = "Electrified"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement