DB/Pets: Removed invalid spells from creature_template_spell

Closes #29149
This commit is contained in:
Shauren
2023-08-16 20:04:20 +02:00
parent f18233822d
commit 982feb5082
2 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1 @@
DELETE FROM `creature_template_spell` WHERE `Spell` IN (1,3,4,7);

View File

@@ -3194,7 +3194,7 @@ float Creature::GetPetChaseDistance() const
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellID, GetMap()->GetDifficultyID()))
{
if (spellInfo->GetRecoveryTime() == 0 && spellInfo->RangeEntry->ID != 1 /*Self*/ && spellInfo->RangeEntry->ID != 2 /*Combat Range*/ && spellInfo->GetMaxRange() > range)
if (spellInfo->GetRecoveryTime() == 0 && spellInfo->RangeEntry && spellInfo->RangeEntry->ID != 1 /*Self*/ && spellInfo->RangeEntry->ID != 2 /*Combat Range*/ && spellInfo->GetMaxRange() > range)
range = spellInfo->GetMaxRange();
}
}