From 255f66c8abfdb09d722219b454bd421b0d7c08ed Mon Sep 17 00:00:00 2001 From: Cilraaz Date: Wed, 24 Jul 2024 01:26:28 -0400 Subject: [PATCH] fix(Spell): Avoid nil error --- HeroLib/Events/Spell.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HeroLib/Events/Spell.lua b/HeroLib/Events/Spell.lua index 110da64d..d7418350 100755 --- a/HeroLib/Events/Spell.lua +++ b/HeroLib/Events/Spell.lua @@ -29,7 +29,6 @@ local Custom = { Blacklist = {} } - --- ============================ CONTENT ============================ -- Player On Cast Success Listener @@ -130,7 +129,9 @@ function Player:RegisterListenedSpells(SpecID) tableinsert(PlayerSpecs, Spec) ListenedSpells[Spec] = {} for _, Spell in pairs(Spells) do - ListenedSpells[Spec][Spell:ID()] = Spell + if Spell:ID() then + ListenedSpells[Spec][Spell:ID()] = Spell + end end end -- Add Spells based on the Whitelist