From f9ed75d5afeecd507a92aecfc2baebdd21c5e5d4 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 24 Oct 2021 18:09:30 +0200 Subject: [PATCH] SmartAI/Spells * fixed fetching spells from SmartAI for Abilities tab Co-authored-by: jackpoz --- includes/smartAI.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/smartAI.class.php b/includes/smartAI.class.php index 31c4c975..b26dd525 100644 --- a/includes/smartAI.class.php +++ b/includes/smartAI.class.php @@ -268,8 +268,8 @@ class SmartAI $smartTALs = []; foreach ($smartScripts as $s) { - if ($e['action_type'] == SAI_ACTION_SPAWN_SPAWNGROUP) - $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP][] = $e['action_param'.$i]; + if ($s['action_type'] == SAI_ACTION_SPAWN_SPAWNGROUP) + $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP][] = $s['action_param'.$i]; else if (in_array($s['action_type'], array_keys($lookup))) { foreach ($lookup[$s['action_type']] as $p) @@ -292,7 +292,7 @@ class SmartAI if ($smartTALs) { - if ($TALActList = DB::World()->selectCol('SELECT action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6 FROM smart_scripts WHERE source_type = ?d AND action_type IN (?a) AND entryOrGUID IN (?a)', SAI_SRC_TYPE_ACTIONLIST, $lookup, $smartTALs)) + if ($TALActList = DB::World()->select('SELECT action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6 FROM smart_scripts WHERE source_type = ?d AND action_type IN (?a) AND entryOrGUID IN (?a)', SAI_SRC_TYPE_ACTIONLIST, array_keys($lookup), $smartTALs)) { foreach ($TALActList as $e) {