Refactor try inspect to run every .5s
This commit is contained in:
@@ -1,13 +1,4 @@
|
||||
--- PLAYER_TARGET_CHANGED
|
||||
function()
|
||||
local targetGuid = UnitGUID("target")
|
||||
if not targetGuid then return end
|
||||
if not string.match(targetGuid, "Player") then return end
|
||||
local targetName = UnitName("target")
|
||||
if not aura_env.config.recsan and WeakAurasSaved.Cyka.AchievementSniffer[targetName] then return end
|
||||
-- aura_env.Scan(targetName)
|
||||
local canInspect = CanInspect("target", true)
|
||||
if canInspect then
|
||||
SetAchievementComparisonUnit("target")
|
||||
end
|
||||
aura_env.TryInspect()
|
||||
end
|
4
FreshShit/AchievementSniffer/event3.lua
Normal file
4
FreshShit/AchievementSniffer/event3.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- TICKER_500
|
||||
function()
|
||||
aura_env.TryInspect()
|
||||
end
|
@@ -1,6 +1,7 @@
|
||||
---@class aura_env
|
||||
---@field achievements table<number, string>
|
||||
---@field Scan fun(playerName: string)
|
||||
---@field TryInspect fun()
|
||||
|
||||
---@class WeakAurasSaved
|
||||
---@field Cyka table<string, table<string, table<number, string>>>
|
||||
@@ -61,6 +62,17 @@ aura_env.achievements = {
|
||||
245, -- That Takes Class
|
||||
}
|
||||
|
||||
aura_env.TryInspect = function()
|
||||
local targetPlayer = UnitIsPlayer("target")
|
||||
if not targetPlayer then return end
|
||||
local targetName = UnitName("target")
|
||||
if not aura_env.config.recsan and WeakAurasSaved.Cyka.AchievementSniffer[targetName] then return end
|
||||
local canInspect = CanInspect("target", true)
|
||||
if canInspect then
|
||||
SetAchievementComparisonUnit("target")
|
||||
end
|
||||
end
|
||||
|
||||
---@param playerName string
|
||||
aura_env.Scan = function(playerName)
|
||||
WeakAurasSaved.Cyka.AchievementSniffer[playerName] = {}
|
||||
|
Reference in New Issue
Block a user