aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-08-16 20:04:20 +0200
committerShauren <shauren.trinity@gmail.com>2023-08-16 20:04:20 +0200
commit982feb5082ab3c30cfb2e1278fd7736e5a02466c (patch)
tree641bc619f6ac94cea0f7ad96c14fed64f11e63eb
parentf18233822d067ac5704bb9ed3e0408531526272a (diff)
DB/Pets: Removed invalid spells from creature_template_spell
Closes #29149
-rw-r--r--sql/updates/world/master/2023_08_16_01_world.sql1
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/sql/updates/world/master/2023_08_16_01_world.sql b/sql/updates/world/master/2023_08_16_01_world.sql
new file mode 100644
index 00000000000..6b507894165
--- /dev/null
+++ b/sql/updates/world/master/2023_08_16_01_world.sql
@@ -0,0 +1 @@
+DELETE FROM `creature_template_spell` WHERE `Spell` IN (1,3,4,7);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index e0f418ac779..687f1e924d3 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -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();
}
}