Spells/Misc

* try to handle bogus data from creature_template_addon.auras
This commit is contained in:
Sarjuuk
2024-01-31 22:17:25 +01:00
parent a14b5e2be1
commit 85e8175338
3 changed files with 16 additions and 9 deletions

View File

@@ -426,7 +426,10 @@ class NpcPage extends GenericPage
$genSpells = $smartSpells;
if ($auras = DB::World()->selectCell('SELECT auras FROM creature_template_addon WHERE entry = ?d', $this->typeId))
{
$auras = preg_replace('/[^\d ]/', ' ', $auras); // remove erronous chars from string
$genSpells = array_merge($genSpells, array_filter(explode(' ', $auras)));
}
if ($genSpells)
$conditions[] = ['id', $genSpells];