@@ -1045,11 +1045,12 @@ function Private.ExecEnv.CheckRaidFlags(flags, flagToCheck)
10451045end
10461046
10471047local function IsSpellKnownOrOverridesAndBaseIsKnown (spell , pet )
1048+ if spell == 0 then return false end
10481049 if IsSpellKnown (spell , pet ) then
10491050 return true
10501051 end
10511052 local baseSpell = FindBaseSpellByID (spell )
1052- if baseSpell and baseSpell ~= spell then
1053+ if baseSpell and baseSpell ~= spell and baseSpell ~= 0 then
10531054 if FindSpellOverrideByID (baseSpell ) == spell then
10541055 return IsSpellKnown (baseSpell , pet )
10551056 end
@@ -1059,11 +1060,12 @@ end
10591060--- @param spell string | number
10601061--- @return boolean result
10611062function WeakAuras .IsPlayerSpellOrOverridesAndBaseIsPlayerSpell (spell )
1063+ if spell == 0 then return false end
10621064 if IsPlayerSpell (spell ) then
10631065 return true
10641066 end
10651067 local baseSpell = FindBaseSpellByID (spell )
1066- if baseSpell and baseSpell ~= spell then
1068+ if baseSpell and baseSpell ~= spell and baseSpell ~= 0 then
10671069 if FindSpellOverrideByID (baseSpell ) == spell then
10681070 return IsPlayerSpell (baseSpell )
10691071 end
@@ -1073,6 +1075,7 @@ end
10731075
10741076--- @private
10751077function WeakAuras .IsSpellKnownForLoad (spell , exact )
1078+ if spell == 0 then return false end
10761079 local result = IsPlayerSpell (spell )
10771080 or IsSpellKnownOrOverridesAndBaseIsKnown (spell , false )
10781081 or IsSpellKnownOrOverridesAndBaseIsKnown (spell , true )
@@ -1093,6 +1096,7 @@ end
10931096--- @param pet boolean ?
10941097--- @return boolean result
10951098function WeakAuras .IsSpellKnown (spell , pet )
1099+ if spell == 0 then return false end
10961100 if (pet ) then
10971101 return IsSpellKnownOrOverridesAndBaseIsKnown (spell , true )
10981102 end
0 commit comments