Update
This commit is contained in:
@@ -114,9 +114,6 @@ aura_env.KeyLevel = {
|
||||
end
|
||||
}
|
||||
|
||||
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
|
||||
if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end
|
||||
|
||||
---@class Key
|
||||
---@field name string
|
||||
---@field role string
|
||||
@@ -178,6 +175,8 @@ Key = {
|
||||
end,
|
||||
---@param self Key
|
||||
register = function(self)
|
||||
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
|
||||
if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end
|
||||
WeakAurasSaved.Cyka.MData[self:hash()] = self
|
||||
end
|
||||
}
|
||||
@@ -215,3 +214,5 @@ function aura_env.Process()
|
||||
end
|
||||
|
||||
-- /run WeakAurasSaved.Cyka.MData = {}
|
||||
-- /dump WeakAurasSaved.Cyka.MData
|
||||
-- /dump InterfaceGUI.Cashe_1[UnitGUID("player")]
|
||||
29
FreshShit/UwowLadderboardScraper/event.lua
Normal file
29
FreshShit/UwowLadderboardScraper/event.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
-- TICKER_10000
|
||||
function()
|
||||
if not InterfaceGUI then return end
|
||||
if not InterfaceGUI.Cashe_1 then return end
|
||||
for k, v in pairs(InterfaceGUI.Cashe_1) do
|
||||
if v.UIMSG_BEST_RUNS then
|
||||
local bestRuns = v.UIMSG_BEST_RUNS
|
||||
for i = 1, #bestRuns, 5 do
|
||||
local challengeId = bestRuns[i]
|
||||
local roleMask = bestRuns[i + 1]
|
||||
-- print(roleMask)
|
||||
local stars = bestRuns[i + 2]
|
||||
local keyLvl = bestRuns[i + 3]
|
||||
local score = bestRuns[i + 4]
|
||||
|
||||
if challengeId and challengeId > 0 and roleMask and roleMask > 0 and keyLvl and keyLvl > 0 then
|
||||
local dungeonName = aura_env.challengeNameMap[challengeId] or "???"
|
||||
local key = aura_env.Key.new(
|
||||
dungeonName,
|
||||
"isDps",
|
||||
string.rep("+", stars) .. keyLvl,
|
||||
"???",
|
||||
score)
|
||||
key:register()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
85
FreshShit/UwowLadderboardScraper/init.lua
Normal file
85
FreshShit/UwowLadderboardScraper/init.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
aura_env.challengeNameMap = {
|
||||
[165] = "Graimrail Depot",
|
||||
[166] = "Shadowmoon Burial Grounds",
|
||||
[197] = "Eye of Azshara",
|
||||
[198] = "Darkheart Thicket",
|
||||
[199] = "Black Rook Hold",
|
||||
[200] = "Halls of Valor",
|
||||
[206] = "Neltharion's Lair",
|
||||
[207] = "Vault of the Wardens",
|
||||
[208] = "Maw of Souls",
|
||||
[209] = "The Arcway",
|
||||
[210] = "Court of Stars",
|
||||
[227] = "Return to Karazhan: Lower",
|
||||
[233] = "Cathedral of Eternal Night",
|
||||
[234] = "Return to Karazhan: Upper",
|
||||
[239] = "Seat of the Triumvirate"
|
||||
}
|
||||
|
||||
|
||||
---@class Key
|
||||
---@field name string
|
||||
---@field role string
|
||||
---@field level string
|
||||
---@field time string
|
||||
---@field score number
|
||||
aura_env.Key = {
|
||||
---@return Key
|
||||
---@param name string
|
||||
---@param role string
|
||||
---@param level string
|
||||
---@param time string
|
||||
---@param score string
|
||||
new = function(name, role, level, time, score)
|
||||
local self = setmetatable({}, {
|
||||
__index = Key,
|
||||
__tostring = function(self)
|
||||
local score = self.score
|
||||
local keyLevel = tonumber(self.level:match("%d+$")) or 0
|
||||
|
||||
local formattedScore, err = aura_env.ScoreColorer.Interpolate(self.score)
|
||||
if not err then
|
||||
score = string.format("|cff%02x%02x%02x%d|r", formattedScore.r * 255, formattedScore.g * 255,
|
||||
formattedScore.b * 255, self.score)
|
||||
end
|
||||
|
||||
local formattedLevel, err = aura_env.KeyLevel.Interpolate(keyLevel)
|
||||
if not err then
|
||||
level = string.format("|cff%02x%02x%02x%s|r", formattedLevel.r * 255, formattedLevel.g * 255,
|
||||
formattedLevel.b * 255, self.level)
|
||||
end
|
||||
|
||||
return string.format("%-30s %-8s %-8s %-10s %-10s", self.name, self.role, level, self.time,
|
||||
score)
|
||||
end,
|
||||
})
|
||||
self.name = name
|
||||
self.role = role
|
||||
self.level = level
|
||||
self.time = time
|
||||
self.score = tonumber(score) or 0
|
||||
return self
|
||||
end,
|
||||
---@return string
|
||||
hash = function(self)
|
||||
return table.concat({ self.name, self.role, self.level, self.time, self.score }, "/")
|
||||
end,
|
||||
|
||||
---@param self Key
|
||||
---@param other Key
|
||||
---@return boolean
|
||||
compareTo = function(self, other)
|
||||
if not self then return true end
|
||||
if not other then return false end
|
||||
if self.name <= other.name then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
---@param self Key
|
||||
register = function(self)
|
||||
if not WeakAurasSaved.Cyka then WeakAurasSaved.Cyka = {} end
|
||||
if not WeakAurasSaved.Cyka.MData then WeakAurasSaved.Cyka.MData = {} end
|
||||
WeakAurasSaved.Cyka.MData[self:hash()] = self
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user