Skip to content

Commit 03175cc

Browse files
committed
refactor more local variables, add todo
1 parent 98b32c4 commit 03175cc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

xCT+/modules/combattext.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ x.POWER_LOOKUP = {
7171
--local format_loot = "([^|]*)|cff(%x*)|H([^:]*):(%d+):[-?%d+:]+|h%[?([^%]]*)%]|h|r?%s?x?(%d*)%.?"
7272

7373
local format_honor = string.gsub(COMBAT_TEXT_HONOR_GAINED, "%%s", "+%%s")
74-
local format_quality = "ITEM_QUALITY%s_DESC"
75-
local format_remove_realm = "(.*)-.*"
7674

77-
local format_lewtz_blind = "(%s)"
7875
local format_crafted = (LOOT_ITEM_CREATED_SELF:gsub("%%.*", "")) -- "You create: "
7976
if x.locale == "koKR" then
8077
format_crafted = (LOOT_ITEM_CREATED_SELF:gsub("%%.+ ", ""))
@@ -96,6 +93,7 @@ function x:UpdatePlayer()
9693
else
9794
x.player.unit = "player"
9895
end
96+
9997
CombatTextSetActiveUnit(x.player.unit)
10098

10199
-- Set Player's Information
@@ -105,6 +103,7 @@ end
105103

106104
--[=====================================================[
107105
Message Formatters
106+
TODO remove or sync them mit dem Spam Merger!
108107
--]=====================================================]
109108
local xCTFormat = {}
110109

@@ -236,7 +235,7 @@ nameFormatter.controllerName = function(args, settings, useSource)
236235
end
237236

238237
if settings.removeRealmName then
239-
name = string.match(name, format_remove_realm) or name
238+
name = string.match(name, "(.*)-.*") or name
240239
end
241240

242241
local color
@@ -1563,7 +1562,7 @@ EventHandlers.CHAT_MSG_LOOT = function(_, msg)
15631562
local itemQualityText = ""
15641563
if x:Options_Loot_ShowColorBlindMoney() then
15651564
-- Item Quality (Color Blind)
1566-
itemQualityText = string.format(format_lewtz_blind, _G[string.format(format_quality, itemQuality)])
1565+
itemQualityText = string.format("(%s)", _G[string.format("ITEM_QUALITY%s_DESC", itemQuality)])
15671566
end
15681567

15691568
local message

0 commit comments

Comments
 (0)