Commit e9f8877a authored by Darth Predator's avatar Darth Predator
Browse files

Fix rep

parent 4d5d2243
......@@ -141,6 +141,7 @@ P["sle"] = {
["rep"] = {
["longtext"] = false,
["autotrack"] = false,
["ignoreGuild"] = true,
["chatfilter"] = {
["enable"] = false,
["iconsize"] = 12,
......
......@@ -331,6 +331,8 @@ L["Full value on Rep Bar"] = true
L["Changes the way text is shown on rep bar."] = true
L["Auto Track Reputation"] = true
L["Automatically sets reputation tracking to the most recent reputation change."] = true
L["Ignore Guild Reputation"] = true
L["Ignore guild reputation gains when autotracking."] = true
L["Change the style of reputation messages."] = true
L["Reputation increase Style"] = true
L["Reputation decrease Style"] = true
......
......@@ -322,6 +322,8 @@ L["Full value on Rep Bar"] = "Voller Wert auf Rufleiste"
L["Changes the way text is shown on rep bar."] = "Ändert wie der Text auf der Rufleiste angezeigt wird"
L["Auto Track Reputation"] = "Automatisches Rufverfolgen"
L["Automatically sets reputation tracking to the most recent reputation change."] = "Setzt automatisch die Rufverfolgung zur letzten Fraktion bei der Ruf bekommen wurde."
L["Ignore Guild Reputation"] = true
L["Ignore guild reputation gains when autotracking."] = true
L["Change the style of reputation messages."] = "Ändert den Stil der Rufnachrichten."
L["Reputation increase Style"] = "Rufgewinn Stil"
L["Reputation decrease Style"] = "Rufverlust Stil"
......
......@@ -315,6 +315,8 @@ L["Full value on Rep Bar"] = "평판 바 실수치 사용"
L["Changes the way text is shown on rep bar."] = "평판 바 문자 표기 방식을 변경합니다."
L["Auto Track Reputation"] = "평판 자동 추적"
L["Automatically sets reputation tracking to the most recent reputation change."] = "가장 최근에 변화한 평판을 자동적으로 추적하도록 설정합니다."
L["Ignore Guild Reputation"] = true
L["Ignore guild reputation gains when autotracking."] = true
L["Change the style of reputation messages."] = "평판관련 메시지의 스타일을 변경합니다."
L["Reputation increase Style"] = "평판 증가 스타일"
L["Reputation decrease Style"] = "평판 감소 스타일"
......
......@@ -319,6 +319,8 @@ L["Full value on Rep Bar"] = "Полное значение репутации"
L["Changes the way text is shown on rep bar."] = "Изменяет отображение значений репутации на полосе."
L["Auto Track Reputation"] = "Автоматически отслеживать репутацию"
L["Automatically sets reputation tracking to the most recent reputation change."] = "Автоматически изменять отслеживаемую репутацию на последнюю фракцию, чье отношение к Вам изменилось."
L["Ignore Guild Reputation"] = "Игнорировать гильдию"
L["Ignore guild reputation gains when autotracking."] = "Игнорировать репутацию гильдии при автоматическом отслеживании."
L["Change the style of reputation messages."] = "Изменяет стиль сообщений о получении репутации"
L["Reputation increase Style"] = "Стиль прибавки"
L["Reputation decrease Style"] = "Стиль уменьшения"
......
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local DB = SLE:GetModule("DataBars")
local EDB = E:GetModule('DataBars')
--GLOBALS: hooksecurefunc
......@@ -41,15 +41,20 @@ DB.RepDecreaseStyles = {
["STYLE2"] = "|T"..DB.Icons.Rep..":%s|t %s: |cffD80909%s|r.",
}
T.tinsert(strMatchCombat, (T.gsub(FACTION_STANDING_INCREASED,"%%%d?%$?s", "(.+)")))
T.tinsert(strMatchCombat, (T.gsub(FACTION_STANDING_INCREASED_GENERIC,"%%%d?%$?s", "(.+)")))
T.tinsert(strMatchCombat, (T.gsub(FACTION_STANDING_INCREASED_BONUS,"%%%d?%$?s", "(.+)")))
T.tinsert(strMatchCombat, (T.gsub(FACTION_STANDING_INCREASED_DOUBLE_BONUS,"%%%d?%$?s", "(.+)")))
T.tinsert(strMatchCombat, (T.gsub(FACTION_STANDING_INCREASED_ACH_BONUS,"%%%d?%$?s", "(.+)")))
local strChangeMatch = (T.gsub(FACTION_STANDING_CHANGED,"%%%d?%$?s", "(.+)"))
local a, b, c, d = "([%(%)%.%%%+%-%*%?%[%^%$])", "%%%1", "%%%%[ds]", "(.-)"
local formatFactionStanding = function(str) return str:gsub(a, b):gsub(c, d) end
T.tinsert(strMatchCombat, (formatFactionStanding(FACTION_STANDING_INCREASED)))
T.tinsert(strMatchCombat, (formatFactionStanding(FACTION_STANDING_INCREASED_GENERIC)))
T.tinsert(strMatchCombat, (formatFactionStanding(FACTION_STANDING_INCREASED_BONUS)))
T.tinsert(strMatchCombat, (formatFactionStanding(FACTION_STANDING_INCREASED_DOUBLE_BONUS)))
T.tinsert(strMatchCombat, (formatFactionStanding(FACTION_STANDING_INCREASED_ACH_BONUS)))
local strChangeMatch = (formatFactionStanding(FACTION_STANDING_CHANGED))
local strGuildChangeMatch = {}
T.tinsert(strGuildChangeMatch, (T.gsub(FACTION_STANDING_CHANGED_GUILD,"%%%d?%$?s", "(.+)")))
T.tinsert(strGuildChangeMatch, (T.gsub(FACTION_STANDING_CHANGED_GUILDNAME,"%%%d?%$?s", "(.+)")))
T.tinsert(strGuildChangeMatch, (formatFactionStanding(FACTION_STANDING_CHANGED_GUILD)))
T.tinsert(strGuildChangeMatch, (formatFactionStanding(FACTION_STANDING_CHANGED_GUILDNAME)))
local backupColor = FACTION_BAR_COLORS[1]
local FactionStandingLabelUnknown = UNKNOWN
......@@ -109,10 +114,10 @@ function DB:ChatMsgCombat(event, ...)
for i, v in T.ipairs(strMatchCombat) do
found = (T.match(messg,strMatchCombat[i]))
if found then
if GUILD and guildName and (found == GUILD) then
if GUILD and guildName and (found == GUILD) and not DB.db.rep.ignoreGuild then
found = guildName
end
break
break
end
end
if found then
......
......@@ -93,8 +93,17 @@ local function configTable()
get = function(info) return E.db.sle.databars.rep.autotrack end,
set = function(info, value) E.db.sle.databars.rep.autotrack = value; end,
},
chatfilters = {
ignoreGuild = {
order = 4,
type = "toggle",
name = L["Ignore Guild Reputation"],
desc = L["Ignore guild reputation gains when autotracking."],
disabled = function() return not E.db.sle.databars.rep.autotrack end,
get = function(info) return E.db.sle.databars.rep.ignoreGuild end,
set = function(info, value) E.db.sle.databars.rep.ignoreGuild = value; end,
},
chatfilters = {
order = 5,
type = "group",
guiInline = true,
name = L["Chat Filters"],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment