diff --git a/Neuron-DB-Defaults.lua b/Neuron-DB-Defaults.lua index 9a535d3e..af8f72aa 100644 --- a/Neuron-DB-Defaults.lua +++ b/Neuron-DB-Defaults.lua @@ -267,7 +267,6 @@ NeuronDefaults = { NeuronItemCache = {}, NeuronSpellCache = {}, - NeuronCollectionCache = {}, NeuronToyCache = {}, NeuronIcon = {hide = false,}, diff --git a/Neuron-GUI.lua b/Neuron-GUI.lua index 9ff0fa76..9b880bcd 100644 --- a/Neuron-GUI.lua +++ b/Neuron-GUI.lua @@ -2535,8 +2535,6 @@ function NeuronGUI:specUpdateIcon(button,state) if (NeuronSpellCache[spell]) then local spell_id = NeuronSpellCache[spell].spellID texture = GetSpellTexture(spell_id) - elseif (NeuronCollectionCache[spell]) then - texture = NeuronCollectionCache[spell].icon elseif (spell) then texture = GetSpellTexture(spell) end diff --git a/Neuron.lua b/Neuron.lua index 823ff94f..4d0b0143 100644 --- a/Neuron.lua +++ b/Neuron.lua @@ -43,7 +43,6 @@ Neuron.registeredGUIData = {} --these are the database tables that are going to hold our data. They are global because every .lua file needs access to them NeuronItemCache = {} --Stores a cache of all items that have been seen by a Neuron button NeuronSpellCache = {} --Stores a cache of all spells that have been seen by a Neuron button -NeuronCollectionCache = {} --Stores a cache of all Mounts and Battle Pets that have been seen by a Neuron button NeuronToyCache = {} --Stores a cache of all toys that have been seen by a Neuron button @@ -153,7 +152,6 @@ function Neuron:OnInitialize() --load saved variables into working variable containers NeuronItemCache = DB.NeuronItemCache NeuronSpellCache = DB.NeuronSpellCache - NeuronCollectionCache = DB.NeuronCollectionCache NeuronToyCache = DB.NeuronToyCache --these are the working pointers to our global database tables. Each class has a local GDB and CDB table that is a pointer to the root of their associated database @@ -197,9 +195,7 @@ function Neuron:OnEnable() Neuron:RegisterEvent("LEARNED_SPELL_IN_TAB") if not Neuron.isWoWClassic then - Neuron:RegisterEvent("COMPANION_LEARNED") Neuron:RegisterEvent("TOYS_UPDATED") - Neuron:RegisterEvent("PET_JOURNAL_LIST_UPDATE") end Neuron:UpdateStanceStrings() @@ -281,7 +277,6 @@ function Neuron:PLAYER_ENTERING_WORLD() Neuron:UpdateStanceStrings() if not Neuron.isWoWClassic then - Neuron:UpdateCollectionCache() Neuron:UpdateToyCache() end @@ -321,14 +316,6 @@ function Neuron:SPELLS_CHANGED() Neuron:UpdateStanceStrings() end -function Neuron:COMPANION_LEARNED() - Neuron:UpdateCollectionCache() -end - -function Neuron:PET_JOURNAL_LIST_UPDATE() - Neuron:UpdateCollectionCache() -end - function Neuron:TOYS_UPDATED(...) Neuron:UpdateToyCache() end @@ -582,44 +569,6 @@ function Neuron:UpdateToyCache() end - ---- Compiles a list of battle pets & mounts a player has. This table is used to refrence macro spell info to generate tooltips and cooldowns. ---- If a companion is not displaying its tooltip or cooldown, then the item in the macro probably is not in the database -function Neuron:UpdateCollectionCache() - - local _, numpet = C_PetJournal.GetNumPets() - - for i=1,numpet do - - local petID, speciesID, owned, _, _, _, _, speciesName, icon = C_PetJournal.GetPetInfoByIndex(i) - - if petID and owned then - local spell = speciesName - if spell then - local companionData = Neuron:SetCompanionData("CRITTER", i, speciesID, speciesName, petID, icon) - NeuronCollectionCache[spell:lower()] = companionData - NeuronCollectionCache[spell:lower().."()"] = companionData - end - end - end - - local mountIDs = C_MountJournal.GetMountIDs() - for i,id in pairs(mountIDs) do - local creatureName , spellID, _, _, _, _, _, _, _, _, collected = C_MountJournal.GetMountInfoByID(id) - - if spellID and collected then - local spell, _, icon = GetSpellInfo(spellID) - if spell then - local companionData = Neuron:SetCompanionData("MOUNT", i, spellID, creatureName, spellID, icon) - NeuronCollectionCache[spell:lower()] = companionData - NeuronCollectionCache[spell:lower().."()"] = companionData - end - end - end -end - - - function Neuron:UpdateStanceStrings() if Neuron.class == "DRUID" or Neuron.class == "ROGUE" then diff --git a/Objects/ACTIONBUTTON.lua b/Objects/ACTIONBUTTON.lua index 31d6a984..ef6b1d6c 100644 --- a/Objects/ACTIONBUTTON.lua +++ b/Objects/ACTIONBUTTON.lua @@ -733,12 +733,6 @@ function ACTIONBUTTON:SetSpellTooltip(spell) else GameTooltip:SetText(NeuronSpellCache[spell:lower()].spellName, 1, 1, 1) end - elseif NeuronCollectionCache[spell:lower()] then - if self.UberTooltips and NeuronCollectionCache[spell:lower()].creatureType =="MOUNT" then - GameTooltip:SetHyperlink("spell:"..NeuronCollectionCache[spell:lower()].spellID) - else - GameTooltip:SetText(NeuronCollectionCache[spell:lower()].creatureName, 1, 1, 1) - end else GameTooltip:SetText(UNKNOWN, 1, 1, 1) end @@ -806,8 +800,6 @@ function ACTIONBUTTON:SetSpellIcon(spell) if not texture then if NeuronSpellCache[spell:lower()] then texture = NeuronSpellCache[spell:lower()].icon - elseif NeuronCollectionCache[spell:lower()] then - texture = NeuronCollectionCache[spell:lower()].icon end end