This commit is contained in:
2025-03-13 16:28:23 +01:00
parent 468a68c3e7
commit 62e991cc66
23 changed files with 172 additions and 81 deletions

View File

@@ -1,4 +1,5 @@
--- PLAYER_TARGET_CHANGED
function(allstates)
aura_env.TryInspect()
end
--- Deprecated in favor of Heimdall.AchievementSniffer
--function(allstates)
-- aura_env.TryInspect()
--end

View File

@@ -1,15 +1,16 @@
--- INSPECT_ACHIEVEMENT_READY
function()
local targetGuid = UnitGUID("target")
if not targetGuid then return end
if not string.match(targetGuid, "Player") then return end
local targetName = UnitName("target")
local should = false
if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
if WeakAurasSaved.Cyka.AchievementSniffer2[targetName] then should = false end
if aura_env.config.rescan then should = true end
if not should then return end
aura_env.Scan(targetName)
end
--- Deprecated in favor of Heimdall.AchievementSniffer
--function()
-- local targetGuid = UnitGUID("target")
-- if not targetGuid then return end
-- if not string.match(targetGuid, "Player") then return end
-- local targetName = UnitName("target")
--
-- local should = false
-- if not WeakAurasSaved.Cyka.AchievementSniffer[targetName] then should = true end
-- if WeakAurasSaved.Cyka.AchievementSniffer2[targetName] then should = false end
-- if aura_env.config.rescan then should = true end
-- if not should then return end
--
-- aura_env.Scan(targetName)
--end

View File

@@ -5,8 +5,12 @@ function(allstates)
if UnitIsPlayer(unit) then
local name = UnitName(unit)
local seen = false
if WeakAurasSaved.Cyka.AchievementSniffer[name] then seen = true end
if WeakAurasSaved.Cyka.AchievementSniffer2[name] then seen = true end
if not Heimdall_Achievements then return end
if not Heimdall_Achievements.players then return end
if not Heimdall_Achievements.alreadySeen then return end
if Heimdall_Achievements.players[name] then seen = true end
if Heimdall_Achievements.alreadySeen[name] then seen = true end
allstates[unit] = {
show = true,

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
--DUEL_REQUESTED
function(e, sender)
if aura_env.whitelist[sender] then
print("Accepting duel from " .. sender)
AcceptDuel()
else
print("Declining duel from " .. sender)
CancelDuel()
end
end

View File

@@ -0,0 +1,18 @@
---@param input string
---@param deliminer string
---@return string[], string|nil
local function StrSplit(input, deliminer)
if not deliminer then return {}, "deliminer is nil" end
if not input then return {}, "input is nil" end
local parts = {}
for part in string.gmatch(input, "([^" .. deliminer .. "]+)") do
table.insert(parts, strtrim(part))
end
return parts, nil
end
aura_env.whitelist = {}
local swhitelist = StrSplit(aura_env.config.whitelist, ",")
for _, name in ipairs(swhitelist) do
aura_env.whitelist[name] = true
end

View File

@@ -0,0 +1,38 @@
--Integrate into a channel instead of whispers
--But probably also keep whispers, do both
--So for channel see
JoinPermanentChannel("foo")
LeaveChannelByName("foo")
--For existing channels see:
local foo = {GetChannelList()}
--There is also:
GetChannelName(0)
--Opa this also works:
ChannelKick("foobar", "Succpotato")
--But kick is actually ban...
--And unban does not actually work...
--Hmm...
--Relog (of the banned) seems to fix it (fix the kick that is)
--But relog does not fix the ban!
ChannelBan("foobar", "Succpotato")
ChannelUnban("foobar", "Succpotato")
--Mute and unmute both seem to work fine
ChannelMute("foobar", "Succpotato")
ChannelUnmute("foobar", "Succpotato")
--A player can be owner/moderator only for as long as they are online
--So these commands don't make much sense...
ChannelModerator("foobar", "Succpotato")
ChannelUnmoderator("foobar", "Succpotato")
--We can also set password!!
--But only by owner and only via chat
--/pass foobar secret
--Wiki:
--You can only be in ten chat channels at any given time. This does not include other chat types such as say, yell, party, raid, guild, officer, or whisper which are not considered channels.