Commit 73a1cf6a authored by Darth Predator's avatar Darth Predator
Browse files

Throttle options for currency

parent 03171b6b
......@@ -306,6 +306,11 @@ P["sle"] = {
["gold"] = {
["direction"] = "normal",
["method"] = "name",
["throttle"] = {
["mode"] = "NONE",
["numChars"] = 5,
["goldAmount"] = 5000,
},
},
["cur"] = {
["direction"] = "normal",
......
......@@ -53,7 +53,6 @@ Please not that this configs may include some settings you may not yet being fam
Also it may reset/change some options you set in previous steps.]]
L["|cff1784d1%s|r role was chosen"] = true
L["Import Profile"] = true
L["AFK Mode"] = true
L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[This action can cause you to lose some of your settings.
Continue?]]
L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[This will create a profile for these addons (if enabled) and switch to it:
......@@ -465,6 +464,9 @@ L["Reversed"] = true
L["Amount"] = true
L["Order of each toon. Smaller numbers will go first"] = true
L["Tracked"] = true
L["Gold Throttle"] = true
L["Mode"] = true
L["Amount of gold needed on a character to show it in the list"] = true
--Enhanced Shadows
L["Enhanced Shadows"] = true
......
......@@ -53,7 +53,6 @@ Bitte beachte dass diese Konfiguration vielleicht einige Einstellungen beinhalte
Auch könnte es auch einige Optionen zurücksetzen/ändern die du den vorherigen Schritten ausgewählt hast.]]
L["|cff1784d1%s|r role was chosen"] = "|cff1784d1%s|r Rolle wurde ausgewählt"
L["Import Profile"] = "Profil importieren"
L["AFK Mode"] = true
L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[Diese Aktion könnte bewirken dass du einige Einstellungen verlierst.
Fortfahren?]]
L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[Dieses wird ein Profil für diese Addons erstellen (wenn aktiviert) und zum erstellten Profil wechseln:
......@@ -456,6 +455,9 @@ L["Reversed"] = "Umgekehrt"
L["Amount"] = "Anzahl"
L["Order of each toon. Smaller numbers will go first"] = "Anordnung von jedem Twink. Kleiner Zahlen werden zu erst angezeigt."
L["Tracked"] = "Verfolgt"
L["Gold Throttle"] = true
L["Mode"] = true
L["Amount of gold needed on a character to show it in the list"] = true
--Enhanced Shadows
L["Enhanced Shadows"] = "Erweiterte Schatten"
......
......@@ -52,7 +52,6 @@ Please not that this configs may include some settings you may not yet being fam
Also it may reset/change some options you set in previous steps.]]
L["|cff1784d1%s|r role was chosen"] = "|cff1784d1%s|r 역할 선택됨"
L["Import Profile"] = "프로필 불러오기"
L["AFK Mode"] = "자리비움 모드"
L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[This action can cause you to lose some of your settings.
Continue?]]
L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[This will create a profile for these addons (if enabled) and switch to it:
......@@ -449,6 +448,9 @@ L["Reversed"] = '반대로"'
L["Amount"] = "수량"
L["Order of each toon. Smaller numbers will go first"] = true
L["Tracked"] = true
L["Gold Throttle"] = true
L["Mode"] = true
L["Amount of gold needed on a character to show it in the list"] = true
--Enhanced Shadows
L["Enhanced Shadows"] = "그림자 향상"
......
......@@ -52,7 +52,6 @@ L["SLE_INSTALL_LAYOUT_TEXT2"] = [[Данные опции импортируют
Также это пожет сбросить/изменить некоторые из опций, выбранных вами на предыдущих шагах.]]
L["|cff1784d1%s|r role was chosen"] = 'Была выбрана роль |cff1784d1"%s"|r.'
L["Import Profile"] = "Импорт профиля"
L["AFK Mode"] = "Режим АФК"
L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[Это действие может привести к потере некоторых ваших настроек.
Продолжить?]]
L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[Это действие создаст профили для следующих аддонов (если они включены) и переключится на них:
......@@ -455,6 +454,9 @@ L["Reversed"] = "Обратная"
L["Amount"] = "Количество"
L["Order of each toon. Smaller numbers will go first"] = "Порядок персонажей. Показ в порядке возрастания номера."
L["Tracked"] = "Отслеживание"
L["Gold Throttle"] = "Фильтрация золота"
L["Mode"] = "Режим"
L["Amount of gold needed on a character to show it in the list"] = "Кол-во золота, которое должно быть на персонаже, чтобы он отображался в списке."
--Enhanced Shadows
L["Enhanced Shadows"] = "Улучшенные тени"
......
......@@ -105,7 +105,7 @@ local MiscellaneousCurrency = {
1154, --Shadowy Coins
1268, --Timeworn Artifact
1342, --Legionfall war supplies
1506, --Argus Waystone
-- 1506, --Argus Waystone
1299, --Brawler's Gold
1508, --Veiled Argunite
1533, --Wakening Essence
......@@ -353,15 +353,17 @@ local function OnEnter(self)
local class = ElvDB["class"][E.myrealm][k]
local color = RAID_CLASS_COLORS[class or "PRIEST"]
local order = E.private.sle.characterGoldsSorting[E.myrealm][k] or 1
T.tinsert(ShownGold,
{
name = k,
amount = ElvDB["gold"][E.myrealm][k],
amountText = E:FormatMoney(ElvDB["gold"][E.myrealm][k], E.db.datatexts.goldFormat or "BLIZZARD", not E.db.datatexts.goldCoins),
r = color.r, g = color.g, b =color.b,
order = order,
}
)
if k == E.myname or E.db.sle.dt.currency.gold.throttle.mode ~= "AMOUNT" or (E.db.sle.dt.currency.gold.throttle.mode == "AMOUNT" and ElvDB["gold"][E.myrealm][k] >= (E.db.sle.dt.currency.gold.throttle.goldAmount * 10000)) then
T.tinsert(ShownGold,
{
name = k,
amount = ElvDB["gold"][E.myrealm][k],
amountText = E:FormatMoney(ElvDB["gold"][E.myrealm][k], E.db.datatexts.goldFormat or "BLIZZARD", not E.db.datatexts.goldCoins),
r = color.r, g = color.g, b =color.b,
order = order,
}
)
end
if ElvDB["faction"][E.myrealm]["Alliance"][k] then
AllianceGold = AllianceGold + ElvDB["gold"][E.myrealm][k]
end
......@@ -373,8 +375,10 @@ local function OnEnter(self)
end
sort(ShownGold, SortGold)
for i = 1, #ShownGold do
local t = ShownGold[i]
DT.tooltip:AddDoubleLine(t.name == E.myname and t.name.." |TInterface\\RAIDFRAME\\ReadyCheck-Ready:12|t" or t.name, t.amountText, t.r, t.g, t.b, 1, 1, 1)
if E.db.sle.dt.currency.gold.throttle.mode ~= "CHAR" or (E.db.sle.dt.currency.gold.throttle.mode == "CHAR" and i <= E.db.sle.dt.currency.gold.throttle.numChars) or ShownGold[i].name == E.myname then
local t = ShownGold[i]
DT.tooltip:AddDoubleLine(t.name == E.myname and t.name.." |TInterface\\RAIDFRAME\\ReadyCheck-Ready:12|t" or t.name, t.amountText, t.r, t.g, t.b, 1, 1, 1)
end
end
DT.tooltip:AddLine(' ')
......@@ -412,7 +416,7 @@ local function OnEnter(self)
local DaToken = C_WowTokenPublic.GetCurrentMarketPrice()
if DaToken and DaToken ~= "" then
DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine(ITEM_QUALITY8_DESC.."|TInterface\\Icons\\WoW_Token01:12:12:0:0:64:64:4:60:4:60|t", E:FormatMoney(DaToken, "SHORTINT", not E.db.datatexts.goldCoins), 1, 1, 1)
DT.tooltip:AddDoubleLine(ITEM_QUALITY8_DESC.."|TInterface\\Icons\\WoW_Token01:12:12:0:0:64:64:4:60:4:60|t", E:FormatMoney(DaToken, E.db.datatexts.goldFormat or "BLIZZARD", not E.db.datatexts.goldCoins), 1, 1, 1, 1, 1, 1)
end
end
......
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local CHARACTER, NONE = CHARACTER, NONE
local function configTable()
if not SLE.initialized then return end
......@@ -32,7 +34,7 @@ local function configTable()
local function CreateCustomToonList()
local config = {
name = CUSTOM,
order = 3,
order = 10,
type = "group",
guiInline = true,
hidden = function() return E.db.sle.dt.currency.gold.method ~= "order" end,
......@@ -148,6 +150,40 @@ local function configTable()
["order"] = CUSTOM,
},
},
throttle = {
order = 3,
type = "group",
name = L["Gold Throttle"],
get = function(info) return E.db.sle.dt.currency.gold.throttle[ info[#info] ] end,
set = function(info, value) E.db.sle.dt.currency.gold.throttle[ info[#info] ] = value end,
args = {
mode = {
order = 1,
name = L["Mode"],
type = "select",
values = {
["NONE"] = NONE,
["AMOUNT"] = L["Amount"],
["CHAR"] = CHARACTER,
},
},
goldAmount = {
order = 2,
type = "range",
name = L["Amount"],
desc = L["Amount of gold needed on a character to show it in the list"],
min = 0, max = 1000000, step = 1,
hidden = function() return E.db.sle.dt.currency.gold.throttle.mode ~= "AMOUNT" end,
},
numChars = {
order = 2,
type = "range",
name = CHARACTER,
min = 1, max = 20, step = 1,
hidden = function() return E.db.sle.dt.currency.gold.throttle.mode ~= "CHAR" end,
},
},
},
customSort = CreateCustomToonList(),
},
},
......
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