Skip to content
Permalink
Browse files

LiteStats update

Clock:
* Added 5man Mythic tracking
* Added tracking of number of seals for current week

New Currency tab:
* Show Archaeology under currency tab
* Show Coocking under currency tab
* Show Professions under currency tab
* Show Seals under currency tab
* Show PvP under currency tab
* Show Miscellaneous under currency tab, like Oil
  • Loading branch information
ViksUI committed Jul 24, 2015
1 parent eb7c91b commit 2d6e61e91cbd7581f3f6e9e2fd8c16730c144cf2
@@ -194,6 +194,12 @@ LPSTAT_CONFIG = {
tip_x = cBN and 0 or C.bag.enable and -50 or -21,
tip_y = cBN and 85 or C.bag.enable and 0 or 20
},
Gold2 = {
enabled = true,
style = 2, -- Display styles: [1] 55g 21s 11c [2] 8829.4g [3] 823.55.94
anchor_frame = "Location", anchor_to = "right", anchor_from = "left",
x_off = -20, y_off = 0, tip_frame = "UIParent", tip_anchor = "BOTTOMRIGHT", tip_x = -21, tip_y = 20
},
}

LPSTAT_PROFILES = {
@@ -532,6 +532,14 @@ C["stats"] = {
["experience"] = true, -- Experience
["coords"] = true, -- Coords
["location"] = true, -- Location
["currency"] = true, -- Currency
["CurrArchaeology"] = false, -- Show Archaeology under currency tab
["CurrCooking"] = false, -- Show Coocking under currency tab
["CurrProfessions"] = false, -- Show Professions under currency tab
["CurrRaid"] = true, -- Show Seals under currency tab
["CurrPvP"] = false, -- Show PvP under currency tab
["CurrMiscellaneous"] = true, -- Show Miscellaneous under currency tab

}

----------------------------------------------------------------------------------------
@@ -38,6 +38,7 @@ local latency = modules.Latency
local memory = modules.Memory
local durability = modules.Durability
local gold = modules.Gold
local gold2 = modules.Gold2
local clock = modules.Clock
local location = modules.Location
local coords = modules.Coords
@@ -592,6 +593,155 @@ if gold.enabled then
end
end

----------------------------------------------------------------------------------------
-- Gold2
----------------------------------------------------------------------------------------
if gold.enabled then
local function Currency(id, weekly, capped)
local name, amount, tex, week, weekmax, maxed, discovered = GetCurrencyInfo(id)
local r, g, b = 1, 1, 1
for i = 1, GetNumWatchedTokens() do
local _, _, _, itemID = GetBackpackCurrencyInfo( i )
if id == itemID then r, g, b = .77, .12, .23 end
end
if (amount == 0 and r == 1) then return end
if weekly then
if discovered then GameTooltip:AddDoubleLine("\124T" .. tex .. ":12\124t " .. name, "Current: " .. amount .. " - " .. WEEKLY .. ": " .. week .. " / " .. weekmax, r, g, b, r, g, b) end
elseif capped then
if id == 392 then maxed = 4000 end
if discovered then GameTooltip:AddDoubleLine("\124T" .. tex .. ":12\124t " .. name, amount .. " / " .. maxed, r, g, b, r, g, b) end
else
if discovered then GameTooltip:AddDoubleLine("\124T" .. tex .. ":12\124t " .. name, amount, r, g, b, r, g, b) end
end
end
Inject("Gold2", {
OnLoad = function(self)
self.started = GetMoney()
RegEvents(self, "PLAYER_LOGIN PLAYER_MONEY MERCHANT_SHOW")
if not SavedStats.JunkIgnore then SavedStats.JunkIgnore = {} end
end,
OnEvent = function(self, event)
conf.Gold2 = GetMoney()
self.text:SetText(formatgold(2, conf.Gold2))
end,
OnEnter = function(self)
local curgold = GetMoney()
local prof1, prof2, archaeology, _, cooking = GetProfessions()
conf.Gold2 = curgold
GameTooltip:SetOwner(self, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:SetPoint(gold2.tip_anchor, gold2.tip_frame, gold2.tip_x, gold2.tip_y)
GameTooltip:ClearLines()
GameTooltip:AddLine(CURRENCY, tthead.r, tthead.g, tthead.b)
GameTooltip:AddLine(" ")
if self.started ~= curgold then
local gained = curgold > self.started
local color = gained and "|cff55ff55" or "|cffff5555"
GameTooltip:AddDoubleLine(L_STATS_SESSION_GAIN, format("%s$|r %s %s$|r", color, formatgold(1, abs(self.started - curgold)), color), 1, 1, 1, 1, 1, 1)
GameTooltip:AddLine(" ")
end
GameTooltip:AddLine(L_STATS_SERVER_GOLD, ttsubh.r, ttsubh.g, ttsubh.b)
local total = 0
for char, conf in pairs(SavedStats[realm]) do
if conf.Gold2 and conf.Gold2 > 99 then
GameTooltip:AddDoubleLine(char, formatgold(1, conf.Gold2), 1, 1, 1, 1, 1, 1)
total = total + conf.Gold2
end
end
GameTooltip:AddDoubleLine(" ", "-----------------", 1, 1, 1, 0.5, 0.5, 0.5)
GameTooltip:AddDoubleLine(TOTAL, formatgold(1, total), ttsubh.r, ttsubh.g, ttsubh.b, 1, 1, 1)
GameTooltip:AddLine(" ")

local currencies = 0
for i = 1, GetCurrencyListSize() do
local name, _, _, _, watched, count, icon = GetCurrencyListInfo(i)
if watched then
if currencies == 0 then GameTooltip:AddLine(format("%s %s", STATUS_TEXT_PLAYER, CURRENCY), ttsubh.r, ttsubh.g, ttsubh.b) end
local r, g, b
if count > 0 then r, g, b = 1, 1, 1 else r, g, b = 0.5, 0.5, 0.5 end
GameTooltip:AddDoubleLine(name, format("%d |T%s:"..t_icon..":"..t_icon..":0:0:64:64:5:59:5:59:%d|t", count, icon, t_icon), r, g, b, r, g, b)
currencies = currencies + 1
end
end
if currencies > 0 then GameTooltip:AddLine(" ") end
if archaeology and C.stats.CurrArchaeology then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(PROFESSIONS_ARCHAEOLOGY .. ": ", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(398)
Currency(384)
Currency(393)
Currency(677)
Currency(400)
Currency(394)
Currency(397)
Currency(676)
Currency(401)
Currency(385)
Currency(399)
Currency(829)
Currency(944)
Currency(810)
Currency(821)
Currency(754)
Currency(677)
Currency(676)
end

if cooking and C.stats.CurrCooking then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(PROFESSIONS_COOKING .. ": ", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(81)
Currency(402)
end

if C.stats.CurrProfessions then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(L_STATS_CURRENCY_PROFESSIONS_T..":", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(910) --Secret of Draenor Alchemy
Currency(1020) --Secret of Draenor Blacksmithing
Currency(1008) --Secret of Draenor Jewelcrafting
Currency(1017) --Secret of Draenor Leatherworking
Currency(999) --Secret of Draenor Tailoring

end

if C.stats.CurrRaid then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(L_STATS_CURRENCY_RAID_T..": ", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(1129, false, true) --Seal of Inevitable Fate
Currency(994, false, true) --Seal of Tempered Fate
end

if C.stats.CurrPvP then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(PVP_FLAG..":", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(390, true) --Conquest Points
Currency(392, false, true) --Honor Points
end

if C.stats.CurrMiscellaneous then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(MISCELLANEOUS..":", ttsubh.r, ttsubh.g, ttsubh.b)
Currency(515) --Darkmoon Prize Ticket
Currency(944, false, true) --Artifact Fragment
Currency(980, false, true) --Dingy Iron Coins (Rogue)
Currency(824, false, true) --Garrison Resources
Currency(823) --Apexis Crystal
Currency(1101) --Oil
end
GameTooltip:AddDoubleLine(" ", L_STATS_AUTO_SELL..": "..(conf.AutoSell and "|cff55ff55"..L_STATS_ON or "|cffff5555"..strupper(OFF)), 1, 1, 1, ttsubh.r, ttsubh.g, ttsubh.b)
GameTooltip:Show()
end,
OnClick = function(self, button)
if button == "LeftButton" then
ToggleCharacter("TokenFrame")
elseif button == "RightButton" then
conf.AutoSell = not conf.AutoSell
self:GetScript("OnEnter")(self)
end
end
})
end
----------------------------------------------------------------------------------------
-- Clock
----------------------------------------------------------------------------------------
@@ -648,12 +798,12 @@ if clock.enabled then
local oneraid
local heroicDifficulty = {DUNGEON_DIFFICULTY2, DUNGEON_DIFFICULTY_5PLAYER_HEROIC, RAID_DIFFICULTY3, RAID_DIFFICULTY4, RAID_DIFFICULTY_10PLAYER_HEROIC, RAID_DIFFICULTY_25PLAYER_HEROIC}
for i = 1, GetNumSavedInstances() do
local name, _, reset, _, locked, extended, _, isRaid, maxPlayers, difficulty, numEncounters, encounterProgress = GetSavedInstanceInfo(i)
if isRaid and (locked or extended) then
local name,_,reset,difficulty,locked,extended,_,isRaid,maxPlayers,_,numEncounters,encounterProgress = GetSavedInstanceInfo(i)
if isRaid and (locked or extended) or maxPlayers == 5 and difficulty == 23 and (locked or extended) then
local tr, tg, tb, diff
if not oneraid then
GameTooltip:AddLine(" ")
GameTooltip:AddLine(CALENDAR_FILTER_RAID_LOCKOUTS, ttsubh.r, ttsubh.g, ttsubh.b)
GameTooltip:AddLine(CALENDAR_FILTER_RAID_LOCKOUTS.." / Mythic(s)", ttsubh.r, ttsubh.g, ttsubh.b)
oneraid = true
end
if extended then tr, tg, tb = 0.3, 1, 0.3 else tr, tg, tb = 1, 1, 1 end
@@ -664,7 +814,11 @@ if clock.enabled then
end
end
if (numEncounters and numEncounters > 0) and (encounterProgress and encounterProgress > 0) then
if maxPlayers == 5 and difficulty == 23 then
GameTooltip:AddDoubleLine(format("%s |cffaaaaaa[%s%s] (%s/%s)", "M: "..name, maxPlayers, diff or "", encounterProgress, numEncounters), fmttime(reset), 1, 1, 1, tr, tg, tb)
else
GameTooltip:AddDoubleLine(format("%s |cffaaaaaa[%s%s] (%s/%s)", name, maxPlayers, diff or "", encounterProgress, numEncounters), fmttime(reset), 1, 1, 1, tr, tg, tb)
end
else
GameTooltip:AddDoubleLine(format("%s |cffaaaaaa[%s%s]", name, maxPlayers, diff or ""), fmttime(reset), 1, 1, 1, tr, tg, tb)
end
@@ -682,6 +836,13 @@ if clock.enabled then
GameTooltip:AddDoubleLine(name, fmttime(reset), 1, 1, 1, 1, 1, 1)
end
end
if( UnitLevel( "player" ) >= 100 ) then
local c = 0
for i,q in ipairs({36054,36055,36056,36057,36058,36060,37453,37452,37454,37455,37456,37457,37458,37459}) do if (IsQuestFlaggedCompleted(q)) then c=c+1 end end
GameTooltip:AddLine(" ")
GameTooltip:AddLine("Misc", ttsubh.r, ttsubh.g, ttsubh.b)
GameTooltip:AddDoubleLine( "Seals this week" .. ": ", c, 1, 1, 1, 1, 1, 1)
end
GameTooltip:Show()
end,
OnClick = function(_, b) (b == "RightButton" and ToggleTimeManager or ToggleCalendar)() end
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "宽带占用:"
L_STATS_DOWNLOAD = "下载:"
L_STATS_CLEARED_JUNK = "清除自动出售例外名单列表"
L_STATS_CLEAR_EXCEPTIONS = "清除例外名单列表"
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "点击开启世界地图"
L_STATS_CURRENT_XP = "当前/升级所需经验值"
L_STATS_MEMORY_USAGE = "插件内存占用:"
@@ -246,6 +246,8 @@ L_STATS_BANDWIDTH = "Bandwidth:"
L_STATS_DOWNLOAD = "Download:"
L_STATS_CLEARED_JUNK = "Cleared junk exceptions list."
L_STATS_CLEAR_EXCEPTIONS = "Clear exceptions list."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions"
L_STATS_CURRENCY_RAID_T = "Raid Seals"
L_STATS_WORLD_MAP = "Clicking opens world map."
L_STATS_CURRENT_XP = "Current/Max XP"
L_STATS_MEMORY_USAGE = "Blizzard UI Memory Usage:"
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "Bande passante:"
L_STATS_DOWNLOAD = "Téléchargement:"
L_STATS_CLEARED_JUNK = "Liste d'exceptions d'objet effacée."
L_STATS_CLEAR_EXCEPTIONS = "Effacer la liste d'exceptions."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "Clic ouvre la carte du monde."
L_STATS_CURRENT_XP = "XP courant/max"
L_STATS_MEMORY_USAGE = "Blizzard UI Memory Usage:" -- Needs review
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "Bandbreite:"
L_STATS_DOWNLOAD = "Download:"
L_STATS_CLEARED_JUNK = "Junk-Ausnahmeliste gelöscht."
L_STATS_CLEAR_EXCEPTIONS = "Ausnahmenliste löschen."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "Klicken, zum Öffnen der World-Map."
L_STATS_CURRENT_XP = "Aktuell/Max XP"
L_STATS_MEMORY_USAGE = "Blizzard UI Speicher Auslastung:"
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "Larghezza banda:"
L_STATS_DOWNLOAD = "Download:"
L_STATS_CLEARED_JUNK = "Lista eccezioni dell'elenco cianfrusaglie cancellata."
L_STATS_CLEAR_EXCEPTIONS = "Cancella la lista eccezioni."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "Clicca per aprire la mappa del mondo."
L_STATS_CURRENT_XP = "PE attuali/massimi"
L_STATS_MEMORY_USAGE = "Utilizzo memoria interfaccia Blizzard:"
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "Скорость:"
L_STATS_DOWNLOAD = "Загрузка:"
L_STATS_CLEARED_JUNK = "Очищен нежелательный список исключений."
L_STATS_CLEAR_EXCEPTIONS = "Очистить список исключений."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "Нажатие открывает карту."
L_STATS_CURRENT_XP = "Текущий/Макс. опыт"
L_STATS_MEMORY_USAGE = "Использование памяти Blizzard:"
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "Ancho de banda:"
L_STATS_DOWNLOAD = "Descarga:"
L_STATS_CLEARED_JUNK = "Limpiada la lista de excepciones de basura."
L_STATS_CLEAR_EXCEPTIONS = "Limpiada la lista de excepciones."
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "Clickeando abres el Mapa del Mundo."
L_STATS_CURRENT_XP = "Actual/Max EXP"
L_STATS_MEMORY_USAGE = "Blizzard UI Memory Usage:" -- Needs review
@@ -250,6 +250,8 @@ L_STATS_BANDWIDTH = "寬頻:"
L_STATS_DOWNLOAD = "下載:"
L_STATS_CLEARED_JUNK = "清除自動販售例外名單列表"
L_STATS_CLEAR_EXCEPTIONS = "清除例外名單列表"
L_STATS_CURRENCY_PROFESSIONS_T = "Professions" --Need review
L_STATS_CURRENCY_RAID_T = "Raid Seals" --Need review
L_STATS_WORLD_MAP = "點擊開啟世界地圖"
L_STATS_CURRENT_XP = "目前/升級所需 經驗值"
L_STATS_MEMORY_USAGE = "插件資源佔用:"
@@ -411,6 +411,13 @@ L_GUI_STATS_FPS = "帧数"
L_GUI_STATS_EXPERIENCE = "经验"
L_GUI_STATS_COORDS = "坐标"
L_GUI_STATS_LOCATION = "位置"
L_GUI_STATS_CURRENCY = "Currency Tab" --Need review
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab" --Need review
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab" --Need review
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab" --Need review
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab" --Need review
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab" --Need review
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab" --Need review

-- Error options
L_GUI_ERROR = "错误收集"
@@ -408,6 +408,13 @@ L_GUI_STATS_FPS = "FPS"
L_GUI_STATS_EXPERIENCE = "Experience"
L_GUI_STATS_COORDS = "Coords"
L_GUI_STATS_LOCATION = "Location"
L_GUI_STATS_CURRENCY = "Currency Tab"
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab"
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab"
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab"
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab"
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab"
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab"

-- Error options
L_GUI_ERROR = "Errors"
@@ -411,6 +411,13 @@ L_GUI_STATS_FPS = "FPS"
L_GUI_STATS_EXPERIENCE = "Expérience"
L_GUI_STATS_COORDS = "Coordonnées"
L_GUI_STATS_LOCATION = "Lieu actuel"
L_GUI_STATS_CURRENCY = "Currency Tab" --Need review
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab" --Need review
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab" --Need review
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab" --Need review
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab" --Need review
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab" --Need review
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab" --Need review

-- Error options
L_GUI_ERROR = "Erreurs"
@@ -411,6 +411,13 @@ L_GUI_STATS_FPS = "BPS"
L_GUI_STATS_EXPERIENCE = "Erfahrung"
L_GUI_STATS_COORDS = "Koordinaten"
L_GUI_STATS_LOCATION = "Ort"
L_GUI_STATS_CURRENCY = "Currency Tab" --Need review
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab" --Need review
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab" --Need review
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab" --Need review
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab" --Need review
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab" --Need review
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab" --Need review

-- Error options
L_GUI_ERROR = "Fehler"
@@ -411,6 +411,13 @@ L_GUI_STATS_FPS = "Frames Per Seconds"
L_GUI_STATS_EXPERIENCE = "Esperienza"
L_GUI_STATS_COORDS = "Coordinate"
L_GUI_STATS_LOCATION = "Località"
L_GUI_STATS_CURRENCY = "Currency Tab" --Need review
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab" --Need review
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab" --Need review
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab" --Need review
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab" --Need review
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab" --Need review
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab" --Need review

-- Error options
L_GUI_ERROR = "Errori"
@@ -411,6 +411,13 @@ L_GUI_STATS_FPS = "Кадры в секунду"
L_GUI_STATS_EXPERIENCE = "Опыт"
L_GUI_STATS_COORDS = "Координаты"
L_GUI_STATS_LOCATION = "Зона"
L_GUI_STATS_CURRENCY = "Currency Tab" --Need review
L_GUI_STATS_CURRENCY_ARCHAEOLOGY = "Show Archaeology under currency tab" --Need review
L_GUI_STATS_CURRENCY_COOKING = "Show Coocking under currency tab" --Need review
L_GUI_STATS_CURRENCY_PROFESSIONS = "Show Professions under currency tab" --Need review
L_GUI_STATS_CURRENCY_RAID = "Show Raid Seals under currency tab" --Need review
L_GUI_STATS_CURRENCY_PVP = "Show PvP under currency tab" --Need review
L_GUI_STATS_CURRENCY_MISCELLANEOUS = "Show Miscellaneous under currency tab" --Need review

-- Error options
L_GUI_ERROR = "Ошибки боя"

0 comments on commit 2d6e61e

Please sign in to comment.
You can’t perform that action at this time.