mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spells/Misc
* try to handle bogus data from creature_template_addon.auras
This commit is contained in:
@@ -852,10 +852,8 @@ class SpellPage extends GenericPage
|
||||
if (!empty($ubSAI[Type::NPC]))
|
||||
$conditions[] = ['id', $ubSAI[Type::NPC]];
|
||||
|
||||
if ($auras = DB::World()->selectCol('SELECT `entry` AS ARRAY_KEY, auras FROM creature_template_addon WHERE `auras` LIKE ?', '%'.$this->typeId.'%'))
|
||||
if ($auras = array_filter($auras, function($x) { return preg_match('/\b'.$this->typeId.'\b/', $x); }))
|
||||
$conditions[] = ['id', array_keys($auras)];
|
||||
|
||||
if ($auras = DB::World()->selectCol('SELECT `entry` FROM creature_template_addon WHERE `auras` REGEXP ?', '\\b'.$this->typeId.'\\b'))
|
||||
$conditions[] = ['id', $auras];
|
||||
|
||||
$ubCreature = new CreatureList($conditions);
|
||||
if (!$ubCreature->error)
|
||||
|
||||
Reference in New Issue
Block a user