Code format

This commit is contained in:
2025-05-15 20:37:50 +02:00
parent 9e6432d0b0
commit 69d1f9fd93
105 changed files with 24069 additions and 28084 deletions

View File

@@ -1,49 +1,55 @@
aura_env.keybind = ""
aura_env.scanned = false
aura_env.bars = {
"ElvUI_Bar1", "ElvUI_Bar2", "ElvUI_Bar3", "ElvUI_Bar4", "ElvUI_Bar5",
"ElvUI_Bar6", "ElvUI_Bar7", "ElvUI_Bar8", "ElvUI_Bar9", "ElvUI_Bar10"
"ElvUI_Bar1",
"ElvUI_Bar2",
"ElvUI_Bar3",
"ElvUI_Bar4",
"ElvUI_Bar5",
"ElvUI_Bar6",
"ElvUI_Bar7",
"ElvUI_Bar8",
"ElvUI_Bar9",
"ElvUI_Bar10",
}
aura_env.lookup = function()
local spellid = 0
if not aura_env.states or aura_env.states == nil then
print("No states")
return
end
local spellid = 0
if not aura_env.states or aura_env.states == nil then
print("No states")
return
end
local triggerInfo = aura_env.states[2]
if not triggerInfo then
triggerInfo = aura_env.states[1]
end
if triggerInfo then spellid = triggerInfo.trigger.spellName end
if spellid == 0 then return end
local triggerInfo = aura_env.states[2]
if not triggerInfo then triggerInfo = aura_env.states[1] end
if triggerInfo then spellid = triggerInfo.trigger.spellName end
if spellid == 0 then return end
for _, bar in pairs(aura_env.bars) do
for i = 1, 12 do
local button = _G[bar .. "Button" .. i]
local slot = button:GetAttribute("action")
if slot then
local type, _, _, id = GetActionInfo(slot)
if type == "spell" then
if id == spellid then
local bindid = button.keyBoundTarget
local keybind = GetBindingKey(bindid)
aura_env.keybind = keybind
break
end
end
end
end
end
for _, bar in pairs(aura_env.bars) do
for i = 1, 12 do
local button = _G[bar .. "Button" .. i]
local slot = button:GetAttribute("action")
if slot then
local type, _, _, id = GetActionInfo(slot)
if type == "spell" then
if id == spellid then
local bindid = button.keyBoundTarget
local keybind = GetBindingKey(bindid)
aura_env.keybind = keybind
break
end
end
end
end
end
if aura_env.keybind then
aura_env.keybind = string.gsub(aura_env.keybind, "BUTTON", "B")
aura_env.keybind = string.gsub(aura_env.keybind, "SHIFT%-", "S")
aura_env.keybind = string.gsub(aura_env.keybind, "CTRL%-", "C")
aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A")
aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb")
end
if aura_env.keybind then
aura_env.keybind = string.gsub(aura_env.keybind, "BUTTON", "B")
aura_env.keybind = string.gsub(aura_env.keybind, "SHIFT%-", "S")
aura_env.keybind = string.gsub(aura_env.keybind, "CTRL%-", "C")
aura_env.keybind = string.gsub(aura_env.keybind, "ALT%-", "A")
aura_env.keybind = string.gsub(aura_env.keybind, "SPACE", "Spb")
end
aura_env.scanned = true
aura_env.scanned = true
end

View File

@@ -1,21 +1,21 @@
if not _G.tooltipItemInfoHooked then
local function iteminfo(self, bag, slot)
local itemLink = GetContainerItemLink(bag, slot)
if itemLink then
local _, _, _, ilvl, reqLevel, class, subclass, maxStack, equipSlot = GetItemInfo(itemLink)
self:AddLine("")
self:AddLine("Req Level: " .. reqLevel)
self:AddLine("Item Level: " .. ilvl)
self:AddLine("Class: " .. class)
self:AddLine("Subclass: " .. subclass)
self:AddLine("Max Stack: " .. maxStack)
self:AddLine("Equip Slot: " .. equipSlot)
end
self:Show()
end
local function iteminfo(self, bag, slot)
local itemLink = GetContainerItemLink(bag, slot)
if itemLink then
local _, _, _, ilvl, reqLevel, class, subclass, maxStack, equipSlot = GetItemInfo(itemLink)
self:AddLine("")
self:AddLine("Req Level: " .. reqLevel)
self:AddLine("Item Level: " .. ilvl)
self:AddLine("Class: " .. class)
self:AddLine("Subclass: " .. subclass)
self:AddLine("Max Stack: " .. maxStack)
self:AddLine("Equip Slot: " .. equipSlot)
end
self:Show()
end
-- hooksecurefunc(GameTooltip, "SetInventoryItem", iteminfo)
hooksecurefunc(GameTooltip, "SetBagItem", iteminfo)
-- hooksecurefunc(GameTooltip, "SetInventoryItem", iteminfo)
hooksecurefunc(GameTooltip, "SetBagItem", iteminfo)
_G.tooltipItemInfoHooked = true
_G.tooltipItemInfoHooked = true
end

View File

@@ -1,2 +1,2 @@
aura_env.alive = false
aura_env.totem = aura_env.config.totem or "Tremor Totem"
aura_env.totem = aura_env.config.totem or "Tremor Totem"