Originally Posted by Fizzlemizz
Unlike the old GetSpellCooldown, the new C_Spell.GetSpellCooldown returns a table (or nil). You will need to take the information from the returned table (if it's not nil) and initalise gcdStart and gcdDuration
|
Thank you Fizzle!!!
If you dont mind, another issue I am having is with this code.
Error:
Code:
ConRO/core.lua:2455: attempt to call global 'GetSpellInfo' (a nil value)
Code:
function ConRO:InvokeNextSpell()
local oldSkill = self.Spell;
local timeShift, currentSpell, gcd = ConRO:EndCast();
local iterate = self:NextSpell(timeShift, currentSpell, gcd, self.PlayerTalents, self.PvPTalents);
self.Spell = self.SuggestedSpells[1];
ConRO:GetTimeToDie();
-- ConRO:UpdateRotation();
-- ConRO:UpdateButtonGlow();
local spellName, _, spellTexture = GetSpellInfo(self.Spell);
local _, _, spellTexture2 = GetSpellInfo(self.SuggestedSpells[2]);
local _, _, spellTexture3 = GetSpellInfo(self.SuggestedSpells[3]);
if (oldSkill ~= self.Spell or oldSkill == nil) and self.Spell ~= nil then
self:GlowNextSpell(self.Spell);
ConROWindow.fontkey:SetText(ConRO:improvedGetBindingText(ConRO:FindKeybinding(self.Spell)));
ConROWindow2.fontkey:SetText(ConRO:improvedGetBindingText(ConRO:FindKeybinding(self.SuggestedSpells[2])));
ConROWindow3.fontkey:SetText(ConRO:improvedGetBindingText(ConRO:FindKeybinding(self.SuggestedSpells[3])));
if spellName ~= nil then
ConROWindow.texture:SetTexture(spellTexture);
ConROWindow.font:SetText(spellName);
ConROWindow2.texture:SetTexture(spellTexture2);
ConROWindow3.texture:SetTexture(spellTexture3);
else
local itemName, _, _, _, _, _, _, _, _, itemTexture = GetItemInfo(self.Spell);
local _, _, _, _, _, _, _, _, _, itemTexture2 = GetItemInfo(self.SuggestedSpells[2]);
local _, _, _, _, _, _, _, _, _, itemTexture3 = GetItemInfo(self.SuggestedSpells[3]);
ConROWindow.texture:SetTexture(itemTexture);
ConROWindow.font:SetText(itemName);
ConROWindow2.texture:SetTexture(itemTexture2);
ConROWindow3.texture:SetTexture(itemTexture3);
end
end
if self.Spell == nil and oldSkill ~= nil then
self:GlowClear();
ConROWindow.texture:SetTexture('Interface\\AddOns\\ConRO\\images\\Bigskull');
ConROWindow.font:SetText(" ");
ConROWindow.fontkey:SetText(" ");
ConROWindow2.texture:SetTexture('Interface\\AddOns\\ConRO\\images\\Bigskull');
ConROWindow2.fontkey:SetText(" ");
ConROWindow3.texture:SetTexture('Interface\\AddOns\\ConRO\\images\\Bigskull');
ConROWindow3.fontkey:SetText(" ");
end
end