From 1919a1d475f054f8b8213e30b606365eee3f48a1 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Fri, 19 Jul 2024 15:01:08 +0200 Subject: [PATCH] Cleanup some unused variables --- Collector.lua | 11 ++--------- Config.lua | 1 - Display.lua | 10 +++------- GatherMate2.lua | 2 -- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/Collector.lua b/Collector.lua index 12ed9f7..a4dbfa5 100644 --- a/Collector.lua +++ b/Collector.lua @@ -3,12 +3,9 @@ local Collector = GatherMate:NewModule("Collector", "AceEvent-3.0") local L = LibStub("AceLocale-3.0"):GetLocale("GatherMate2",true) local NL = LibStub("AceLocale-3.0"):GetLocale("GatherMate2Nodes") -- for get the local name of Gas Cloud´s -local WoW10 = select(4, GetBuildInfo()) >= 100000 - -local Display = nil -- prevSpell, curSpell are markers for what has been cast now and the lastcast -- gatherevents if a flag for wether we are listening to events -local prevSpell, curSpell, foundTarget, gatherEvents, ga +local prevSpell, curSpell, foundTarget, ga local GetSpellName = C_Spell and C_Spell.GetSpellName or GetSpellInfo @@ -45,12 +42,10 @@ local spells = [205243] = "Treasure", -- skinning ground warts } local tooltipLeftText1 = _G["GameTooltipTextLeft1"] -local strfind, stringmatch = string.find, string.match +local strfind = string.find local pii = math.pi local sin = math.sin local cos = math.cos -local gsub = gsub -local strtrim = strtrim --[[ This search string code no longer needed since we use CombatEvent to detect gas clouds harvesting ]] @@ -79,7 +74,6 @@ function Collector:RegisterGatherEvents() --self:RegisterEvent("LOOT_CLOSED","GatherCompleted") self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", "GasBuffDetector") self:RegisterEvent("CHAT_MSG_LOOT","SecondaryGasCheck") -- for Storm Clouds - gatherEvents = true end --[[ @@ -95,7 +89,6 @@ function Collector:UnregisterGatherEvents() self:UnregisterEvent("UI_ERROR_MESSAGE") --self:UnregisterEvent("LOOT_CLOSED") self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - gatherEvents = false end local CrystalizedWater = (C_Item.GetItemNameByID(37705)) or "" diff --git a/Config.lua b/Config.lua index 3231176..1acfd7e 100644 --- a/Config.lua +++ b/Config.lua @@ -1,6 +1,5 @@ local GatherMate = LibStub("AceAddon-3.0"):GetAddon("GatherMate2") local Config = GatherMate:NewModule("Config","AceEvent-3.0") -local Display = GatherMate:GetModule("Display") local L = LibStub("AceLocale-3.0"):GetLocale("GatherMate2", false) -- Databroker support diff --git a/Display.lua b/Display.lua index f0a3cb6..35904b0 100644 --- a/Display.lua +++ b/Display.lua @@ -24,27 +24,23 @@ local pinClickedOn -- our current zone local zone = -1 -- cache of table insert functions -local tinsert, tremove, next, pairs = tinsert, tremove, next, pairs +local next, pairs = next, pairs -- minimap rotation local rotateMinimap = GetCVar("rotateMinimap") == "1" -- shape of the minimap local minimapShape --- is the minimap indoors or outdoors -local indoors = GetCVar("minimapZoom")+0 == Minimap:GetZoom() and "outdoor" or "indoor" -- diameter of the minimap local mapRadius, minimapWidth, minimapHeight, minimapScale, lastFacing, lastZoom local minimapStrata, minimapFrameLevel -- math function cache -local math_sin, math_cos, abs, max = math.sin, math.cos, math.abs, math.max +local math_sin, math_cos, max = math.sin, math.cos, math.max local sin, cos -- API function cache -local GetRealZoneText = GetRealZoneText local GetProfessionInfo = GetProfessionInfo -local strfind, format = string.find, string.format +local format = string.format local trackingCircle, nodeTextures local db local Minimap = Minimap -local inInstance local nodeRange = 2 local forceNextUpdate local trackShow = {} diff --git a/GatherMate2.lua b/GatherMate2.lua index c1d580c..01eb3a7 100644 --- a/GatherMate2.lua +++ b/GatherMate2.lua @@ -76,8 +76,6 @@ local defaults = { } }, } -local floor = floor -local next = next --[[ Setup a few databases, we sub divide namespaces for resetting/importing