NPC/Spells

* always treat spells from creature_template_spell as controlled abilities
This commit is contained in:
Sarjuuk
2020-02-26 17:29:33 +01:00
parent 55d19589b8
commit 54b20c3131
2 changed files with 4 additions and 14 deletions

View File

@@ -713,11 +713,8 @@ class SmartAI
$tooltip = '[tooltip name=a-'.$this->rowKey.']'.Lang::smartAI('actionTT', array_merge([$a['type']], $a['param'])).'[/tooltip][span tooltip=a-'.$this->rowKey.']%s[/span]';
// additional parameters
$a['param'][6] = '';
$a['param'][7] = '';
$a['param'][8] = '';
$a['param'][9] = '';
// init additional parameters
$a['param'] = array_pad($a['param'], 10, '');
switch ($a['type'])
{

View File

@@ -421,15 +421,8 @@ class NpcPage extends GenericPage
if (in_array($id, $smartSpells))
{
$normal[$id] = $values;
unset($controled[$id]);
continue;
}
// not quite right. All seats should be checked for allowed-to-cast-flag-something
if (!$this->subject->getField('vehicleId') && in_array($id, $tplSpells))
{
$normal[$id] = $values;
unset($controled[$id]);
if (!in_array($id, $tplSpells))
unset($controled[$id]);
}
}