Template/Update (Part 1)

* update TrinityCore components to return new Frontend objects
   - SmartAI => Markup
   - Conditions => Data Listview
  * update template files to accept the new Frontend objects
This commit is contained in:
Sarjuuk
2025-08-05 21:50:15 +02:00
parent 226f521439
commit e943e27b5b
25 changed files with 186 additions and 235 deletions

View File

@@ -713,12 +713,12 @@ class SmartAction
break;
case self::ACTION_TALK: // 1 -> any target
case self::ACTION_SIMPLE_TALK: // 84 -> any target
$noSrc = false;
if ($npcId = $this->smartAI->getTarget()->getTalkSource($noSrc))
$playerSrc = false;
if ($npcId = $this->smartAI->getTarget()->getTalkSource($playerSrc))
{
if ($quotes = $this->smartAI->getQuote($npcId, $this->param[0], $npcSrc))
foreach ($quotes as ['text' => $text, 'prefix' => $prefix])
$this->param[10] .= sprintf($text, $noSrc ? '' : sprintf($prefix, $npcSrc), $npcSrc);
foreach ($quotes as ['text' => $text])
$this->param[10] .= sprintf($text, $playerSrc ? Lang::main('thePlayer') : $npcSrc);
}
else
trigger_error('SmartAI::action - could not determine talk source for action #'.$this->type);