Implement ore camper

This commit is contained in:
2024-03-18 16:31:37 +01:00
parent 55931aaf9e
commit f161030237
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
-- UNIT_SPELLCAST_SENT
---@param allstates allstates
---@param e string
---@param source string
---@param spellname string
---@param _ string
---@param target string
function(allstates, e, source, spellname, _, target)
if source ~= "player" then return end
if spellname ~= "Mining" then return end
if aura_env.depositIterator[target] == nil then aura_env.depositIterator[target] = 0 end
local state = {
changed = true,
show = true,
progressType = "timed",
autoHide = true,
duration = aura_env.cooldown,
expirationTime = GetTime() + aura_env.cooldown,
name = string.format("%s #%d", target, aura_env.depositIterator[target]),
}
allstates[aura_env.depositIterator[target]] = state
aura_env.depositIterator[target] = aura_env.depositIterator[target] + 1
return true
end

View File

@@ -0,0 +1,2 @@
aura_env.cooldown = 205
aura_env.depositIterator = {}