Skip to content

Commit

Permalink
fix(Spell): Avoid nil error
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed Jul 24, 2024
1 parent a2719c9 commit 255f66c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions HeroLib/Events/Spell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ local Custom = {
Blacklist = {}
}


--- ============================ CONTENT ============================

-- Player On Cast Success Listener
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 255f66c

Please sign in to comment.