Verified Commit 13d3cc30 authored by Repooc's avatar Repooc
Browse files

clean up

parent 8e5662a4
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local SLE, _, E = unpack(select(2, ...))
local DB = SLE:GetModule('DataBars')
local EDB = E:GetModule('DataBars')
......
......@@ -3,52 +3,53 @@ local DB = SLE:GetModule("DataBars")
local EDB = E:GetModule('DataBars')
--GLOBALS: unpack, select, hooksecurefunc
local format = format
local COMBATLOG_XPGAIN_FIRSTPERSON, COMBATLOG_XPGAIN_FIRSTPERSON_UNNAMED = COMBATLOG_XPGAIN_FIRSTPERSON, COMBATLOG_XPGAIN_FIRSTPERSON_UNNAMED
local COMBATLOG_XPGAIN_EXHAUSTION1, COMBATLOG_XPGAIN_EXHAUSTION2, COMBATLOG_XPGAIN_EXHAUSTION4, COMBATLOG_XPGAIN_EXHAUSTION5 = COMBATLOG_XPGAIN_EXHAUSTION1, COMBATLOG_XPGAIN_EXHAUSTION2, COMBATLOG_XPGAIN_EXHAUSTION4, COMBATLOG_XPGAIN_EXHAUSTION5
local COMBATLOG_XPGAIN_EXHAUSTION1_GROUP, COMBATLOG_XPGAIN_EXHAUSTION2_GROUP, COMBATLOG_XPGAIN_EXHAUSTION4_GROUP, COMBATLOG_XPGAIN_EXHAUSTION5_GROUP = COMBATLOG_XPGAIN_EXHAUSTION1_GROUP, COMBATLOG_XPGAIN_EXHAUSTION2_GROUP, COMBATLOG_XPGAIN_EXHAUSTION4_GROUP, COMBATLOG_XPGAIN_EXHAUSTION5_GROUP
local COMBATLOG_XPGAIN_EXHAUSTION1_RAID, COMBATLOG_XPGAIN_EXHAUSTION2_RAID, COMBATLOG_XPGAIN_EXHAUSTION4_RAID, COMBATLOG_XPGAIN_EXHAUSTION5_RAID = COMBATLOG_XPGAIN_EXHAUSTION1_RAID, COMBATLOG_XPGAIN_EXHAUSTION2_RAID, COMBATLOG_XPGAIN_EXHAUSTION4_RAID, COMBATLOG_XPGAIN_EXHAUSTION5_RAID
local COMBATLOG_XPGAIN_FIRSTPERSON_GROUP, COMBATLOG_XPGAIN_FIRSTPERSON_RAID = COMBATLOG_XPGAIN_FIRSTPERSON_GROUP, COMBATLOG_XPGAIN_FIRSTPERSON_RAID
local GetXPExhaustion = GetXPExhaustion
local UnitXP, UnitXPMax = UnitXP, UnitXPMax
local UnitXP, UnitXPMax, GetXPExhaustion = UnitXP, UnitXPMax, GetXPExhaustion
local GROUP, RAID = GROUP, RAID
DB.Exp = {
Strings = {
["NoName"] = {},
["Normal"] = {},
["Bonus"] = {},
["BonusGroup"] = {},
["BonusRaid"] = {},
["Penalty"] = {},
["PenaltyGroup"] = {},
["PenaltyRaid"] = {},
["FirstBonus"] = {},
["FirstPenalty"] = {},
NoName = {},
Normal = {},
Bonus = {},
BonusGroup = {},
BonusRaid = {},
Penalty = {},
PenaltyGroup = {},
PenaltyRaid = {},
FirstBonus = {},
FirstPenalty = {},
},
Styles = {
["STYLE1"] = {
["NoName"] = "|T"..DB.Icons.XP..":%s|t +%s",
["Normal"] = "|T"..DB.Icons.XP..":%s|t %s: +%s",
["Bonus"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (%s %s)",
["BonusGroup"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (%s %s, +%s "..GROUP..")",
["BonusRaid"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (%s %s, -%s "..RAID..")",
["Penalty"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (-%s %s)",
["PenaltyGroup"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (-%s %s, +%s "..GROUP..")",
["PenaltyRaid"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (-%s %s, -%s "..RAID..")",
["FirstBonus"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (%s "..GROUP..")",
["FirstPenalty"] = "|T"..DB.Icons.XP..":%s|t %s: +%s (-%s "..RAID..")",
STYLE1 = {
NoName = '|T'..DB.Icons.XP..':%s|t +%s',
Normal = '|T'..DB.Icons.XP..':%s|t %s: +%s',
Bonus = '|T'..DB.Icons.XP..':%s|t %s: +%s (%s %s)',
BonusGroup = '|T'..DB.Icons.XP..':%s|t %s: +%s (%s %s, +%s '..GROUP..')',
BonusRaid = '|T'..DB.Icons.XP..':%s|t %s: +%s (%s %s, -%s '..RAID..')',
Penalty = '|T'..DB.Icons.XP..':%s|t %s: +%s (-%s %s)',
PenaltyGroup = '|T'..DB.Icons.XP..':%s|t %s: +%s (-%s %s, +%s '..GROUP..')',
PenaltyRaid = '|T'..DB.Icons.XP..':%s|t %s: +%s (-%s %s, -%s '..RAID..')',
FirstBonus = '|T'..DB.Icons.XP..':%s|t %s: +%s (%s '..GROUP..')',
FirstPenalty = '|T'..DB.Icons.XP..':%s|t %s: +%s (-%s '..RAID..')',
},
["STYLE2"] = {
["NoName"] = "|T"..DB.Icons.XP..":%s|t |cff0CD809+%s|r ",
["Normal"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r",
["Bonus"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s)",
["BonusGroup"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s, +%s "..GROUP..")",
["BonusRaid"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s, -%s "..RAID..")",
["Penalty"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (-%s %s)",
["PenaltyGroup"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (-%s %s, +%s "..GROUP..")",
["PenaltyRaid"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (-%s %s, -%s "..RAID..")",
["FirstBonus"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (%s "..GROUP..")",
["FirstPenalty"] = "|T"..DB.Icons.XP..":%s|t %s: |cff0CD809+%s|r (-%s "..RAID..")",
STYLE2 = {
NoName = '|T'..DB.Icons.XP..':%s|t |cff0CD809+%s|r ',
Normal = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r',
Bonus = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s)',
BonusGroup = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s, +%s '..GROUP..')',
BonusRaid = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (|cff0CD809%s|r %s, -%s '..RAID..')',
Penalty = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (-%s %s)',
PenaltyGroup = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (-%s %s, +%s '..GROUP..')',
PenaltyRaid = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (-%s %s, -%s '..RAID..')',
FirstBonus = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (%s '..GROUP..')',
FirstPenalty = '|T'..DB.Icons.XP..':%s|t %s: |cff0CD809+%s|r (-%s '..RAID..')',
},
}
}
......@@ -103,63 +104,64 @@ end
function DB:PopulateExpPatterns()
local symbols = {'%(','%)','%.','([-+])','|4.-;','%%[sd]','%%%d%$[sd]','%%(','%%)','%%.','%%%1','.-','(.-)','(.-)'}
local pattern
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON_UNNAMED, unpack(symbols));
tinsert(DB.Exp.Strings.NoName, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON, unpack(symbols))
tinsert(DB.Exp.Strings.Normal, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1, unpack(symbols))
tinsert(DB.Exp.Strings.Bonus, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2, unpack(symbols))
tinsert(DB.Exp.Strings.Bonus, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4, unpack(symbols))
tinsert(DB.Exp.Strings.Penalty, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5, unpack(symbols))
tinsert(DB.Exp.Strings.Penalty, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1_GROUP,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1_GROUP, unpack(symbols))
tinsert(DB.Exp.Strings.BonusGroup, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2_GROUP,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2_GROUP, unpack(symbols))
tinsert(DB.Exp.Strings.BonusGroup, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4_GROUP,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4_GROUP, unpack(symbols))
tinsert(DB.Exp.Strings.PenaltyGroup, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5_GROUP,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5_GROUP, unpack(symbols))
tinsert(DB.Exp.Strings.PenaltyGroup, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1_RAID,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION1_RAID, unpack(symbols))
tinsert(DB.Exp.Strings.BonusRaid, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2_RAID,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION2_RAID, unpack(symbols))
tinsert(DB.Exp.Strings.BonusRaid, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4_RAID,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION4_RAID, unpack(symbols))
tinsert(DB.Exp.Strings.PenaltyRaid, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5_RAID,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_EXHAUSTION5_RAID, unpack(symbols))
tinsert(DB.Exp.Strings.PenaltyRaid, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON_GROUP,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON_GROUP, unpack(symbols))
tinsert(DB.Exp.Strings.FirstBonus, pattern)
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON_RAID,unpack(symbols))
pattern = T.rgsub(COMBATLOG_XPGAIN_FIRSTPERSON_RAID, unpack(symbols))
tinsert(DB.Exp.Strings.FirstPenalty, pattern)
end
function DB:FilterExperience(_, message, ...)
local name, exp, bonus, reason, addbonus
if DB.db.experience.chatfilter.enable then
if E.db.sle.databars.experience.chatfilter.enable then
for type, patterns in pairs(DB.Exp.Strings) do
for i = 1, #patterns do
name, exp, bonus, reason, addbonus = strmatch(message, "^"..DB.Exp.Strings[type][i].."$")
name, exp, bonus, reason, addbonus = strmatch(message, '^'..DB.Exp.Strings[type][i]..'$')
if name then
message = format(DB.Exp.Styles[DB.db.experience.chatfilter.style][type] , DB.db.experience.chatfilter.iconsize, name, exp, SLE.Russian and reason or bonus, SLE.Russian and bonus or reason, addbonus)
message = format(DB.Exp.Styles[E.db.sle.databars.experience.chatfilter.style][type] , E.db.sle.databars.experience.chatfilter.iconsize, name, exp, SLE.Russian and reason or bonus, SLE.Russian and bonus or reason, addbonus)
return false, message, ...
end
end
......@@ -173,5 +175,5 @@ end
function DB:ExpInit()
DB:PopulateExpPatterns()
hooksecurefunc(EDB, "ExperienceBar_Update", UpdateExperience)
hooksecurefunc(EDB, 'ExperienceBar_Update', UpdateExperience)
end
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local SLE, T, E, L = unpack(select(2, ...))
local DB = SLE:GetModule("DataBars")
local EDB = E:GetModule('DataBars')
......@@ -6,56 +6,55 @@ local EDB = E:GetModule('DataBars')
local format = format
local UnitLevel = UnitLevel
local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL
local PVP_HONOR_PRESTIGE_AVAILABLE = PVP_HONOR_PRESTIGE_AVAILABLE
local MAX_HONOR_LEVEL = MAX_HONOR_LEVEL
local COMBATLOG_HONORGAIN, COMBATLOG_HONORGAIN_NO_RANK, COMBATLOG_HONORAWARD = COMBATLOG_HONORGAIN, COMBATLOG_HONORGAIN_NO_RANK, COMBATLOG_HONORAWARD
local PVP_RANK_0_0 = PVP_RANK_0_0
local UnitHonor, UnitHonorMax = UnitHonor, UnitHonorMax
DB.Honor ={
Styles = {
["STYLE1"] = "%s <%s>: +%s|T%s:%s|t",
["STYLE2"] = "%s <%s>: +"..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE3"] = E["media"].hexvaluecolor.."%s|r <%s>: +"..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE4"] = "%s <%s> +%s|T%s:%s|t",
["STYLE5"] = "%s <%s> +"..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE6"] = E["media"].hexvaluecolor.."%s|r <%s> +"..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE7"] = "%s <%s> (%s|T%s:%s|t)",
["STYLE8"] = "%s <%s> ("..E["media"].hexvaluecolor.."%s|r|T%s:%s|t)",
["STYLE9"] = E["media"].hexvaluecolor.."%s|r <%s> ("..E["media"].hexvaluecolor.."%s|r|T%s:%s|t)",
STYLE1 = '%s <%s>: +%s|T%s:%s|t',
STYLE2 = '%s <%s>: +'..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE3 = E['media'].hexvaluecolor..'%s|r <%s>: +'..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE4 = '%s <%s> +%s|T%s:%s|t',
STYLE5 = '%s <%s> +'..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE6 = E['media'].hexvaluecolor..'%s|r <%s> +'..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE7 = '%s <%s> (%s|T%s:%s|t)',
STYLE8 = '%s <%s> ('..E['media'].hexvaluecolor..'%s|r|T%s:%s|t)',
STYLE9 = E['media'].hexvaluecolor..'%s|r <%s> ('..E['media'].hexvaluecolor..'%s|r|T%s:%s|t)',
},
BonusStyles = {
["STYLE1"] = "%s <%s>: +%s (+%s)|T%s:%s|t",
["STYLE2"] = "%s <%s>: +"..E["media"].hexvaluecolor.."%s|r ("..E["media"].hexvaluecolor.."%s|r)|T%s:%s|t",
["STYLE3"] = E["media"].hexvaluecolor.."%s|r <%s>: +"..E["media"].hexvaluecolor.."%s|r ("..E["media"].hexvaluecolor.."%s|r) |T%s:%s|t",
["STYLE4"] = "%s <%s> +%s (%s)|T%s:%s|t",
["STYLE5"] = "%s <%s> +"..E["media"].hexvaluecolor.."%s|r ("..E["media"].hexvaluecolor.."%s|r)|T%s:%s|t",
["STYLE6"] = E["media"].hexvaluecolor.."%s|r <%s> +"..E["media"].hexvaluecolor.."%s|r ("..E["media"].hexvaluecolor.."%s|r)|T%s:%s|t",
["STYLE7"] = "%s <%s> (%s %s|T%s:%s|t)",
["STYLE8"] = "%s <%s> ("..E["media"].hexvaluecolor.."%s|r "..E["media"].hexvaluecolor.."%s|r|T%s:%s|t)",
["STYLE9"] = E["media"].hexvaluecolor.."%s|r <%s> ("..E["media"].hexvaluecolor.."%s|r"..E["media"].hexvaluecolor.."%s|r|T%s:%s|t)",
STYLE1 = '%s <%s>: +%s (+%s)|T%s:%s|t',
STYLE2 = '%s <%s>: +'..E['media'].hexvaluecolor..'%s|r ('..E['media'].hexvaluecolor..'%s|r)|T%s:%s|t',
STYLE3 = E['media'].hexvaluecolor..'%s|r <%s>: +'..E['media'].hexvaluecolor..'%s|r ('..E['media'].hexvaluecolor..'%s|r) |T%s:%s|t',
STYLE4 = '%s <%s> +%s (%s)|T%s:%s|t',
STYLE5 = '%s <%s> +'..E['media'].hexvaluecolor..'%s|r ('..E['media'].hexvaluecolor..'%s|r)|T%s:%s|t',
STYLE6 = E['media'].hexvaluecolor..'%s|r <%s> +'..E['media'].hexvaluecolor..'%s|r ('..E['media'].hexvaluecolor..'%s|r)|T%s:%s|t',
STYLE7 = '%s <%s> (%s %s|T%s:%s|t)',
STYLE8 = '%s <%s> ('..E['media'].hexvaluecolor..'%s|r '..E['media'].hexvaluecolor..'%s|r|T%s:%s|t)',
STYLE9 = E['media'].hexvaluecolor..'%s|r <%s> ('..E['media'].hexvaluecolor..'%s|r'..E['media'].hexvaluecolor..'%s|r|T%s:%s|t)',
},
AwardStyles = {
["STYLE1"] = L["Award"]..": %s|T%s:%s|t",
["STYLE2"] = L["Award"]..": "..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE3"] = "|TInterface\\Icons\\Achievement_PVP_O_15:14:14|t: %s|T%s:%s|t",
["STYLE4"] = "|TInterface\\Icons\\Achievement_PVP_O_15:14:14|t: "..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
["STYLE5"] = "|TInterface\\Icons\\ACHIEVEMENT_GUILDPERK_MRPOPULARITY_RANK2:14:14|t: %s|T%s:%s|t",
["STYLE6"] = "|TInterface\\Icons\\ACHIEVEMENT_GUILDPERK_MRPOPULARITY_RANK2:14:14|t: "..E["media"].hexvaluecolor.."%s|r|T%s:%s|t",
STYLE1 = L['Award']..': %s|T%s:%s|t',
STYLE2 = L['Award']..': '..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE3 = '|TInterface\\Icons\\Achievement_PVP_O_15:14:14|t: %s|T%s:%s|t',
STYLE4 = '|TInterface\\Icons\\Achievement_PVP_O_15:14:14|t: '..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
STYLE5 = '|TInterface\\Icons\\ACHIEVEMENT_GUILDPERK_MRPOPULARITY_RANK2:14:14|t: %s|T%s:%s|t',
STYLE6 = '|TInterface\\Icons\\ACHIEVEMENT_GUILDPERK_MRPOPULARITY_RANK2:14:14|t: '..E['media'].hexvaluecolor..'%s|r|T%s:%s|t',
},
Strings = {},
Icon = [[Interface\AddOns\ElvUI_SLE\media\textures\]]..E.myfaction,
}
local function HonorBar_Update(self, event, unit)
if not E.db.databars.honor.enable then return end
if not E.db.sle.databars.honor.longtext then return end
if event == "HONOR_PRESTIGE_UPDATE" and unit ~= "player" then return end
if not E.db.databars.honor.enable or not E.db.sle.databars.honor.longtext then return end
if event == 'HONOR_PRESTIGE_UPDATE' and unit ~= 'player' then return end
local bar = EDB.StatusBars.Honor
local showHonor = UnitLevel("player") >= MAX_PLAYER_LEVEL
local showHonor = UnitLevel('player') >= MAX_PLAYER_LEVEL
if showHonor then
local current = UnitHonor("player");
local max = UnitHonorMax("player");
local current = UnitHonor('player');
local max = UnitHonorMax('player');
--Guard against division by zero, which appears to be an issue when zoning in/out of dungeons
if max == 0 then max = 1 end
......@@ -119,17 +118,17 @@ function DB:FilterHonor(event, message, ...)
rank = PVP_RANK_0_0
end
if bonus then
message = format(DB.Honor.BonusStyles[DB.db.honor.chatfilter.style or "STYLE1"], name, rank, honor, bonus, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
message = format(DB.Honor.BonusStyles[DB.db.honor.chatfilter.style or 'STYLE1'], name, rank, honor, bonus, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
else
message = format(DB.Honor.Styles[DB.db.honor.chatfilter.style or "STYLE1"], name, rank, honor, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
message = format(DB.Honor.Styles[DB.db.honor.chatfilter.style or 'STYLE1'], name, rank, honor, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
end
return false, message, ...
end
end
end
honor = strmatch(message,AwardPattern)
honor = strmatch(message, AwardPattern)
if honor then
message = format(DB.Honor.AwardStyles[DB.db.honor.chatfilter.awardStyle or "STYLE1"], honor, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
message = format(DB.Honor.AwardStyles[DB.db.honor.chatfilter.awardStyle or 'STYLE1'], honor, DB.Honor.Icon, DB.db.honor.chatfilter.iconsize)
return false, message, ...
end
end
......@@ -138,4 +137,4 @@ function DB:HonorInit()
DB:PopulateHonorStrings()
hooksecurefunc(EDB, "HonorBar_Update", HonorBar_Update)
EDB:HonorBar_Update()
end
\ No newline at end of file
end
......@@ -62,8 +62,8 @@ local function configTable()
name = L["Experience Style"],
disabled = function() return not E.db.sle.databars.experience.chatfilter.enable end,
values = {
["STYLE1"] = format(DB.Exp.Styles["STYLE1"]["Bonus"], 12, E.myname, 300, 150, SCENARIO_BONUS_LABEL),
["STYLE2"] = format(DB.Exp.Styles["STYLE2"]["Bonus"], 12, E.myname, 300, 150, SCENARIO_BONUS_LABEL),
["STYLE1"] = format(DB.Exp.Styles["STYLE1"]["Bonus"], 11, E.myname, 300, 150, SCENARIO_BONUS_LABEL),
["STYLE2"] = format(DB.Exp.Styles["STYLE2"]["Bonus"], 11, E.myname, 300, 150, SCENARIO_BONUS_LABEL),
},
},
},
......
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