DB/Pets: Removed invalid spells from creature_template_spell

Port From (https://github.com/TrinityCore/TrinityCore/commit/982feb5082ab3c30cfb2e1278fd7736e5a02466c)
This commit is contained in:
hondacrx
2023-09-14 03:30:55 -04:00
parent c8c75431bf
commit fde57f7cf0
+2 -1
View File
@@ -2951,6 +2951,7 @@ namespace Game.Entities
}
public virtual byte GetPetAutoSpellSize() { return 4; }
public virtual uint GetPetAutoSpellOnPos(byte pos)
{
if (pos >= SharedConst.MaxSpellCharm || GetCharmInfo() == null || GetCharmInfo().GetCharmSpell(pos).GetActiveState() != ActiveStates.Enabled)
@@ -2972,7 +2973,7 @@ namespace Game.Entities
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellID, GetMap().GetDifficultyID());
if (spellInfo != null)
{
if (spellInfo.GetRecoveryTime() == 0 && spellInfo.RangeEntry.Id != 1 /*Self*/ && spellInfo.RangeEntry.Id != 2 /*Combat Range*/ && spellInfo.GetMaxRange() > range)
if (spellInfo.GetRecoveryTime() == 0 && spellInfo.RangeEntry != null && spellInfo.RangeEntry.Id != 1 /*Self*/ && spellInfo.RangeEntry.Id != 2 /*Combat Range*/ && spellInfo.GetMaxRange() > range)
range = spellInfo.GetMaxRange();
}
}