SmartAI/Update

* implement events added in 3bb4f56773
This commit is contained in:
Sarjuuk
2025-10-04 20:02:34 +02:00
parent 4fe35d9e3c
commit eb95b03e31
7 changed files with 36 additions and 4 deletions

View File

@@ -98,6 +98,10 @@ class SmartEvent
public const EVENT_ON_SPELL_FAILED = 84; // On Unit::InterruptSpell
public const EVENT_ON_SPELL_START = 85; // On Spell::prapare
public const EVENT_ON_DESPAWN = 86; // On before creature removed
public const EVENT_SEND_EVENT_TRIGGER = 87; // [RESERVED] UNUSED NEEDS CHERRYPICK
public const EVENT_AREATRIGGER_EXIT = 88; // [RESERVED] don't use on 3.3.5a
public const EVENT_ON_AURA_APPLIED = 89; //
public const EVENT_ON_AURA_REMOVED = 90; //
public const FLAG_NO_REPEAT = 0x0001;
public const FLAG_DIFFICULTY_0 = 0x0002;
@@ -198,7 +202,11 @@ class SmartEvent
self::EVENT_ON_SPELL_CAST => [Type::SPELL, ['numRange', -1, true], null, null, null, 0], // SpellID, CooldownMin, CooldownMax
self::EVENT_ON_SPELL_FAILED => [Type::SPELL, ['numRange', -1, true], null, null, null, 0], // SpellID, CooldownMin, CooldownMax
self::EVENT_ON_SPELL_START => [Type::SPELL, ['numRange', -1, true], null, null, null, 0], // SpellID, CooldownMin, CooldownMax
self::EVENT_ON_DESPAWN => [null, null, null, null, null, 0] // NONE
self::EVENT_ON_DESPAWN => [null, null, null, null, null, 0], // NONE
self::EVENT_SEND_EVENT_TRIGGER => [null, null, null, null, null, 2], // UNUSED NEEDS CHERRYPICK
self::EVENT_AREATRIGGER_EXIT => [null, null, null, null, null, 2], // don't use on 3.3.5a
self::EVENT_ON_AURA_APPLIED => [Type::SPELL, ['numRange', -1, true], null, null, null, 0], // SpellID, CooldownMin, CooldownMax
self::EVENT_ON_AURA_REMOVED => [Type::SPELL, ['numRange', -1, true], null, null, null, 0] // SpellID, CooldownMin, CooldownMax
);
private array $jsGlobals = [];

View File

@@ -651,10 +651,14 @@ $lang = array(
/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null,
SmartEvent::EVENT_SCENE_COMPLETE => null,
SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['Durch mich beschworener (%1$d)?[npc=%1$d]:NPC; stirbt', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_CAST => ['Bei \'cast success\' von [spell=%1$d] ', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_FAILED => ['Bei \'cast failed\' von [spell=%1$d] ', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['Bei \'cast start\' von [spell=%1$d] ', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_CAST => ['Bei \'cast success\' von [spell=%1$d]', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_FAILED => ['Bei \'cast failed\' von [spell=%1$d]', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['Bei \'cast start\' von [spell=%1$d]', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['Beim Verschwinden', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['Wenn Aura [spell=%1$d] angewendet wird', 'Abklingzeit: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['Wenn Aura [spell=%1$d] endet', 'Abklingzeit: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'Nicht wiederholbar',

View File

@@ -655,6 +655,10 @@ $lang = array(
SmartEvent::EVENT_ON_SPELL_FAILED => ['On [spell=%1$d] cast failed', 'Cooldown: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['On [spell=%1$d] cast start', 'Cooldown: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['On despawn', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['On aura [spell=%1$d] applied', 'Cooldown: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['On aura [spell=%1$d] removed', 'Cooldown: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'No Repeat',

View File

@@ -655,6 +655,10 @@ $lang = array(
SmartEvent::EVENT_ON_SPELL_FAILED => ['Al fallar [spell=%1$d]', 'Enfriamiento: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['Al comenzar a lanzar [spell=%1$d]', 'Enfriamiento: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['Al desaparecer', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['Al aplicar el aura [spell=%1$d]', 'Enfriamiento: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['Al eliminar el aura [spell=%1$d]', 'Enfriamiento: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'Sin repetir',

View File

@@ -655,6 +655,10 @@ $lang = array(
SmartEvent::EVENT_ON_SPELL_FAILED => ['On [spell=%1$d] cast failed', 'Cooldown: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['On [spell=%1$d] cast start', 'Cooldown: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['On despawn', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['On aura [spell=%1$d] applied', 'Cooldown: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['On aura [spell=%1$d] removed', 'Cooldown: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'No Repeat',

View File

@@ -655,6 +655,10 @@ $lang = array(
SmartEvent::EVENT_ON_SPELL_FAILED => ['On [spell=%1$d] cast failed', 'Cooldown: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['On [spell=%1$d] cast start', 'Cooldown: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['On despawn', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['On aura [spell=%1$d] applied', 'Cooldown: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['On aura [spell=%1$d] removed', 'Cooldown: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'No Repeat',

View File

@@ -655,6 +655,10 @@ $lang = array(
SmartEvent::EVENT_ON_SPELL_FAILED => ['On [spell=%1$d] cast failed', 'Cooldown: %s'],
SmartEvent::EVENT_ON_SPELL_START => ['On [spell=%1$d] cast start', 'Cooldown: %s'],
SmartEvent::EVENT_ON_DESPAWN => ['On despawn', ''],
SmartEvent::EVENT_SEND_EVENT_TRIGGER => null,
SmartEvent::EVENT_AREATRIGGER_EXIT => null,
SmartEvent::EVENT_ON_AURA_APPLIED => ['On aura [spell=%1$d] applied', 'Cooldown: %s'],
SmartEvent::EVENT_ON_AURA_REMOVED => ['On aura [spell=%1$d] removed', 'Cooldown: %s']
),
'eventFlags' => array(
SmartEvent::FLAG_NO_REPEAT => 'No Repeat',