From 870cbea2cac2807724b70c6b782ff9c37f576b40 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Tue, 11 Feb 2025 22:09:32 +0100 Subject: [PATCH] SmartAI/Update * update events and actions to match TrinityCore again * removed events and actions have been kept but marked as deprecated * general rewording and use of UIES for better readability * move constants to respective classes * reevaluate usage of UNIT_FIELD_BYTES1 content --- .../Conditions/Conditions.class.php} | 0 includes/components/SmartAI/SmartAI.class.php | 755 ++++++++ .../components/SmartAI/SmartAction.class.php | 746 ++++++++ .../components/SmartAI/SmartEvent.class.php | 380 ++++ .../components/SmartAI/SmartTarget.class.php | 183 ++ includes/defines.php | 454 +---- includes/game.php | 4 +- includes/kernel.php | 34 +- includes/smartAI.class.php | 1642 ----------------- includes/types/quest.class.php | 2 +- localization/locale_dede.php | 621 ++++--- localization/locale_enus.php | 622 ++++--- localization/locale_eses.php | 621 ++++--- localization/locale_frfr.php | 621 ++++--- localization/locale_ruru.php | 621 ++++--- localization/locale_zhcn.php | 621 ++++--- pages/areatrigger.php | 7 +- pages/npc.php | 16 +- pages/object.php | 6 +- setup/tools/sqlgen/areatrigger.ss.php | 2 +- setup/tools/sqlgen/spawns.ss.php | 4 +- setup/tools/sqlgen/spell.ss.php | 2 +- 22 files changed, 4175 insertions(+), 3789 deletions(-) rename includes/{conditions.class.php => components/Conditions/Conditions.class.php} (100%) create mode 100644 includes/components/SmartAI/SmartAI.class.php create mode 100644 includes/components/SmartAI/SmartAction.class.php create mode 100644 includes/components/SmartAI/SmartEvent.class.php create mode 100644 includes/components/SmartAI/SmartTarget.class.php delete mode 100644 includes/smartAI.class.php diff --git a/includes/conditions.class.php b/includes/components/Conditions/Conditions.class.php similarity index 100% rename from includes/conditions.class.php rename to includes/components/Conditions/Conditions.class.php diff --git a/includes/components/SmartAI/SmartAI.class.php b/includes/components/SmartAI/SmartAI.class.php new file mode 100644 index 00000000..6de64a23 --- /dev/null +++ b/includes/components/SmartAI/SmartAI.class.php @@ -0,0 +1,755 @@ +selectCell('SELECT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` = ?d', $type, $guid)) + return $_; + + trigger_error('SmartAI::resolveGuid - failed to resolve guid '.$guid.' of type '.$type, E_USER_WARNING); + return null; + } + + private function numRange(int $min, int $max, bool $isTime) : string + { + if (!$min && !$max) + return ''; + + $str = $isTime ? Util::formatTime($min, true) : $min; + if ($max > $min) + $str .= ' – '.($isTime ? Util::formatTime($max, true) : $max); + + return $str; + } + + private function formatTime(int $time, int $_, bool $isMilliSec) : string + { + if (!$time) + return ''; + + return Util::formatTime($time * ($isMilliSec ? 1 : 1000), false); + } + + private function castFlags(int $flags) : string + { + $cf = []; + for ($i = 1; $i <= SmartAI::CAST_FLAG_COMBAT_MOVE; $i <<= 1) + if (($flags & $i) && ($x = Lang::smartAI('castFlags', $i))) + $cf[] = $x; + + return Lang::concat($cf); + } + + private function npcFlags(int $flags) : string + { + $nf = []; + for ($i = 1; $i <= NPC_FLAG_MAILBOX; $i <<= 1) + if (($flags & $i) && ($x = Lang::npc('npcFlags', $i))) + $nf[] = $x; + + return Lang::concat($nf ?: [Lang::smartAI('empty')]); + } + + private function dynFlags(int $flags) : string + { + $df = []; + for ($i = 1; $i <= UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST; $i <<= 1) + if (($flags & $i) && ($x = Lang::unit('dynFlags', $i))) + $df[] = $x; + + return Lang::concat($df ?: [Lang::smartAI('empty')]); + } + + private function goFlags(int $flags) : string + { + $gf = []; + for ($i = 1; $i <= GO_FLAG_DESTROYED; $i <<= 1) + if (($flags & $i) && ($x = Lang::gameObject('goFlags', $i))) + $gf[] = $x; + + return Lang::concat($gf ?: [Lang::smartAI('empty')]); + } + + private function spawnFlags(int $flags) : string + { + $sf = []; + for ($i = 1; $i <= SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN; $i <<= 1) + if (($flags & $i) && ($x = Lang::smartAI('spawnFlags', $i))) + $sf[] = $x; + + return Lang::concat($sf ?: [Lang::smartAI('empty')]); + } + + private function unitFlags(int $flags, int $flags2) : string + { + $field = $flags2 ? 'flags2' : 'flags'; + $max = $flags2 ? UNIT_FLAG2_ALLOW_CHEAT_SPELLS : UNIT_FLAG_UNK_31; + $uf = []; + + for ($i = 1; $i <= $max; $i <<= 1) + if (($flags & $i) && ($x = Lang::unit($field, $i))) + $uf[] = $x; + + return Lang::concat($uf ?: [Lang::smartAI('empty')]); + } + + private function unitFieldBytes1(int $flags, int $idx) : string + { + switch ($idx) + { + case 0: + case 3: + return Lang::unit('bytes1', 'bytesIdx', $idx).Lang::main('colon').(Lang::unit('bytes1', $idx, $flags) ?? Lang::unit('bytes1', 'valueUNK', [$flags, $idx])); + case 2: + $buff = []; + for ($i = 1; $i <= 0x10; $i <<= 1) + if (($flags & $i) && ($x = Lang::unit('bytes1', $idx, $flags))) + $buff[] = $x; + + return Lang::unit('bytes1', 'bytesIdx', $idx).Lang::main('colon').($buff ? Lang::concat($buff) : Lang::unit('bytes1', 'valueUNK', [$flags, $idx])); + default: + return Lang::unit('bytes1', 'idxUNK', [$idx]); + } + } + + private function summonType(int $x) : string + { + return Lang::smartAI('summonTypes', $x) ?? Lang::smartAI('summonType', 'summonTypeUNK', [$x]); + } + + private function sheathState(int $x) : string + { + return Lang::smartAI('sheaths', $x) ?? Lang::smartAI('sheathUNK', [$x]); + } + + private function aiTemplate(int $x) : string + { + return Lang::smartAI('aiTpl', $x) ?? Lang::smartAI('aiTplUNK', [$x]); + } + + private function reactState(int $x) : string + { + return Lang::smartAI('reactStates', $x) ?? Lang::smartAI('reactStateUNK', [$x]); + } + + private function powerType(int $x) : string + { + return Lang::spell('powerTypes', $x) ?? Lang::smartAI('powerTypeUNK', [$x]); + } + + private function hostilityMode(int $x) : string + { + return Lang::smartAI('hostilityModes', $x) ?? Lang::smartAI('hostilityModeUNK', [$x]); + } + + private function motionType(int $x) : string + { + return Lang::smartAI('motionTypes', $x) ?? Lang::smartAI('motionTypeUNK', [$x]); + } + + private function lootState(int $x) : string + { + return Lang::smartAI('lootStates', $x) ?? Lang::smartAI('lootStateUNK', [$x]); + } + private function weatherState(int $x) : string + { + return Lang::smartAI('weatherStates', $x) ?? Lang::smartAI('weatherStateUNK', [$x]); + } + + private function magicSchool(int $x) : string + { + return Lang::getMagicSchools($x); + } +} + +class SmartAI +{ + public const SRC_TYPE_CREATURE = 0; + public const SRC_TYPE_OBJECT = 1; + public const SRC_TYPE_AREATRIGGER = 2; + public const SRC_TYPE_ACTIONLIST = 9; + + public const CAST_FLAG_INTERRUPT_PREV = 0x01; // Interrupt any spell casting + public const CAST_FLAG_TRIGGERED = 0x02; // Triggered (this makes spell cost zero mana and have no cast time) +// public const CAST_FORCE_CAST = 0x04; // Forces cast even if creature is out of mana or out of range +// public const CAST_NO_MELEE_IF_OOM = 0x08; // Prevents creature from entering melee if out of mana or out of range +// public const CAST_FORCE_TARGET_SELF = 0x10; // the target to cast this spell on itself + public const CAST_FLAG_AURA_MISSING = 0x20; // Only casts the spell if the target does not have an aura from the spell + public const CAST_FLAG_COMBAT_MOVE = 0x40; // Prevents combat movement if cast successful. Allows movement on range, OOM, LOS + + public const REACT_PASSIVE = 0; + public const REACT_DEFENSIVE = 1; + public const REACT_AGGRESSIVE = 2; + public const REACT_ASSIST = 3; + + public const SUMMON_TIMED_OR_DEAD_DESPAWN = 1; + public const SUMMON_TIMED_OR_CORPSE_DESPAWN = 2; + public const SUMMON_TIMED_DESPAWN = 3; + public const SUMMON_TIMED_DESPAWN_OOC = 4; + public const SUMMON_CORPSE_DESPAWN = 5; + public const SUMMON_CORPSE_TIMED_DESPAWN = 6; + public const SUMMON_DEAD_DESPAWN = 7; + public const SUMMON_MANUAL_DESPAWN = 8; + + public const TEMPLATE_BASIC = 0; // + public const TEMPLATE_CASTER = 1; // +JOIN: target_param1 as castFlag + public const TEMPLATE_TURRET = 2; // +JOIN: target_param1 as castflag + public const TEMPLATE_PASSIVE = 3; // + public const TEMPLATE_CAGED_GO_PART = 4; // + public const TEMPLATE_CAGED_NPC_PART = 5; // + + public const SPAWN_FLAG_NONE = 0x00; + public const SPAWN_FLAG_IGNORE_RESPAWN = 0x01; // onSpawnIn - ignore & reset respawn timer + public const SPAWN_FLAG_FORCE_SPAWN = 0x02; // onSpawnIn - force additional spawn if already in world + public const SPAWN_FLAG_NOSAVE_RESPAWN = 0x04; // onDespawn - remove respawn time + + private array $jsGlobals = []; + private array $rawData = []; + private array $result = []; + private array $tabs = []; + private array $itr = []; + + private array $quotes = []; + + // misc data + public readonly int $baseEntry; // I'm a timed action list belonging to this entry + public readonly string $title; // title appendix for the [toggle] + public readonly int $teleportTargetArea; // precalculated areaId so we don't have to look it up right now + + public function __construct(public readonly int $srcType = 0, public readonly int $entry = 0, array $miscData = []) + { + $this->baseEntry = $miscData['baseEntry'] ?? 0; + $this->title = $miscData['title'] ?? ''; + $this->teleportTargetArea = $miscData['teleportTargetArea'] ?? 0; + + $raw = DB::World()->select( + 'SELECT `id`, `link`, + `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, + `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, + `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o` + FROM smart_scripts + WHERE `entryorguid` = ?d AND `source_type` = ?d + ORDER BY `id` ASC', + $this->entry, $this->srcType); + + foreach ($raw as $r) + { + $this->rawData[$r['id']] = array( + 'id' => $r['id'], + 'link' => $r['link'], + 'event' => new SmartEvent($r['id'], $r['event_type'], $r['event_phase_mask'], $r['event_chance'], $r['event_flags'], [$r['event_param1'], $r['event_param2'], $r['event_param3'], $r['event_param4'], $r['event_param5']], $this), + 'action' => new SmartAction($r['id'], $r['action_type'], [$r['action_param1'], $r['action_param2'], $r['action_param3'], $r['action_param4'], $r['action_param5'], $r['action_param6']], $this), + 'target' => new SmartTarget($r['id'], $r['target_type'], [$r['target_param1'], $r['target_param2'], $r['target_param3'], $r['target_param4']], [$r['target_x'], $r['target_y'], $r['target_z'], $r['target_o']], $this) + ); + } + } + + + /*********************/ + /* Lookups by action */ + /*********************/ + + public static function getOwnerOfNPCSummon(int $npcId, int $typeFilter = 0) : array + { + if ($npcId <= 0) + return []; + + $lookup = array( + SmartAction::ACTION_SUMMON_CREATURE => [1 => $npcId], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => [1 => $npcId] + ); + + if ($npcGuids = DB::Aowow()->selectCol('SELECT `guid` FROM ?_spawns WHERE `type` = ?d AND `typeId` = ?d', Type::NPC, $npcId)) + if ($groups = DB::World()->selectCol('SELECT `groupId` FROM spawn_group WHERE `spawnType` = 0 AND `spawnId` IN (?a)', $npcGuids)) + foreach ($groups as $g) + $lookup[SmartAction::ACTION_SPAWN_SPAWNGROUP][1] = $g; + + $result = self::getActionOwner($lookup, $typeFilter); + + // can skip lookups for SmartAction::ACTION_SUMMON_CREATURE_GROUP as creature_summon_groups already contains summoner info + if ($sgs = DB::World()->select('SELECT `summonerType` AS "0", `summonerId` AS "1" FROM creature_summon_groups WHERE `entry` = ?d', $npcId)) + foreach ($sgs as [$type, $typeId]) + $result[$type][] = $typeId; + + return $result; + } + + public static function getOwnerOfObjectSummon(int $objectId, int $typeFilter = 0) : array + { + if ($objectId <= 0) + return []; + + $lookup = array( + SmartAction::ACTION_SUMMON_GO => [1 => $objectId] + ); + + if ($objGuids = DB::Aowow()->selectCol('SELECT `guid` FROM ?_spawns WHERE `type` = ?d AND `typeId` = ?d', Type::OBJECT, $objectId)) + if ($groups = DB::World()->selectCol('SELECT `groupId` FROM spawn_group WHERE `spawnType` = 1 AND `spawnId` IN (?a)', $objGuids)) + foreach ($groups as $g) + $lookup[SmartAction::ACTION_SPAWN_SPAWNGROUP][1] = $g; + + return self::getActionOwner($lookup, $typeFilter); + } + + public static function getOwnerOfSpellCast(int $spellId, int $typeFilter = 0) : array + { + if ($spellId <= 0) + return []; + + $lookup = array( + SmartAction::ACTION_CAST => [1 => $spellId], + SmartAction::ACTION_ADD_AURA => [1 => $spellId], + SmartAction::ACTION_SELF_CAST => [1 => $spellId], + SmartAction::ACTION_CROSS_CAST => [1 => $spellId], + SmartAction::ACTION_INVOKER_CAST => [1 => $spellId] + ); + + return self::getActionOwner($lookup, $typeFilter); + } + + public static function getOwnerOfSoundPlayed(int $soundId, int $typeFilter = 0) : array + { + if ($soundId <= 0) + return []; + + $lookup = array( + SmartAction::ACTION_SOUND => [1 => $soundId] + ); + + return self::getActionOwner($lookup, $typeFilter); + } + + // lookup: SmartActionId => [[paramIdx => value], ...] + private static function getActionOwner(array $lookup, int $typeFilter = 0) : array + { + $qParts = []; + $result = []; + $genFilter = $talFilter = []; + switch ($typeFilter) + { + case Type::NPC: + $genFilter = [self::SRC_TYPE_CREATURE, self::SRC_TYPE_ACTIONLIST]; + $talFilter = [self::SRC_TYPE_CREATURE]; + break; + case Type::OBJECT: + $genFilter = [self::SRC_TYPE_OBJECT, self::SRC_TYPE_ACTIONLIST]; + $talFilter = [self::SRC_TYPE_OBJECT]; + break; + case Type::AREATRIGGER: + $genFilter = [self::SRC_TYPE_AREATRIGGER, self::SRC_TYPE_ACTIONLIST]; + $talFilter = [self::SRC_TYPE_AREATRIGGER]; + break; + } + + foreach ($lookup as $action => $params) + { + $aq = '(`action_type` = '.(int)$action.' AND ('; + $pq = []; + foreach ($params as $idx => $p) + $pq[] = '`action_param'.(int)$idx.'` = '.(int)$p; + + if ($pq) + $qParts[] = $aq.implode(' OR ', $pq).'))'; + } + + $smartS = DB::World()->select(sprintf('SELECT `source_type` AS "0", `entryOrGUID` AS "1" FROM smart_scripts WHERE (%s){ AND `source_type` IN (?a)}', $qParts ? implode(' OR ', $qParts) : '0'), $genFilter ?: DBSIMPLE_SKIP); + + // filter for TAL shenanigans + if ($smartTAL = array_filter($smartS, fn($x) => $x[0] == self::SRC_TYPE_ACTIONLIST)) + { + $smartS = array_diff_key($smartS, $smartTAL); + + $q = []; + foreach ($smartTAL as [, $eog]) + { + // SmartAction::ACTION_CALL_TIMED_ACTIONLIST + $q[] = '`action_type` = '.SmartAction::ACTION_CALL_TIMED_ACTIONLIST.' AND `action_param1` = '.$eog; + + // SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST + $q[] = '`action_type` = '.SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST.' AND (`action_param1` = '.$eog.' OR `action_param2` = '.$eog.' OR `action_param3` = '.$eog.' OR `action_param4` = '.$eog.' OR `action_param5` = '.$eog.')'; + + // SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST + $q[] = '`action_type` = '.SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST.' AND `action_param1` <= '.$eog.' AND `action_param2` >= '.$eog; + } + + if ($_ = DB::World()->select(sprintf('SELECT `source_type` AS "0", `entryOrGUID` AS "1" FROM smart_scripts WHERE ((%s)){ AND `source_type` IN (?a)}', $q ? implode(') OR (', $q) : '0'), $talFilter ?: DBSIMPLE_SKIP)) + $smartS = array_merge($smartS, $_); + } + + // filter guids for entries + if ($smartG = array_filter($smartS, fn($x) => $x[1] < 0)) + { + $smartS = array_diff_key($smartS, $smartG); + + $q = []; + foreach ($smartG as [$st, $eog]) + { + if ($st == self::SRC_TYPE_CREATURE) + $q[] = '`type` = '.Type::NPC.' AND `guid` = '.-$eog; + else if ($st == self::SRC_TYPE_OBJECT) + $q[] = '`type` = '.Type::OBJECT.' AND `guid` = '.-$eog; + } + + if ($q) + { + $owner = DB::Aowow()->select(sprintf('SELECT `type`, `typeId` FROM ?_spawns WHERE (%s)', implode(') OR (', $q))); + foreach ($owner as $o) + $result[$o['type']][] = $o['typeId']; + } + } + + foreach ($smartS as [$st, $eog]) + { + if ($st == self::SRC_TYPE_CREATURE) + $result[Type::NPC][] = $eog; + else if ($st == self::SRC_TYPE_OBJECT) + $result[Type::OBJECT][] = $eog; + else if ($st == self::SRC_TYPE_AREATRIGGER) + $result[Type::AREATRIGGER][] = $eog; + } + + return $result; + } + + + /********************/ + /* Lookups by owner */ + /********************/ + + public static function getNPCSummonsForOwner(int $entry, int $srcType = self::SRC_TYPE_CREATURE) : array + { + // action => paramIdx with npcIds/spawnGoupIds + $lookup = array( + SmartAction::ACTION_SUMMON_CREATURE => [1], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => [1], + SmartAction::ACTION_SPAWN_SPAWNGROUP => [1] + ); + + $result = self::getOwnerAction($srcType, $entry, $lookup, $moreInfo); + + // can skip lookups for SmartAction::ACTION_SUMMON_CREATURE_GROUP as creature_summon_groups already contains summoner info + if ($srcType == self::SRC_TYPE_CREATURE || $srcType == self::SRC_TYPE_OBJECT) + { + $st = $srcType == self::SRC_TYPE_CREATURE ? SUMMONER_TYPE_CREATURE : SUMMONER_TYPE_GAMEOBJECT; + if ($csg = DB::World()->selectCol('SELECT `entry` FROM creature_summon_groups WHERE `summonerType` = ?d AND `summonerId` = ?d', $st, $entry)) + $result = array_merge($result, $csg); + } + + if (!empty($moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP])) + { + $grp = $moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP]; + if ($sgs = DB::World()->selectCol('SELECT `spawnId` FROM spawn_group WHERE `spawnType` = ?d AND `groupId` IN (?a)', SUMMONER_TYPE_CREATURE, $grp)) + if ($ids = DB::Aowow()->selectCol('SELECT DISTINCT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` IN (?a)', Type::NPC, $sgs)) + $result = array_merge($result, $ids); + } + + return $result; + } + + public static function getObjectSummonsForOwner(int $entry, int $srcType = self::SRC_TYPE_CREATURE) : array + { + // action => paramIdx with gobIds/spawnGoupIds + $lookup = array( + SmartAction::ACTION_SUMMON_GO => [1], + SmartAction::ACTION_SPAWN_SPAWNGROUP => [1] + ); + + $result = self::getOwnerAction($srcType, $entry, $lookup, $moreInfo); + + if (!empty($moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP])) + { + $grp = $moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP]; + if ($sgs = DB::World()->selectCol('SELECT `spawnId` FROM spawn_group WHERE `spawnType` = ?d AND `groupId` IN (?a)', SUMMONER_TYPE_GAMEOBJECT, $grp)) + if ($ids = DB::Aowow()->selectCol('SELECT DISTINCT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` IN (?a)', Type::OBJECT, $sgs)) + $result = array_merge($result, $ids); + } + + return $result; + } + + public static function getSpellCastsForOwner(int $entry, int $srcType = self::SRC_TYPE_CREATURE) : array + { + // action => paramIdx with spellIds + $lookup = array( + self::SRC_TYPE_CREATURE => [1], + SmartAction::ACTION_CAST => [1], + SmartAction::ACTION_ADD_AURA => [1], + SmartAction::ACTION_INVOKER_CAST => [1], + SmartAction::ACTION_CROSS_CAST => [1] + ); + + return self::getOwnerAction($srcType, $entry, $lookup); + } + + public static function getSoundsPlayedForOwner(int $entry, int $srcType = self::SRC_TYPE_CREATURE) : array + { + // action => paramIdx with soundIds + $lookup = array( + SmartAction::ACTION_SOUND => [1] + ); + + return self::getOwnerAction($srcType, $entry, $lookup); + } + + // lookup: [SmartActionId => [paramIdx, ...], ...] + private static function getOwnerAction(int $sourceType, int $entry, array $lookup, ?array &$moreInfo = []) : array + { + if ($entry < 0) // no lookup by GUID + return []; + + $actionQuery = '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)'; + + $smartScripts = DB::World()->select($actionQuery, $sourceType, array_merge(array_keys($lookup), SmartAction::ACTION_ALL_TIMED_ACTION_LISTS), [$entry]); + $smartResults = []; + $smartTALs = []; + foreach ($smartScripts as $s) + { + if ($s['action_type'] == SmartAction::ACTION_SPAWN_SPAWNGROUP) + $moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP][] = $s['action_param1']; + else if (in_array($s['action_type'], array_keys($lookup))) + { + foreach ($lookup[$s['action_type']] as $p) + $smartResults[] = $s['action_param'.$p]; + } + else if ($s['action_type'] == SmartAction::ACTION_CALL_TIMED_ACTIONLIST) + $smartTALs[] = $s['action_param1']; + else if ($s['action_type'] == SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST) + { + for ($i = 1; $i < 7; $i++) + if ($s['action_param'.$i]) + $smartTALs[] = $s['action_param'.$i]; + } + else if ($s['action_type'] == SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST) + { + for ($i = $s['action_param1']; $i <= $s['action_param2']; $i++) + $smartTALs[] = $i; + } + } + + if ($smartTALs) + { + if ($TALActList = DB::World()->select($actionQuery, self::SRC_TYPE_ACTIONLIST, array_keys($lookup), $smartTALs)) + { + foreach ($TALActList as $e) + { + foreach ($lookup[$e['action_type']] as $i) + { + if ($e['action_type'] == SmartAction::ACTION_SPAWN_SPAWNGROUP) + $moreInfo[SmartAction::ACTION_SPAWN_SPAWNGROUP][] = $e['action_param'.$i]; + else + $smartResults[] = $e['action_param'.$i]; + } + } + } + } + + return $smartResults; + } + + + /******************************/ + /* Structured Lisview Display */ + /******************************/ + + private function &iterate() : Generator + { + reset($this->rawData); + + foreach ($this->rawData as $k => $__) + { + $this->itr = &$this->rawData[$k]; + + yield $this->itr; + } + } + + public function prepare() : bool + { + if (!$this->rawData) + return false; + + if ($this->result) + return true; + + $hidePhase = + $hideChance = true; + + foreach ($this->iterate() as $id => $__) + { + $rowIdx = Util::createHash(8); + + if ($this->itr['action']->type == SmartAction::ACTION_TALK || $this->itr['action']->type == SmartAction::ACTION_SIMPLE_TALK) + if ($ts = $this->itr['target']->getTalkSource()) + $this->initQuotes($ts); + + [$evtBody, $evtFooter] = $this->itr['event']->process(); + [$actBody, $actFooter] = $this->itr['action']->process(); + + $evtBody = str_replace(['#target#', '#rowIdx#'], [$this->itr['target']->process(), $rowIdx], $evtBody); + $actBody = str_replace(['#target#', '#rowIdx#'], [$this->itr['target']->process(), $rowIdx], $actBody); + + if (!$this->itr['event']->hasPhases()) + $hidePhase = false; + + if ($this->itr['event']->chance != 100) + $hideChance = false; + + $this->result[] = array( + $this->itr['id'], + implode(', ', Util::mask2bits($this->itr['event']->phaseMask, 1)), + $evtBody.($evtFooter ? '[div float=right margin=0px clear=both][i][small class=q0]'.$evtFooter.'[/small][/i][/div]' : null), + $this->itr['event']->chance.'%', + $actBody.($actFooter ? '[div float=right margin=0px clear=both][i][small class=q0]'.$actFooter.'[/small][/i][/div]' : null) + ); + } + + $th = array( + '#' => 16, + 'Phase' => 32, + 'Event' => 350, + 'Chance' => 24, + 'Action' => 0 + ); + + if ($hidePhase) + { + unset($th['Phase']); + foreach ($this->result as &$r) + unset($r[1]); + } + unset($r); + + if ($hideChance) + { + unset($th['Chance']); + foreach ($this->result as &$r) + unset($r[3]); + } + unset($r); + + $tbl = '[tr]'; + foreach ($th as $n => $w) + $tbl .= '[td header '.($w ? 'width='.$w.'px' : null).']'.$n.'[/td]'; + $tbl .= '[/tr]'; + + foreach ($this->result as $r) + $tbl .= '[tr][td]'.implode('[/td][td]', $r).'[/td][/tr]'; + + if ($this->srcType == self::SRC_TYPE_ACTIONLIST) + $this->tabs[$this->entry] = $tbl; + else + $this->tabs[0] = $tbl; + + return true; + } + + public function getMarkdown() : string + { + # id | event (footer phase) | chance | action + target + + if (!$this->rawData) + return ''; + + $return = '[style]#text-generic .grid { clear:left; } #text-generic .tabbed-contents { padding:0px; clear:left; }[/style][pad][h3][toggler id=sai]SmartAI'.$this->title.'[/toggler][/h3][div id=sai clear=left]%s[/div]'; + if (count($this->tabs) > 1) + { + $wrapper = '[tabs name=sai width=942px]%s[/tabs]'; + $return = '[script]function TalTabClick(id) { $(\'#dsf67g4d-sai\').find(\\\'[href=\\\\\'#sai-actionlist-\' + id + \'\\\\\']\\\').click(); }[/script]' . $return; + $tabs = ''; + foreach ($this->tabs as $guid => $data) + { + $buff = '[tab name=\"'.($guid ? 'ActionList #'.$guid : 'Main').'\"][table class=grid width=940px]'.$data.'[/table][/tab]'; + if ($guid) + $tabs .= $buff; + else + $tabs = $buff . $tabs; + } + + return sprintf($return, sprintf($wrapper, $tabs)); + } + else + return sprintf($return, '[table class=grid width=940px]'.$this->tabs[0].'[/table]'); + } + + public function addJsGlobals(array $jsg) : void + { + Util::mergeJsGlobals($this->jsGlobals, $jsg); + } + + public function getJSGlobals() : array + { + return $this->jsGlobals; + } + + public function getTabs() : array + { + return $this->tabs; + } + + public function addTab(int $guid, string $tt) : void + { + $this->tabs[$guid] = $tt; + } + + public function getTarget(int $id = -1) : ?SmartTarget + { + if ($id < 0) + return $this->itr['target']; + + return $this->rawData[$id]['target'] ?? null; + } + + public function getAction(int $id = -1) : ?SmartAction + { + if ($id < 0) + return $this->itr['action']; + + return $this->rawData[$id]['action'] ?? null; + } + + public function getEvent(int $id = -1) : ?SmartEvent + { + if ($id < 0) + return $this->itr['event']; + + return $this->rawData[$id]['event'] ?? null; + } + + public function getEntry() : int + { + return $this->baseEntry ?: $this->entry; + } + + private function initQuotes(int $creatureId) : void + { + if (isset($this->quotes[$creatureId])) + return; + + [$quotes, , ] = Game::getQuotesForCreature($creatureId); + + $this->quotes[$creatureId] = $quotes; + + if (!empty($this->quotes[$creatureId])) + $this->quotes[$creatureId]['src'] = CreatureList::getName($creatureId); + } + + public function getQuote(int $creatureId, int $group, ?string &$npcSrc) : array + { + if (isset($this->quotes[$creatureId][$group])) + { + $npcSrc = $this->quotes[$creatureId]['src']; + return $this->quotes[$creatureId][$group]; + } + + return []; + } +} + +?> diff --git a/includes/components/SmartAI/SmartAction.class.php b/includes/components/SmartAI/SmartAction.class.php new file mode 100644 index 00000000..0e2d0711 --- /dev/null +++ b/includes/components/SmartAI/SmartAction.class.php @@ -0,0 +1,746 @@ + [null, null, null, null, null, null, 0], // No action + self::ACTION_TALK => [null, ['formatTime', -1, true], null, null, null, null, 0], // groupID from creature_text, duration to wait before TEXT_OVER event is triggered, useTalkTarget (0/1) - use target as talk target + self::ACTION_SET_FACTION => [null, null, null, null, null, null, 0], // FactionId (or 0 for default) + self::ACTION_MORPH_TO_ENTRY_OR_MODEL => [Type::NPC, null, null, null, null, null, 0], // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph) + self::ACTION_SOUND => [Type::SOUND, null, null, null, null, null, 0], // SoundId, onlySelf + self::ACTION_PLAY_EMOTE => [null, null, null, null, null, null, 0], // EmoteId + self::ACTION_FAIL_QUEST => [Type::QUEST, null, null, null, null, null, 0], // QuestID + self::ACTION_OFFER_QUEST => [Type::QUEST, null, null, null, null, null, 0], // QuestID, directAdd + self::ACTION_SET_REACT_STATE => [['reactState', 10, false], null, null, null, null, null, 0], // state + self::ACTION_ACTIVATE_GOBJECT => [null, null, null, null, null, null, 0], // + self::ACTION_RANDOM_EMOTE => [null, null, null, null, null, null, 0], // EmoteId1, EmoteId2, EmoteId3... + self::ACTION_CAST => [Type::SPELL, ['castFlags', -1, false], null, null, null, null, 0], // SpellId, CastFlags, TriggeredFlags + self::ACTION_SUMMON_CREATURE => [Type::NPC, ['summonType', -1, false], ['formatTime', 10, true], null, null, null, 0], // CreatureID, summonType, duration in ms, attackInvoker, flags(SmartActionSummonCreatureFlags) + self::ACTION_THREAT_SINGLE_PCT => [null, null, null, null, null, null, 0], // Threat% + self::ACTION_THREAT_ALL_PCT => [null, null, null, null, null, null, 0], // Threat% + self::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => [Type::QUEST, null, null, null, null, null, 0], // QuestID + self::ACTION_SET_INGAME_PHASE_ID => [null, null, null, null, null, null, 2], // used on 4.3.4 and higher scripts + self::ACTION_SET_EMOTE_STATE => [null, null, null, null, null, null, 0], // emoteID + self::ACTION_SET_UNIT_FLAG => [['unitFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_REMOVE_UNIT_FLAG => [['unitFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_AUTO_ATTACK => [null, null, null, null, null, null, 0], // AllowAttackState (0 = stop attack, anything else means continue attacking) + self::ACTION_ALLOW_COMBAT_MOVEMENT => [null, null, null, null, null, null, 0], // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) + self::ACTION_SET_EVENT_PHASE => [null, null, null, null, null, null, 0], // Phase + self::ACTION_INC_EVENT_PHASE => [null, null, null, null, null, null, 0], // Value (may be negative to decrement phase, should not be 0) + self::ACTION_EVADE => [null, null, null, null, null, null, 0], // toRespawnPosition (0 = Move to RespawnPosition, 1 = Move to last stored home position) + self::ACTION_FLEE_FOR_ASSIST => [null, null, null, null, null, null, 0], // With Emote + self::ACTION_CALL_GROUPEVENTHAPPENS => [Type::QUEST, null, null, null, null, null, 0], // QuestID + self::ACTION_COMBAT_STOP => [null, null, null, null, null, null, 0], // + self::ACTION_REMOVEAURASFROMSPELL => [Type::SPELL, null, null, null, null, null, 0], // Spellid (0 removes all auras), charges (0 removes aura) + self::ACTION_FOLLOW => [null, null, null, null, null, null, 0], // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event) + self::ACTION_RANDOM_PHASE => [null, null, null, null, null, null, 0], // PhaseId1, PhaseId2, PhaseId3... + self::ACTION_RANDOM_PHASE_RANGE => [null, null, null, null, null, null, 0], // PhaseMin, PhaseMax + self::ACTION_RESET_GOBJECT => [null, null, null, null, null, null, 0], // + self::ACTION_CALL_KILLEDMONSTER => [Type::NPC, null, null, null, null, null, 0], // CreatureId, + self::ACTION_SET_INST_DATA => [null, null, null, null, null, null, 0], // Field, Data, Type (0 = SetData, 1 = SetBossState) + self::ACTION_SET_INST_DATA64 => [null, null, null, null, null, null, 0], // Field, + self::ACTION_UPDATE_TEMPLATE => [Type::NPC, null, null, null, null, null, 0], // Entry + self::ACTION_DIE => [null, null, null, null, null, null, 0], // No Params + self::ACTION_SET_IN_COMBAT_WITH_ZONE => [null, null, null, null, null, null, 0], // No Params + self::ACTION_CALL_FOR_HELP => [null, null, null, null, null, null, 0], // Radius, With Emote + self::ACTION_SET_SHEATH => [['sheathState', 10, false], null, null, null, null, null, 0], // Sheath (0-unarmed, 1-melee, 2-ranged) + self::ACTION_FORCE_DESPAWN => [['formatTime', 10, true], ['formatTime', 11, false], null, null, null, null, 0], // timer + self::ACTION_SET_INVINCIBILITY_HP_LEVEL => [null, null, null, null, null, null, 0], // MinHpValue(+pct, -flat) + self::ACTION_MOUNT_TO_ENTRY_OR_MODEL => [Type::NPC, null, null, null, null, null, 0], // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to dismount) + self::ACTION_SET_INGAME_PHASE_MASK => [null, null, null, null, null, null, 0], // mask + self::ACTION_SET_DATA => [null, null, null, null, null, null, 0], // Field, Data (only creature @todo) + self::ACTION_ATTACK_STOP => [null, null, null, null, null, null, 0], // + self::ACTION_SET_VISIBILITY => [null, null, null, null, null, null, 0], // on/off + self::ACTION_SET_ACTIVE => [null, null, null, null, null, null, 0], // on/off + self::ACTION_ATTACK_START => [null, null, null, null, null, null, 0], // + self::ACTION_SUMMON_GO => [Type::OBJECT, ['formatTime', 10, false], null, null, null, null, 0], // GameObjectID, DespawnTime in s + self::ACTION_KILL_UNIT => [null, null, null, null, null, null, 0], // + self::ACTION_ACTIVATE_TAXI => [null, null, null, null, null, null, 0], // TaxiID + self::ACTION_WP_START => [null, null, null, Type::QUEST, ['formatTime', 10, true], ['reactState', 11, false], 0], // run/walk, pathID, canRepeat, quest, despawntime + self::ACTION_WP_PAUSE => [['formatTime', 10, true], null, null, null, null, null, 0], // time + self::ACTION_WP_STOP => [['formatTime', 10, true], Type::QUEST, null, null, null, null, 0], // despawnTime, quest, fail? + self::ACTION_ADD_ITEM => [Type::ITEM, null, null, null, null, null, 0], // itemID, count + self::ACTION_REMOVE_ITEM => [Type::ITEM, null, null, null, null, null, 0], // itemID, count + self::ACTION_INSTALL_AI_TEMPLATE => [['aiTemplate', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_SET_RUN => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_DISABLE_GRAVITY => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_SWIM => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_TELEPORT => [null, null, null, null, null, null, 0], // mapID, + self::ACTION_SET_COUNTER => [null, null, null, null, null, null, 0], // id, value, reset (0/1) + self::ACTION_STORE_TARGET_LIST => [null, null, null, null, null, null, 0], // varID, + self::ACTION_WP_RESUME => [null, null, null, null, null, null, 0], // none + self::ACTION_SET_ORIENTATION => [null, null, null, null, null, null, 0], // + self::ACTION_CREATE_TIMED_EVENT => [null, ['numRange', 10, true], null, ['numRange', -1, true], null, null, 0], // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance + self::ACTION_PLAYMOVIE => [null, null, null, null, null, null, 0], // entry + self::ACTION_MOVE_TO_POS => [null, null, null, null, null, null, 0], // PointId, transport, disablePathfinding, ContactDistance + self::ACTION_ENABLE_TEMP_GOBJ => [['formatTime', 10, false], null, null, null, null, null, 0], // despawnTimer (sec) + self::ACTION_EQUIP => [null, null, Type::ITEM, Type::ITEM, Type::ITEM, null, 0], // entry, slotmask slot1, slot2, slot3 , only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), slots1-3 are only used if no entry is set + self::ACTION_CLOSE_GOSSIP => [null, null, null, null, null, null, 0], // none + self::ACTION_TRIGGER_TIMED_EVENT => [null, null, null, null, null, null, 0], // id(>1) + self::ACTION_REMOVE_TIMED_EVENT => [null, null, null, null, null, null, 0], // id(>1) + self::ACTION_ADD_AURA => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_RESET_SCRIPT_BASE_OBJECT => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_CALL_SCRIPT_RESET => [null, null, null, null, null, null, 0], // none + self::ACTION_SET_RANGED_MOVEMENT => [null, null, null, null, null, null, 0], // Distance, angle + self::ACTION_CALL_TIMED_ACTIONLIST => [null, null, null, null, null, null, 0], // ID (overwrites already running actionlist), stop after combat?(0/1), timer update type(0-OOC, 1-IC, 2-ALWAYS) + self::ACTION_SET_NPC_FLAG => [['npcFlags', 10, false], null, null, null, null, null, 0], // Flags + self::ACTION_ADD_NPC_FLAG => [['npcFlags', 10, false], null, null, null, null, null, 0], // Flags + self::ACTION_REMOVE_NPC_FLAG => [['npcFlags', 10, false], null, null, null, null, null, 0], // Flags + self::ACTION_SIMPLE_TALK => [null, null, null, null, null, null, 0], // groupID, can be used to make players say groupID, Text_over event is not triggered, whisper can not be used (Target units will say the text) + self::ACTION_SELF_CAST => [Type::SPELL, ['castFlags', -1, false], null, null, null, null, 0], // spellID, castFlags + self::ACTION_CROSS_CAST => [Type::SPELL, ['castFlags', -1, false], null, null, null, null, 0], // spellID, castFlags, CasterTargetType, CasterTarget param1, CasterTarget param2, CasterTarget param3, ( + the origonal target fields as Destination target), CasterTargets will cast spellID on all Targets (use with caution if targeting multiple * multiple units) + self::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => [null, null, null, null, null, null, 0], // script9 ids 1-9 + self::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => [null, null, null, null, null, null, 0], // script9 id min, max + self::ACTION_RANDOM_MOVE => [null, null, null, null, null, null, 0], // maxDist + self::ACTION_SET_UNIT_FIELD_BYTES_1 => [['unitFieldBytes1', 10, false], null, null, null, null, null, 0], // bytes, target + self::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => [['unitFieldBytes1', 10, false], null, null, null, null, null, 0], // bytes, target + self::ACTION_INTERRUPT_SPELL => [null, Type::SPELL, null, null, null, null, 0], // + self::ACTION_SEND_GO_CUSTOM_ANIM => [['dynFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_SET_DYNAMIC_FLAG => [['dynFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_ADD_DYNAMIC_FLAG => [['dynFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_REMOVE_DYNAMIC_FLAG => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_JUMP_TO_POS => [null, null, null, null, null, null, 0], // speedXY, speedZ, targetX, targetY, targetZ + self::ACTION_SEND_GOSSIP_MENU => [null, null, null, null, null, null, 0], // menuId, optionId + self::ACTION_GO_SET_LOOT_STATE => [['lootState', 10, false], null, null, null, null, null, 0], // state + self::ACTION_SEND_TARGET_TO_TARGET => [null, null, null, null, null, null, 0], // id + self::ACTION_SET_HOME_POS => [null, null, null, null, null, null, 0], // none + self::ACTION_SET_HEALTH_REGEN => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_ROOT => [null, null, null, null, null, null, 0], // off/on + self::ACTION_SET_GO_FLAG => [['goFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_ADD_GO_FLAG => [['goFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_REMOVE_GO_FLAG => [['goFlags', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_SUMMON_CREATURE_GROUP => [null, null, null, null, null, null, 0], // Group, attackInvoker + self::ACTION_SET_POWER => [['powerType', 10, false], null, null, null, null, null, 0], // PowerType, newPower + self::ACTION_ADD_POWER => [['powerType', 10, false], null, null, null, null, null, 0], // PowerType, newPower + self::ACTION_REMOVE_POWER => [['powerType', 10, false], null, null, null, null, null, 0], // PowerType, newPower + self::ACTION_GAME_EVENT_STOP => [Type::WORLDEVENT, null, null, null, null, null, 0], // GameEventId + self::ACTION_GAME_EVENT_START => [Type::WORLDEVENT, null, null, null, null, null, 0], // GameEventId + self::ACTION_START_CLOSEST_WAYPOINT => [null, null, null, null, null, null, 0], // wp1, wp2, wp3, wp4, wp5, wp6, wp7 + self::ACTION_MOVE_OFFSET => [null, null, null, null, null, null, 0], // + self::ACTION_RANDOM_SOUND => [Type::SOUND, Type::SOUND, Type::SOUND, Type::SOUND, null, null, 0], // soundId1, soundId2, soundId3, soundId4, soundId5, onlySelf + self::ACTION_SET_CORPSE_DELAY => [['formatTime', 10, false], null, null, null, null, null, 0], // timer + self::ACTION_DISABLE_EVADE => [null, null, null, null, null, null, 0], // 0/1 (1 = disabled, 0 = enabled) + self::ACTION_GO_SET_GO_STATE => [null, null, null, null, null, null, 0], // state + self::ACTION_SET_CAN_FLY => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_REMOVE_AURAS_BY_TYPE => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_SET_SIGHT_DIST => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_FLEE => [['formatTime', 10, false], null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_ADD_THREAT => [null, null, null, null, null, null, 0], // +threat, -threat + self::ACTION_LOAD_EQUIPMENT => [null, null, null, null, null, null, 0], // id + self::ACTION_TRIGGER_RANDOM_TIMED_EVENT => [['numRange', 10, false], null, null, null, null, null, 0], // id min range, id max range + self::ACTION_REMOVE_ALL_GAMEOBJECTS => [null, null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::ACTION_PAUSE_MOVEMENT => [null, ['formatTime', 10, true], null, null, null, null, 0], // MovementSlot (default = 0, active = 1, controlled = 2), PauseTime (ms), Force + self::ACTION_PLAY_ANIMKIT => [null, null, null, null, null, null, 2], // don't use on 3.3.5a + self::ACTION_SCENE_PLAY => [null, null, null, null, null, null, 2], // don't use on 3.3.5a + self::ACTION_SCENE_CANCEL => [null, null, null, null, null, null, 2], // don't use on 3.3.5a + self::ACTION_SPAWN_SPAWNGROUP => [null, null, null, ['spawnFlags', 11, false], null, null, 0], // Group ID, min secs, max secs, spawnflags + self::ACTION_DESPAWN_SPAWNGROUP => [null, null, null, ['spawnFlags', 11, false], null, null, 0], // Group ID, min secs, max secs, spawnflags + self::ACTION_RESPAWN_BY_SPAWNID => [null, null, null, null, null, null, 0], // spawnType, spawnId + self::ACTION_INVOKER_CAST => [Type::SPELL, ['castFlags', -1, false], null, null, null, null, 0], // spellID, castFlags + self::ACTION_PLAY_CINEMATIC => [null, null, null, null, null, null, 0], // entry, cinematic + self::ACTION_SET_MOVEMENT_SPEED => [null, null, null, null, null, null, 0], // movementType, speedInteger, speedFraction + self::ACTION_PLAY_SPELL_VISUAL_KIT => [null, null, null, null, null, null, 2], // spellVisualKitId (RESERVED, PENDING CHERRYPICK) + self::ACTION_OVERRIDE_LIGHT => [Type::ZONE, null, null, ['formatTime', -1, true], null, null, 0], // zoneId, overrideLightID, transitionMilliseconds + self::ACTION_OVERRIDE_WEATHER => [Type::ZONE, ['weatherState', 10, false], null, null, null, null, 0], // zoneId, weatherId, intensity + self::ACTION_SET_AI_ANIM_KIT => [null, null, null, null, null, null, 2], // DEPRECATED, DO REUSE (it was never used in any branch, treat as free action id) + self::ACTION_SET_HOVER => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_HEALTH_PCT => [null, null, null, null, null, null, 0], // percent + self::ACTION_CREATE_CONVERSATION => [null, null, null, null, null, null, 2], // don't use on 3.3.5a + self::ACTION_SET_IMMUNE_PC => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_IMMUNE_NPC => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_SET_UNINTERACTIBLE => [null, null, null, null, null, null, 0], // 0/1 + self::ACTION_ACTIVATE_GAMEOBJECT => [null, null, null, null, null, null, 0], // GameObjectActions + self::ACTION_ADD_TO_STORED_TARGET_LIST => [null, null, null, null, null, null, 0], // varID + self::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => [null, null, null, null, null, null, 2], // don't use on 3.3.5a + self::ACTION_TRIGGER_GAME_EVENT => [null, null, null, null, null, null, 2], // eventId, useSaiTargetAsGameEventSource (RESERVED, PENDING CHERRYPICK) + self::ACTION_DO_ACTION => [null, null, null, null, null, null, 2] // actionId (RESERVED, PENDING CHERRYPICK) + ); + + private array $jsGlobals = []; + private ?array $summons = null; + + public function __construct( + private int $id, + public readonly int $type, + private array $param, + private SmartAI &$smartAI) + { + // init additional parameters + Util::checkNumeric($this->param, NUM_CAST_INT); + $this->param = array_pad($this->param, 15, ''); + } + + public function process() : array + { + $body = + $footer = ''; + + $actionTT = Lang::smartAI('actionTT', array_merge([$this->type], $this->param)); + + for ($i = 0; $i < 5; $i++) + { + $aParams = $this->data[$this->type]; + + if (is_array($aParams[$i])) + { + [$fn, $idx, $extraParam] = $aParams[$i]; + + if ($idx < 0) + $footer = $this->{$fn}($this->param[$i], $this->param[$i + 1], $extraParam); + else + $this->param[$idx] = $this->{$fn}($this->param[$i], $this->param[$i + 1], $extraParam); + } + else if (is_int($aParams[$i]) && $this->param[$i]) + $this->jsGlobals[$aParams[$i]][$this->param[$i]] = $this->param[$i]; + } + + // non-generic cases + switch ($this->type) + { + case self::ACTION_FLEE_FOR_ASSIST: // 25 -> none + case self::ACTION_CALL_FOR_HELP: // 39 -> self + if ($this->param[0]) + $footer = $this->param; + break; + case self::ACTION_INTERRUPT_SPELL: // 92 -> self + if (!$this->param[1]) + $footer = $this->param; + break; + case self::ACTION_UPDATE_TEMPLATE: // 36 + case self::ACTION_SET_CORPSE_DELAY: // 116 + if ($this->param[1]) + $footer = $this->param; + break; + case self::ACTION_PAUSE_MOVEMENT: // 127 -> any target [ye, not gonna resolve this nonsense] + case self::ACTION_REMOVEAURASFROMSPELL: // 28 -> any target + case self::ACTION_SOUND: // 4 -> self [param3 set in DB but not used in core?] + case self::ACTION_SUMMON_GO: // 50 -> self, world coords + case self::ACTION_MOVE_TO_POS: // 69 -> any target + if ($this->param[2]) + $footer = $this->param; + break; + case self::ACTION_WP_START: // 53 -> any .. why tho? + if ($this->param[2] || $this->param[5]) + $footer = $this->param; + break; + case self::ACTION_PLAY_EMOTE: // 5 -> any target + case self::ACTION_SET_EMOTE_STATE: // 17 -> any target + if ($this->param[0]) + { + $this->param[0] *= -1; // handle creature emote + $this->jsGlobals[Type::EMOTE][$this->param[0]] = $this->param[0]; + } + break; + case self::ACTION_RANDOM_EMOTE: // 10 -> any target + $buff = []; + for ($i = 0; $i < 6; $i++) + { + if (empty($this->param[$i])) + continue; + + $this->param[$i] *= -1; // handle creature emote + $buff[] = '[emote='.$this->param[$i].']'; + $this->jsGlobals[Type::EMOTE][$this->param[$i]] = $this->param[$i]; + } + $this->param[10] = Lang::concat($buff, false); + break; + case self::ACTION_SET_FACTION: // 2 -> any target + if ($this->param[0]) + { + $this->param[10] = DB::Aowow()->selectCell('SELECT `factionId` FROM ?_factiontemplate WHERE `id` = ?d', $this->param[0]); + $this->jsGlobals[Type::FACTION][$this->param[10]] = $this->param[10]; + } + break; + case self::ACTION_MORPH_TO_ENTRY_OR_MODEL: // 3 -> self + case self::ACTION_MOUNT_TO_ENTRY_OR_MODEL: // 43 -> self + if (!$this->param[0] && !$this->param[1]) + $this->param[10] = 1; + break; + case self::ACTION_THREAT_SINGLE_PCT: // 13 -> victim + case self::ACTION_THREAT_ALL_PCT: // 14 -> self + case self::ACTION_ADD_THREAT: // 123 -> any target + $this->param[10] = $this->param[0] - $this->param[1]; + break; + case self::ACTION_FOLLOW: // 29 -> any target + if ($this->param[1]) + { + $this->param[10] = Util::O2Deg($this->param[1])[0]; + $footer = $this->param; + } + if ($this->param[3]) + { + if ($this->param[4]) + { + $this->jsGlobals[Type::QUEST][$this->param[3]] = $this->param[3]; + $this->param[11] = 1; + } + else + { + $this->jsGlobals[Type::NPC][$this->param[3]] = $this->param[3]; + $this->param[12] = 1; + } + } + break; + case self::ACTION_RANDOM_PHASE: // 30 -> self + $buff = []; + for ($i = 0; $i < 7; $i++) + if ($_ = $this->param[$i]) + $buff[] = $_; + + $this->param[10] = Lang::concat($buff); + break; + case self::ACTION_ACTIVATE_TAXI: // 52 -> invoker + $nodes = DB::Aowow()->selectRow( + 'SELECT tn1.`name_loc0` AS "start_loc0", tn1.name_loc?d AS start_loc?d, tn2.`name_loc0` AS "end_loc0", tn2.name_loc?d AS end_loc?d + FROM ?_taxipath tp + JOIN ?_taxinodes tn1 ON tp.`startNodeId` = tn1.`id` + JOIN ?_taxinodes tn2 ON tp.`endNodeId` = tn2.`id` + WHERE tp.`id` = ?d', + Lang::getLocale()->value, Lang::getLocale()->value, Lang::getLocale()->value, Lang::getLocale()->value, $this->param[0] + ); + $this->param[10] = Util::jsEscape(Util::localizedString($nodes, 'start')); + $this->param[11] = Util::jsEscape(Util::localizedString($nodes, 'end')); + break; + case self::ACTION_SET_INGAME_PHASE_MASK: // 44 -> any target + if ($this->param[0]) + $this->param[10] = Lang::concat(Util::mask2bits($this->param[0])); + break; + case self::ACTION_TELEPORT: // 62 -> invoker + [$x, $y, $z, $o] = $this->smartAI->getTarget()->getWorldPos(); + // try from areatrigger setup data + if ($this->smartAI->teleportTargetArea) + $this->param[10] = $this->smartAI->teleportTargetArea; + // try calc from SmartTarget data + else if ($pos = Game::worldPosToZonePos($this->param[0], $x, $y)) + { + $this->param[10] = $pos[0]['areaId']; + $this->param[11] = str_pad($pos[0]['posX'] * 10, 3, '0', STR_PAD_LEFT).str_pad($pos[0]['posY'] * 10, 3, '0', STR_PAD_LEFT); + } + // maybe the mapId is an instane map + else if ($areaId = DB::Aowow()->selectCell('SELECT `id` FROM ?_zones WHERE `mapId` = ?d', $this->param[0])) + $this->param[10] = $areaId; + // ...whelp + else + trigger_error('SmartAction::process - could not resolve teleport target: map:'.$this->param[0].' x:'.$x.' y:'.$y); + + if ($this->param[10]) + $this->jsGlobals[Type::ZONE][$this->param[10]] = $this->param[10]; + break; + case self::ACTION_SET_ORIENTATION: // 66 -> any target + if ($this->smartAI->getTarget()->type == SmartTarget::TARGET_POSITION) + $this->param[10] = Util::O2Deg($this->smartAI->getTarget()->getWorldPos()[3])[1]; + else if ($this->smartAI->getTarget()->type != SmartTarget::TARGET_SELF) + $this->param[10] = '#target#'; + break; + case self::ACTION_EQUIP: // 71 -> any + $equip = []; + + if ($this->param[0]) + { + $slots = $this->param[1] ? Util::mask2bits($this->param[1], 1) : [1, 2, 3]; + $items = DB::World()->selectRow('SELECT `ItemID1`, `ItemID2`, `ItemID3` FROM creature_equip_template WHERE `CreatureID` = ?d AND `ID` = ?d', $this->smartAI->getEntry(), $this->param[0]); + + foreach ($slots as $s) + if ($_ = $items['ItemID'.$s]) + $equip[] = $_; + } + else if ($this->param[2] || $this->param[3] || $this->param[4]) + { + if ($_ = $this->param[2]) + $equip[] = $_; + if ($_ = $this->param[3]) + $equip[] = $_; + if ($_ = $this->param[4]) + $equip[] = $_; + } + + if ($equip) + { + $this->param[10] = Lang::concat($equip, callback: fn($x) => '[item='.$x.']'); + $footer = true; + + foreach ($equip as $_) + $this->jsGlobals[Type::ITEM][$_] = $_; + } + break; + case self::ACTION_LOAD_EQUIPMENT: // 124 -> any target + $buff = []; + if ($this->param[0]) + { + $items = DB::World()->selectRow('SELECT `ItemID1`, `ItemID2`, `ItemID3` FROM creature_equip_template WHERE `CreatureID` = ?d AND `ID` = ?d', $this->smartAI->getEntry(), $this->param[0]); + foreach ($items as $i) + { + if (!$i) + continue; + + $this->jsGlobals[Type::ITEM][$i] = $i; + $buff[] = '[item='.$i.']'; + } + } + else if (!$this->param[1]) + trigger_error('SmartAI::action - action #124 (SmartAction::ACTION_LOAD_EQIPMENT) is malformed'); + + $this->param[10] = Lang::concat($buff); + $footer = true; + break; + case self::ACTION_CALL_TIMED_ACTIONLIST: // 80 -> any target + $this->param[10] = match ($this->param[1]) + { + 0, 1, 2 => Lang::smartAI('saiUpdate', $this->param[1]), + default => Lang::smartAI('saiUpdateUNK', [$this->param[1]]) + }; + + $tal = new SmartAI(SmartAI::SRC_TYPE_ACTIONLIST, $this->param[0], ['baseEntry' => $this->smartAI->getEntry()]); + $tal->prepare(); + + Util::mergeJsGlobals($this->jsGlobals, $tal->getJSGlobals()); + + foreach ($tal->getTabs() as $guid => $tt) + $this->smartAI->addTab($guid, $tt); + + break; + case self::ACTION_CALL_KILLEDMONSTER: // 33: Note: If target is SMART_TARGET_NONE (0) or SMART_TARGET_SELF (1), the kill is credited to all players eligible for loot from this creature. + if ($this->smartAI->getTarget()->type == SmartTarget::TARGET_SELF || $this->smartAI->getTarget()->type == SmartTarget::TARGET_NONE) + $this->param[10] = (new SmartTarget($this->id, SmartTarget::TARGET_LOOT_RECIPIENTS, [], [], $this->smartAI))->process(); + break; + case self::ACTION_CROSS_CAST: // 86 -> entity by TargetingBlock(param3, param4, param5, param6) cross cast spell at any target + $this->param[10] = (new SmartTarget($this->id, $this->param[2], [$this->param[3], $this->param[4], $this->param[5]], [], $this->smartAI))->process(); + break; + case self::ACTION_CALL_RANDOM_TIMED_ACTIONLIST: // 87 -> self + $talBuff = []; + for ($i = 0; $i < 6; $i++) + { + if (!$this->param[$i]) + continue; + + $talBuff[] = sprintf(self::TAL_TAB_ANCHOR, $this->param[$i]); + + $tal = new SmartAI(SmartAI::SRC_TYPE_ACTIONLIST, $this->param[$i], ['baseEntry' => $this->smartAI->getEntry()]); + $tal->prepare(); + + Util::mergeJsGlobals($this->jsGlobals, $tal->getJSGlobals()); + + foreach ($tal->getTabs() as $guid => $tt) + $this->smartAI->addTab($guid, $tt); + } + $this->param[10] = Lang::concat($talBuff, false); + break; + case self::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:// 88 -> self + $talBuff = []; + for ($i = $this->param[0]; $i <= $this->param[1]; $i++) + { + $talBuff[] = sprintf(self::TAL_TAB_ANCHOR, $i); + + $tal = new SmartAI(SmartAI::SRC_TYPE_ACTIONLIST, $i, ['baseEntry' => $this->smartAI->getEntry()]); + $tal->prepare(); + + Util::mergeJsGlobals($this->jsGlobals, $tal->getJSGlobals()); + + foreach ($tal->getTabs() as $guid => $tt) + $this->smartAI->addTab($guid, $tt); + } + $this->param[10] = Lang::concat($talBuff, false); + break; + case self::ACTION_SET_HOME_POS: // 101 -> self + if ($this->smartAI->getTarget()?->type == Smarttarget::TARGET_SELF) + $this->param[10] = 1; + // do not break; + case self::ACTION_JUMP_TO_POS: // 97 -> self + case self::ACTION_MOVE_OFFSET: // 114 -> self + array_splice($this->param, 11, replacement: $this->smartAI->getTarget()->getWorldPos()); + break; + case self::ACTION_SUMMON_CREATURE_GROUP: // 107 -> untargeted + if ($this->summons === null) + $this->summons = DB::World()->selectCol('SELECT `groupId` AS ARRAY_KEY, `entry` AS ARRAY_KEY2, COUNT(*) AS "n" FROM creature_summon_groups WHERE `summonerId` = ?d GROUP BY `groupId`, `entry`', $this->smartAI->getEntry()); + + $buff = []; + if (!empty($this->summons[$this->param[0]])) + { + foreach ($this->summons[$this->param[0]] as $id => $n) + { + $this->jsGlobals[Type::NPC][$id] = $id; + $buff[] = $n.'x [npc='.$id.']'; + } + } + + if ($buff) + $this->param[10] = Lang::concat($buff); + break; + case self::ACTION_START_CLOSEST_WAYPOINT: // 113 -> any target + $this->param[10] = Lang::concat(array_filter($this->param), false, fn($x) => '#[b]'.$x.'[/b]'); + break; + case self::ACTION_RANDOM_SOUND: // 115 -> self + for ($i = 0; $i < 4; $i++) + { + if ($x = $this->param[$i]) + { + $this->jsGlobals[Type::SOUND][$x] = $x; + $this->param[10] .= '[sound='.$x.']'; + } + } + + if ($this->param[5]) + $footer = true; + break; + case self::ACTION_GO_SET_GO_STATE: // 118 -> ??? + $this->param[10] = match ($this->param[0]) + { + 0, 1, 2 => Lang::smartAI('GOStates', $this->param[0]), + default => Lang::smartAI('GOStateUNK', [$this->param[0]]) + }; + break; + case self::ACTION_REMOVE_AURAS_BY_TYPE: // 120 -> any target + $this->param[10] = Lang::spell('auras', $this->param[0]); + break; + case self::ACTION_SPAWN_SPAWNGROUP: // 131 + case self::ACTION_DESPAWN_SPAWNGROUP: // 132 + $this->param[10] = Util::jsEscape(DB::World()->selectCell('SELECT `GroupName` FROM spawn_group_template WHERE `groupId` = ?d', $this->param[0])); + $entities = DB::World()->select('SELECT `spawnType` AS "0", `spawnId` AS "1" FROM spawn_group WHERE `groupId` = ?d', $this->param[0]); + + $n = 5; + $buff = []; + foreach ($entities as [$spawnType, $guid]) + { + $type = Type::NPC; + if ($spawnType == 1) + $type == Type::OBJECT; + + if ($_ = $this->resolveGuid($type, $guid)) + { + $this->jsGlobals[$type][$_] = $_; + $buff[] = '['.Type::getFileString($type).'='.$_.'][small class=q0] (GUID: '.$guid.')[/small]'; + } + else + $buff[] = Lang::smartAI('entityUNK').'[small class=q0] (GUID: '.$guid.')[/small]'; + + if (!--$n) + break; + } + + if (count($entities) > 5) + $buff[] = '+'.(count($entities) - 5).'…'; + + $this->param[12] = '[ul][li]'.implode('[/li][li]', $buff).'[/li][/ul]'; + + // i'd like this stored in $data but numRange can only handle msec + if ($time = $this->numRange($this->param[1] * 1000, $this->param[2] * 1000, true)) + $footer = [$time]; + break; + case self::ACTION_RESPAWN_BY_SPAWNID: // 133 + $type = Type::NPC; + if ($this->param[0] == 1) + $type == Type::OBJECT; + + if ($_ = $this->resolveGuid($type, $this->param[1])) + { + $this->param[10] = '['.Type::getFileString($type).'='.$_.']'; + $this->jsGlobals[$type][$_] = $_; + } + else + $this->param[10] = Lang::smartAI('entityUNK'); + break; + case self::ACTION_SET_MOVEMENT_SPEED: // 136 + $this->param[10] = $this->param[1] + $this->param[2] / pow(10, floor(log10($this->param[2] ?: 1.0) + 1)); // i know string concatenation is a thing. don't @ me! + 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)) + { + 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); + } + else + trigger_error('SmartAI::action - could not determine talk source for action #'.$this->type); + break; + } + + $this->smartAI->addJsGlobals($this->jsGlobals); + + $body = Lang::smartAI('actions', $this->type, 0, $this->param) ?? Lang::smartAI('actionUNK', [$this->type]); + if ($footer) + $footer = Lang::smartAI('actions', $this->type, 1, (array)$footer); + + // resolve conditionals + $i = 0; + while (strstr($body, ')?') && $i++ < 3) + $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):(([^;]*);*);/i', fn($m) => $m[1] ? $m[2] : $m[3], $body); + + $i = 0; + while (strstr($footer, ')?') && $i++ < 3) + $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):(([^;]*);*);/i', fn($m) => $m[1] ? $m[2] : $m[3], $footer); + + // wrap body in tooltip + return [sprintf(self::ACTION_CELL_TPL, $actionTT, $body), $footer]; + } +} + +?> diff --git a/includes/components/SmartAI/SmartEvent.class.php b/includes/components/SmartAI/SmartEvent.class.php new file mode 100644 index 00000000..92694845 --- /dev/null +++ b/includes/components/SmartAI/SmartEvent.class.php @@ -0,0 +1,380 @@ + 0: type, array: [fn, newIdx, extraParam]; error class: int + self::EVENT_UPDATE_IC => [['numRange', 10, true], null, ['numRange', -1, true], null, null, 0], // InitialMin, InitialMax, RepeatMin, RepeatMax + self::EVENT_UPDATE_OOC => [['numRange', 10, true], null, ['numRange', -1, true], null, null, 0], // InitialMin, InitialMax, RepeatMin, RepeatMax + self::EVENT_HEALTH_PCT => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // HPMin%, HPMax%, RepeatMin, RepeatMax + self::EVENT_MANA_PCT => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // ManaMin%, ManaMax%, RepeatMin, RepeatMax + self::EVENT_AGGRO => [null, null, null, null, null, 0], // NONE + self::EVENT_KILL => [['numRange', -1, true], null, null, Type::NPC, null, 0], // CooldownMin0, CooldownMax1, playerOnly2, else creature entry3 + self::EVENT_DEATH => [null, null, null, null, null, 0], // NONE + self::EVENT_EVADE => [null, null, null, null, null, 0], // NONE + self::EVENT_SPELLHIT => [Type::SPELL, ['magicSchool', 10, false], ['numRange', -1, true], null, null, 0], // SpellID, School, CooldownMin, CooldownMax + self::EVENT_RANGE => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // MinDist, MaxDist, RepeatMin, RepeatMax + self::EVENT_OOC_LOS => [['hostilityMode', 10, false], null, ['numRange', -1, true], null, null, 0], // hostilityModes, MaxRange, CooldownMin, CooldownMax + self::EVENT_RESPAWN => [null, null, Type::ZONE, null, null, 0], // type, MapId, ZoneId + self::EVENT_TARGET_HEALTH_PCT => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_VICTIM_CASTING => [['numRange', -1, true], null, Type::SPELL, null, null, 0], // RepeatMin, RepeatMax, spellid + self::EVENT_FRIENDLY_HEALTH => [null, null, ['numRange', -1, true], null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_FRIENDLY_IS_CC => [null, ['numRange', -1, true], null, null, null, 0], // Radius, RepeatMin, RepeatMax + self::EVENT_FRIENDLY_MISSING_BUFF => [Type::SPELL, null, ['numRange', -1, true], null, null, 0], // SpellId, Radius, RepeatMin, RepeatMax + self::EVENT_SUMMONED_UNIT => [Type::NPC, ['numRange', -1, true], null, null, null, 0], // CreatureId(0 all), CooldownMin, CooldownMax + self::EVENT_TARGET_MANA_PCT => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_ACCEPTED_QUEST => [Type::QUEST, ['numRange', -1, true], null, null, null, 0], // QuestID (0 = any), CooldownMin, CooldownMax + self::EVENT_REWARD_QUEST => [Type::QUEST, ['numRange', -1, true], null, null, null, 0], // QuestID (0 = any), CooldownMin, CooldownMax + self::EVENT_REACHED_HOME => [null, null, null, null, null, 0], // NONE + self::EVENT_RECEIVE_EMOTE => [Type::EMOTE, ['numRange', -1, true], null, null, null, 0], // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3 + self::EVENT_HAS_AURA => [Type::SPELL, null, ['numRange', -1, true], null, null, 0], // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax + self::EVENT_TARGET_BUFFED => [Type::SPELL, null, ['numRange', -1, true], null, null, 0], // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax + self::EVENT_RESET => [null, null, null, null, null, 0], // Called after combat, when the creature respawn and spawn. + self::EVENT_IC_LOS => [['hostilityMode', 10, false], null, ['numRange', -1, true], null, null, 0], // hostilityModes, MaxRnage, CooldownMin, CooldownMax + self::EVENT_PASSENGER_BOARDED => [['numRange', -1, true], null, null, null, null, 0], // CooldownMin, CooldownMax + self::EVENT_PASSENGER_REMOVED => [['numRange', -1, true], null, null, null, null, 0], // CooldownMin, CooldownMax + self::EVENT_CHARMED => [null, null, null, null, null, 0], // onRemove (0 - on apply, 1 - on remove) + self::EVENT_CHARMED_TARGET => [null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_SPELLHIT_TARGET => [Type::SPELL, ['magicSchool', 10, false], ['numRange', -1, true], null, null, 0], // SpellID, School, CooldownMin, CooldownMax + self::EVENT_DAMAGED => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // MinDmg, MaxDmg, CooldownMin, CooldownMax + self::EVENT_DAMAGED_TARGET => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // MinDmg, MaxDmg, CooldownMin, CooldownMax + self::EVENT_MOVEMENTINFORM => [['motionType', 10, false], null, null, null, null, 0], // MovementType(any), PointID + self::EVENT_SUMMON_DESPAWNED => [Type::NPC, ['numRange', -1, true], null, null, null, 0], // Entry, CooldownMin, CooldownMax + self::EVENT_CORPSE_REMOVED => [null, null, null, null, null, 0], // NONE + self::EVENT_AI_INIT => [null, null, null, null, null, 0], // NONE + self::EVENT_DATA_SET => [null, null, ['numRange', -1, true], null, null, 0], // Id, Value, CooldownMin, CooldownMax + self::EVENT_WAYPOINT_START => [null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_WAYPOINT_REACHED => [null, null, null, null, null, 0], // PointId(0any), pathID(0any) + self::EVENT_TRANSPORT_ADDPLAYER => [null, null, null, null, null, 2], // NONE + self::EVENT_TRANSPORT_ADDCREATURE => [null, null, null, null, null, 2], // Entry (0 any) + self::EVENT_TRANSPORT_REMOVE_PLAYER => [null, null, null, null, null, 2], // NONE + self::EVENT_TRANSPORT_RELOCATE => [null, null, null, null, null, 2], // PointId + self::EVENT_INSTANCE_PLAYER_ENTER => [null, null, null, null, null, 2], // Team (0 any), CooldownMin, CooldownMax + self::EVENT_AREATRIGGER_ONTRIGGER => [Type::AREATRIGGER, null, null, null, null, 0], // TriggerId(0 any) + self::EVENT_QUEST_ACCEPTED => [null, null, null, null, null, 2], // none + self::EVENT_QUEST_OBJ_COMPLETION => [null, null, null, null, null, 2], // none + self::EVENT_QUEST_COMPLETION => [null, null, null, null, null, 2], // none + self::EVENT_QUEST_REWARDED => [null, null, null, null, null, 2], // none + self::EVENT_QUEST_FAIL => [null, null, null, null, null, 2], // none + self::EVENT_TEXT_OVER => [null, Type::NPC, null, null, null, 0], // GroupId from creature_text, creature entry who talks (0 any) + self::EVENT_RECEIVE_HEAL => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // MinHeal, MaxHeal, CooldownMin, CooldownMax + self::EVENT_JUST_SUMMONED => [null, null, null, null, null, 0], // none + self::EVENT_WAYPOINT_PAUSED => [null, null, null, null, null, 0], // PointId(0any), pathID(0any) + self::EVENT_WAYPOINT_RESUMED => [null, null, null, null, null, 0], // PointId(0any), pathID(0any) + self::EVENT_WAYPOINT_STOPPED => [null, null, null, null, null, 0], // PointId(0any), pathID(0any) + self::EVENT_WAYPOINT_ENDED => [null, null, null, null, null, 0], // PointId(0any), pathID(0any) + self::EVENT_TIMED_EVENT_TRIGGERED => [null, null, null, null, null, 0], // id + self::EVENT_UPDATE => [['numRange', 10, true], null, ['numRange', -1, true], null, null, 0], // InitialMin, InitialMax, RepeatMin, RepeatMax + self::EVENT_LINK => [null, null, null, null, null, 0], // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly + self::EVENT_GOSSIP_SELECT => [null, null, null, null, null, 0], // menuID, actionID + self::EVENT_JUST_CREATED => [null, null, null, null, null, 0], // none + self::EVENT_GOSSIP_HELLO => [null, null, null, null, null, 0], // noReportUse (for GOs) + self::EVENT_FOLLOW_COMPLETED => [null, null, null, null, null, 0], // none + self::EVENT_EVENT_PHASE_CHANGE => [null, null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_IS_BEHIND_TARGET => [['numRange', -1, true], null, null, null, null, 1], // UNUSED, DO NOT REUSE + self::EVENT_GAME_EVENT_START => [Type::WORLDEVENT, null, null, null, null, 0], // game_event.Entry + self::EVENT_GAME_EVENT_END => [Type::WORLDEVENT, null, null, null, null, 0], // game_event.Entry + self::EVENT_GO_LOOT_STATE_CHANGED => [['lootState', 10, false], null, null, null, null, 0], // go LootState + self::EVENT_GO_EVENT_INFORM => [null, null, null, null, null, 0], // eventId + self::EVENT_ACTION_DONE => [null, null, null, null, null, 0], // eventId (SharedDefines.EventId) + self::EVENT_ON_SPELLCLICK => [null, null, null, null, null, 0], // clicker (unit) + self::EVENT_FRIENDLY_HEALTH_PCT => [['numRange', 10, false], null, ['numRange', -1, true], null, null, 0], // minHpPct, maxHpPct, repeatMin, repeatMax + self::EVENT_DISTANCE_CREATURE => [null, Type::NPC, null, ['numRange', -1, true], null, 0], // guid, entry, distance, repeat + self::EVENT_DISTANCE_GAMEOBJECT => [null, Type::OBJECT, null, ['numRange', -1, true], null, 0], // guid, entry, distance, repeat + self::EVENT_COUNTER_SET => [null, null, ['numRange', -1, true], null, null, 0], // id, value, cooldownMin, cooldownMax + self::EVENT_SCENE_START => [null, null, null, null, null, 2], // don't use on 3.3.5a + self::EVENT_SCENE_TRIGGER => [null, null, null, null, null, 2], // don't use on 3.3.5a + self::EVENT_SCENE_CANCEL => [null, null, null, null, null, 2], // don't use on 3.3.5a + self::EVENT_SCENE_COMPLETE => [null, null, null, null, null, 2], // don't use on 3.3.5a + self::EVENT_SUMMONED_UNIT_DIES => [Type::NPC, ['numRange', -1, true], null, null, null, 0], // CreatureId(0 all), CooldownMin, CooldownMax + 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 + ); + + private array $jsGlobals = []; + + public function __construct( + private int $id, + public readonly int $type, + public readonly int $phaseMask, + public readonly int $chance, + private int $flags, + private array $param, + private SmartAI &$smartAI) + { + // additional parameters + Util::checkNumeric($this->param, NUM_CAST_INT); + $this->param = array_pad($this->param, 15, ''); + } + + public function process() : array + { + $body = + $footer = ''; + + $phases = Util::mask2bits($this->phaseMask, 1) ?: [0]; + $eventTT = Lang::smartAI('eventTT', array_merge([$this->type, $phases, $this->chance, $this->flags], $this->param)); + + for ($i = 0; $i < 5; $i++) + { + $eParams = $this->data[$this->type]; + + if (is_array($eParams[$i])) + { + [$fn, $idx, $extraParam] = $eParams[$i]; + + if ($idx < 0) + $footer = $this->{$fn}($this->param[$i], $this->param[$i + 1], $extraParam); + else + $this->param[$idx] = $this->{$fn}($this->param[$i], $this->param[$i + 1], $extraParam); + } + else if (is_int($eParams[$i]) && $this->param[$i]) + $this->jsGlobals[$eParams[$i]][$this->param[$i]] = $this->param[$i]; + } + + // non-generic cases + switch ($this->type) + { + case self::EVENT_UPDATE_IC: // 0 - In combat. + case self::EVENT_UPDATE_OOC: // 1 - Out of combat. + if ($this->smartAI->srcType == SmartAI::SRC_TYPE_ACTIONLIST) + $this->param[11] = 1; + // do not break; + case self::EVENT_GOSSIP_HELLO: // 64 - On Right-Click Creature/Gameobject that have gossip enabled. + if ($this->smartAI->srcType == SmartAI::SRC_TYPE_OBJECT) + $footer = array( + $this->param[0] == 1, + $this->param[0] == 2, + ); + break; + case self::EVENT_RESPAWN: // 11 - On Creature/Gameobject Respawn in Zone/Map + if ($this->param[0] == 1) // per map + { + switch ($this->param[1]) + { + case 0: $this->param[10] = Lang::maps('EasternKingdoms'); break; + case 1: $this->param[10] = Lang::maps('Kalimdor'); break; + case 530: $this->param[10] = Lang::maps('Outland'); break; + case 571: $this->param[10] = Lang::maps('Northrend'); break; + default: + if ($aId = DB::Aowow()->selectCell('SELECT `id` FROM ?_zones WHERE `mapId` = ?d', $this->param[1])) + { + $this->param[11] = $aId; + $this->jsGlobals[Type::ZONE][$aId] = $aId; + } + else + $this->param[11] = '[span class=q10]Unknown Map[/span] #'.$this->param[1]; + }; + } + else if ($this->param[0] == 2) // per zone + $this->param[11] = $this->param[2]; + + break; + case self::EVENT_LINK: // 61 - Used to link together multiple events as a chain of events. + if ($links = DB::World()->selectCol('SELECT `id` FROM smart_scripts WHERE `link` = ?d AND `entryorguid` = ?d AND `source_type` = ?d', $this->id, $this->smartAI->entry, $this->smartAI->srcType)) + $this->param[10] = LANG::concat($links, false, fn($x) => "#[b]".$x."[/b]"); + break; + case self::EVENT_GOSSIP_SELECT: // 62 - On gossip clicked (gossip_menu_option335). + $gmo = DB::World()->selectRow( + 'SELECT gmo.`OptionText` AS "text_loc0" {, gmol.`OptionText` AS text_loc?d } + FROM gossip_menu_option gmo + LEFT JOIN gossip_menu_option_locale gmol ON gmo.`MenuID` = gmol.`MenuID` AND gmo.`OptionID` = gmol.`OptionID` AND gmol.`Locale` = ?d + WHERE gmo.`MenuId` = ?d AND gmo.`OptionID` = ?d', + Lang::getLocale() != Locale::EN ? Lang::getLocale()->value : DBSIMPLE_SKIP, + Lang::getLocale()->json(), + $this->param[0], $this->param[1] + ); + + if ($gmo) + $this->param[10] = Util::jsEscape(Util::localizedString($gmo, 'text')); + else + trigger_error('SmartAI::event - could not find gossip menu option for event #'.$this->type); + break; + case self::EVENT_DISTANCE_CREATURE: // 75 - On creature guid OR any instance of creature entry is within distance. + if ($this->param[0]) + if ($_ = $this->resolveGuid(Type::NPC, $this->param[0])) + { + $this->jsGlobals[Type::NPC][$this->param[0]] = $this->param[0]; + $this->param[10] = $_; + } + // do not break; + case self::EVENT_DISTANCE_GAMEOBJECT: // 76 - On gameobject guid OR any instance of gameobject entry is within distance. + if ($this->param[0] && !$this->param[10]) + { + if ($_ = $this->resolveGuid(Type::OBJECT, $this->param[0])) + { + $this->jsGlobals[Type::OBJECT][$this->param[0]] = $this->param[0]; + $this->param[10] = $_; + } + } + else if ($this->param[1]) + $this->param[10] = $this->param[1]; + else if (!$this->param[10]) + trigger_error('SmartAI::event - entity for event #'.$this->type.' not defined'); + break; + case self::EVENT_EVENT_PHASE_CHANGE: // 66 - On event phase mask set + $this->param[10] = Lang::concat(Util::mask2bits($this->param[0]), false); + break; + } + + $this->smartAI->addJsGlobals($this->jsGlobals); + + $body = Lang::smartAI('events', $this->type, 0, $this->param) ?? Lang::smartAI('eventUNK', [$this->type]); + if ($footer) + $footer = Lang::smartAI('events', $this->type, 1, (array)$footer); + + // resolve conditionals + $i = 0; + while (strstr($body, ')?') && $i++ < 3) + $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):(([^;]*);*);/i', fn($m) => $m[1] ? $m[2] : $m[3], $body); + + $i = 0; + while (strstr($footer, ')?') && $i++ < 3) + $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):(([^;]*);*);/i', fn($m) => $m[1] ? $m[2] : $m[3], $footer); + + if ($_ = $this->formatFlags()) + $footer = $_ . ($footer ? '; '.$footer : ''); + + if (User::isInGroup(U_GROUP_EMPLOYEE)) + { + if ($eParams[5] == 1) + $footer = '[span class=rep2]DEPRECATED[/span] ' . $footer; + else if ($eParams[5] == 2) + $footer = '[span class=rep0]RESERVED[/span] ' . $footer; + } + + // wrap body in tooltip + return [sprintf(self::EVENT_CELL_TPL, $eventTT, $body), $footer]; + } + + public function hasPhases() : bool + { + return $this->phaseMask == 0; + } + + private function formatFlags() : string + { + $flags = $this->flags; + + if (($flags & self::FLAG_ALL_DIFFICULTIES) == self::FLAG_ALL_DIFFICULTIES) + $flags &= ~self::FLAG_ALL_DIFFICULTIES; + + $ef = []; + for ($i = 1; $i <= self::FLAG_WHILE_CHARMED; $i <<= 1) + if ($flags & $i) + if ($x = Lang::smartAI('eventFlags', $i)) + $ef[] = $x; + + return Lang::concat($ef); + } +} + +?> diff --git a/includes/components/SmartAI/SmartTarget.class.php b/includes/components/SmartAI/SmartTarget.class.php new file mode 100644 index 00000000..ca476c68 --- /dev/null +++ b/includes/components/SmartAI/SmartTarget.class.php @@ -0,0 +1,183 @@ + [null, null, null, null], // NONE + self::TARGET_SELF => [null, null, null, null], // Self cast + self::TARGET_VICTIM => [null, null, null, null], // Our current target (ie: highest aggro) + self::TARGET_HOSTILE_SECOND_AGGRO => [null, null, null, null], // Second highest aggro, maxdist, playerOnly, powerType + 1 + self::TARGET_HOSTILE_LAST_AGGRO => [null, null, null, null], // Dead last on aggro, maxdist, playerOnly, powerType + 1 + self::TARGET_HOSTILE_RANDOM => [null, null, null, null], // Just any random target on our threat list, maxdist, playerOnly, powerType + 1 + self::TARGET_HOSTILE_RANDOM_NOT_TOP => [null, null, null, null], // Any random target except top threat, maxdist, playerOnly, powerType + 1 + self::TARGET_ACTION_INVOKER => [null, null, null, null], // Unit who caused this Event to occur + self::TARGET_POSITION => [null, null, null, null], // use xyz from event params + self::TARGET_CREATURE_RANGE => [Type::NPC, ['numRange', 10, false], null, null], // CreatureEntry(0any), minDist, maxDist + self::TARGET_CREATURE_GUID => [null, Type::NPC, null, null], // guid, entry + self::TARGET_CREATURE_DISTANCE => [Type::NPC, null, null, null], // CreatureEntry(0any), maxDist + self::TARGET_STORED => [null, null, null, null], // id, uses pre-stored target(list) + self::TARGET_GAMEOBJECT_RANGE => [Type::OBJECT, ['numRange', 10, false], null, null], // entry(0any), min, max + self::TARGET_GAMEOBJECT_GUID => [null, Type::OBJECT, null, null], // guid, entry + self::TARGET_GAMEOBJECT_DISTANCE => [Type::OBJECT, null, null, null], // entry(0any), maxDist + self::TARGET_INVOKER_PARTY => [null, null, null, null], // invoker's party members + self::TARGET_PLAYER_RANGE => [['numRange', 10, false], null, null, null], // min, max + self::TARGET_PLAYER_DISTANCE => [null, null, null, null], // maxDist + self::TARGET_CLOSEST_CREATURE => [Type::NPC, null, null, null], // CreatureEntry(0any), maxDist, dead? + self::TARGET_CLOSEST_GAMEOBJECT => [Type::OBJECT, null, null, null], // entry(0any), maxDist + self::TARGET_CLOSEST_PLAYER => [null, null, null, null], // maxDist + self::TARGET_ACTION_INVOKER_VEHICLE => [null, null, null, null], // Unit's vehicle who caused this Event to occur + self::TARGET_OWNER_OR_SUMMONER => [null, null, null, null], // Unit's owner or summoner, Use Owner/Charmer of this unit + self::TARGET_THREAT_LIST => [null, null, null, null], // All units on creature's threat list, maxdist + self::TARGET_CLOSEST_ENEMY => [null, null, null, null], // maxDist, playerOnly + self::TARGET_CLOSEST_FRIENDLY => [null, null, null, null], // maxDist, playerOnly + self::TARGET_LOOT_RECIPIENTS => [null, null, null, null], // all players that have tagged this creature (for kill credit) + self::TARGET_FARTHEST => [null, null, null, null], // maxDist, playerOnly, isInLos + self::TARGET_VEHICLE_PASSENGER => [null, null, null, null], // seatMask (0 - all seats) + self::TARGET_CLOSEST_UNSPAWNED_GO => [Type::OBJECT, null, null, null] // entry(0any), maxDist + ); + + private array $jsGlobals = []; + + public function __construct( + private int $id, + public readonly int $type, + private array $param, + private array $worldPos, + private SmartAI &$smartAI) + { + // additional parameters + Util::checkNumeric($this->param, NUM_CAST_INT); + Util::checkNumeric($this->worldPos, NUM_CAST_FLOAT); + $this->param = array_pad($this->param, 15, ''); + $this->worldPos = array_pad($this->worldPos, 4, 0.0); + } + + public function process() : string + { + $target = ''; + + $targetTT = Lang::smartAI('targetTT', array_merge([$this->type], $this->param, $this->worldPos)); + + for ($i = 0; $i < 4; $i++) + { + $tParams = $this->targets[$this->type]; + + if (is_array($tParams[$i])) + { + [$fn, $idx, $extraParam] = $tParams[$i]; + + $this->param[$idx] = $this->{$fn}($this->param[$i], $this->param[$i + 1], $extraParam); + } + else if (is_int($tParams[$i]) && $this->param[$i]) + $this->jsGlobals[$tParams[$i]][$this->param[$i]] = $this->param[$i]; + } + + // non-generic cases + switch ($this->type) + { + case self::TARGET_HOSTILE_SECOND_AGGRO: + case self::TARGET_HOSTILE_LAST_AGGRO: + case self::TARGET_HOSTILE_RANDOM: + case self::TARGET_HOSTILE_RANDOM_NOT_TOP: + if ($this->param[2]) + $this->param[10] = Lang::spell('powerTypes', $this->param[2] - 1); + break; + case self::TARGET_VEHICLE_PASSENGER: + if ($this->param[0]) + $this->param[10] = Lang::concat(Util::mask2bits($this->param[0])); + break; + case self::TARGET_CREATURE_GUID: + if ($_ = $this->resolveGuid(Type::NPC, $this->param[0])) + { + $this->jsGlobals[Type::NPC][$_] = $_; + $this->param[10] = $_; + } + break; + case self::TARGET_GAMEOBJECT_GUID: + if ($_ = $this->resolveGuid(Type::OBJECT, $this->param[0])) + { + $this->jsGlobals[Type::OBJECT][$_] = $_; + $this->param[10] = $_; + } + break; + } + + $this->smartAI->addJsGlobals($this->jsGlobals); + + $target = Lang::smartAI('targets', $this->type, $this->param) ?? Lang::smartAI('targetUNK', [$this->type]); + + // resolve conditionals + $i = 0; + while (strstr($target, ')?') && $i++ < 3) + $target = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):(([^;]*);*);/i', fn($m) => $m[1] ? $m[2] : $m[3], $target); + + // wrap in tooltip (suspend action-tooltip) + return '[/span]'.sprintf(self::TARGET_TPL, $targetTT, $target).'[span tooltip=a-#rowIdx#]'; + } + + public function getWorldPos() : array + { + return $this->worldPos; + } + + // not really feasable. Too many target types can be players or creatures, depending on context + public function getTalkSource(bool &$playerSrc = false) : int + { + if ($this->type == SmartTarget::TARGET_CLOSEST_PLAYER) + $playerSrc = true; + + return match ($this->type) + { + SmartTarget::TARGET_CREATURE_GUID => $this->resolveGuid(Type::NPC, $this->param[0]) ?? 0, + SmartTarget::TARGET_CREATURE_RANGE, + SmartTarget::TARGET_CREATURE_DISTANCE, + SmartTarget::TARGET_CLOSEST_CREATURE => $this->param[0], + SmartTarget::TARGET_CLOSEST_PLAYER, + SmartTarget::TARGET_SELF => $this->smartAI->getEntry(), + default => $this->smartAI->getEntry() + }; + } +} + +?> diff --git a/includes/defines.php b/includes/defines.php index 6a9b5e21..c4c9e1c5 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -230,6 +230,67 @@ define('MENU_IDX_URL', 2); // URL: A string define('MENU_IDX_SUB', 3); // Submenu: Child menu define('MENU_IDX_OPT', 4); // Options: JSON array with additional options +// profiler queue interactions +define('PR_QUEUE_STATUS_ENDED', 0); +define('PR_QUEUE_STATUS_WAITING', 1); +define('PR_QUEUE_STATUS_WORKING', 2); +define('PR_QUEUE_STATUS_READY', 3); +define('PR_QUEUE_STATUS_ERROR', 4); +define('PR_QUEUE_ERROR_UNK', 0); +define('PR_QUEUE_ERROR_CHAR', 1); +define('PR_QUEUE_ERROR_ARMORY', 2); + +// profiler completion manager +define('PR_EXCLUDE_GROUP_UNAVAILABLE', 0x001); +define('PR_EXCLUDE_GROUP_TCG', 0x002); +define('PR_EXCLUDE_GROUP_COLLECTORS_EDITION', 0x004); +define('PR_EXCLUDE_GROUP_PROMOTION', 0x008); +define('PR_EXCLUDE_GROUP_WRONG_REGION', 0x010); +define('PR_EXCLUDE_GROUP_REQ_ALLIANCE', 0x020); +define('PR_EXCLUDE_GROUP_REQ_HORDE', 0x040); +define('PR_EXCLUDE_GROUP_OTHER_FACTION', PR_EXCLUDE_GROUP_REQ_ALLIANCE | PR_EXCLUDE_GROUP_REQ_HORDE); +define('PR_EXCLUDE_GROUP_REQ_FISHING', 0x080); +define('PR_EXCLUDE_GROUP_REQ_ENGINEERING', 0x100); +define('PR_EXCLUDE_GROUP_REQ_TAILORING', 0x200); +define('PR_EXCLUDE_GROUP_WRONG_PROFESSION', PR_EXCLUDE_GROUP_REQ_FISHING | PR_EXCLUDE_GROUP_REQ_ENGINEERING | PR_EXCLUDE_GROUP_REQ_TAILORING); +define('PR_EXCLUDE_GROUP_REQ_CANT_BE_EXALTED', 0x400); +define('PR_EXCLUDE_GROUP_ANY', 0x7FF); + +// Drop Sources +define('SRC_CRAFTED', 1); +define('SRC_DROP', 2); +define('SRC_PVP', 3); +define('SRC_QUEST', 4); +define('SRC_VENDOR', 5); +define('SRC_TRAINER', 6); +define('SRC_DISCOVERY', 7); +define('SRC_REDEMPTION', 8); // unused +define('SRC_TALENT', 9); +define('SRC_STARTER', 10); +define('SRC_EVENT', 11); // unused +define('SRC_ACHIEVEMENT', 12); +define('SRC_CUSTOM_STRING', 13); +// define('SRC_BLACK_MARKET', 14); // not in 3.3.5 +define('SRC_DISENCHANTMENT', 15); +define('SRC_FISHING', 16); +define('SRC_GATHERING', 17); +define('SRC_MILLING', 18); +define('SRC_MINING', 19); +define('SRC_PROSPECTING', 20); +define('SRC_PICKPOCKETING', 21); +define('SRC_SALVAGING', 22); +define('SRC_SKINNING', 23); +// define('SRC_INGAME_STORE', 24); // not in 3.3.5 + +define('SRC_SUB_PVP_ARENA', 1); +define('SRC_SUB_PVP_BG', 2); +define('SRC_SUB_PVP_WORLD', 4); + +define('SRC_FLAG_BOSSDROP', 0x01); +define('SRC_FLAG_COMMON', 0x02); +define('SRC_FLAG_DUNGEON_DROP', 0x10); +define('SRC_FLAG_RAID_DROP', 0x20); + /* * Game @@ -648,17 +709,19 @@ define('UNIT_STAND_STATE_DEAD', 7); define('UNIT_STAND_STATE_KNEEL', 8); define('UNIT_STAND_STATE_SUBMERGED', 9); -// UNIT_FIELD_BYTES_1 - idx 2 (UnitStandFlags) -define('UNIT_STAND_FLAGS_UNK1', 0x01); -define('UNIT_STAND_FLAGS_CREEP', 0x02); -define('UNIT_STAND_FLAGS_UNTRACKABLE', 0x04); -define('UNIT_STAND_FLAGS_UNK4', 0x08); -define('UNIT_STAND_FLAGS_UNK5', 0x10); +// UNIT_FIELD_BYTES_1 - idx 2 (UnitVisFlags) +define('UNIT_VIS_FLAGS_UNK1', 0x01); +define('UNIT_VIS_FLAGS_CREEP', 0x02); +define('UNIT_VIS_FLAGS_UNTRACKABLE', 0x04); +define('UNIT_VIS_FLAGS_UNK4', 0x08); +define('UNIT_VIS_FLAGS_UNK5', 0x10); -// UNIT_FIELD_BYTES_1 - idx 3 (UnitBytes1_Flags) -define('UNIT_BYTE1_FLAG_ALWAYS_STAND', 0x01); -define('UNIT_BYTE1_FLAG_HOVER', 0x02); -define('UNIT_BYTE1_FLAG_UNK_3', 0x04); +// UNIT_FIELD_BYTES_1 - idx 3 (UnitAnimTier) +define('UNIT_BYTE1_ANIM_TIER_GROUND', 0); +define('UNIT_BYTE1_ANIM_TIER_SWIM', 1); +define('UNIT_BYTE1_ANIM_TIER_HOVER', 2); +define('UNIT_BYTE1_ANIM_TIER_FLY', 3); +define('UNIT_BYTE1_ANIM_TIER_SUMBERGED', 4); define('UNIT_DYNFLAG_LOOTABLE', 0x01); // define('UNIT_DYNFLAG_TRACK_UNIT', 0x02); // Creature's location will be seen as a small dot in the minimap @@ -1840,314 +1903,6 @@ define('ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE', 112); // define('ACHIEVEMENT_CRITERIA_TYPE_DISENCHANT_ROLLS', 117); // define('ACHIEVEMENT_CRITERIA_TYPE_USE_LFD_TO_GROUP_WITH_PLAYERS', 119); -// TrinityCore - SmartAI -define('SAI_SRC_TYPE_CREATURE', 0); -define('SAI_SRC_TYPE_OBJECT', 1); -define('SAI_SRC_TYPE_AREATRIGGER', 2); -define('SAI_SRC_TYPE_ACTIONLIST', 9); - -define('SAI_EVENT_FLAG_NO_REPEAT', 0x0001); -define('SAI_EVENT_FLAG_DIFFICULTY_0', 0x0002); -define('SAI_EVENT_FLAG_DIFFICULTY_1', 0x0004); -define('SAI_EVENT_FLAG_DIFFICULTY_2', 0x0008); -define('SAI_EVENT_FLAG_DIFFICULTY_3', 0x0010); -define('SAI_EVENT_FLAG_NO_RESET', 0x0100); -define('SAI_EVENT_FLAG_WHILE_CHARMED', 0x0200); - -define('SAI_EVENT_UPDATE_IC', 0); // In combat. -define('SAI_EVENT_UPDATE_OOC', 1); // Out of combat. -define('SAI_EVENT_HEALTH_PCT', 2); // Health Percentage -define('SAI_EVENT_MANA_PCT', 3); // Mana Percentage -define('SAI_EVENT_AGGRO', 4); // On Creature Aggro -define('SAI_EVENT_KILL', 5); // On Creature Kill -define('SAI_EVENT_DEATH', 6); // On Creature Death -define('SAI_EVENT_EVADE', 7); // On Creature Evade Attack -define('SAI_EVENT_SPELLHIT', 8); // On Creature/Gameobject Spell Hit -define('SAI_EVENT_RANGE', 9); // On Target In Range -define('SAI_EVENT_OOC_LOS', 10); // On Target In Distance Out of Combat -define('SAI_EVENT_RESPAWN', 11); // On Creature/Gameobject Respawn -define('SAI_EVENT_TARGET_HEALTH_PCT', 12); // On Target Health Percentage -define('SAI_EVENT_VICTIM_CASTING', 13); // On Target Casting Spell -define('SAI_EVENT_FRIENDLY_HEALTH', 14); // On Friendly Health Deficit -define('SAI_EVENT_FRIENDLY_IS_CC', 15); // -define('SAI_EVENT_FRIENDLY_MISSING_BUFF', 16); // On Friendly Lost Buff -define('SAI_EVENT_SUMMONED_UNIT', 17); // On Creature/Gameobject Summoned Unit -define('SAI_EVENT_TARGET_MANA_PCT', 18); // On Target Mana Percentage -define('SAI_EVENT_ACCEPTED_QUEST', 19); // On Target Accepted Quest -define('SAI_EVENT_REWARD_QUEST', 20); // On Target Rewarded Quest -define('SAI_EVENT_REACHED_HOME', 21); // On Creature Reached Home -define('SAI_EVENT_RECEIVE_EMOTE', 22); // On Receive Emote. -define('SAI_EVENT_HAS_AURA', 23); // On Creature Has Aura -define('SAI_EVENT_TARGET_BUFFED', 24); // On Target Buffed With Spell -define('SAI_EVENT_RESET', 25); // After Combat, On Respawn or Spawn -define('SAI_EVENT_IC_LOS', 26); // On Target In Distance In Combat -define('SAI_EVENT_PASSENGER_BOARDED', 27); // -define('SAI_EVENT_PASSENGER_REMOVED', 28); // -define('SAI_EVENT_CHARMED', 29); // On Creature Charmed -define('SAI_EVENT_CHARMED_TARGET', 30); // On Target Charmed -define('SAI_EVENT_SPELLHIT_TARGET', 31); // On Target Spell Hit -define('SAI_EVENT_DAMAGED', 32); // On Creature Damaged -define('SAI_EVENT_DAMAGED_TARGET', 33); // On Target Damaged -define('SAI_EVENT_MOVEMENTINFORM', 34); // WAYPOINT_MOTION_TYPE = 2, POINT_MOTION_TYPE = 8 -define('SAI_EVENT_SUMMON_DESPAWNED', 35); // On Summoned Unit Despawned -define('SAI_EVENT_CORPSE_REMOVED', 36); // On Creature Corpse Removed -define('SAI_EVENT_AI_INIT', 37); // -define('SAI_EVENT_DATA_SET', 38); // On Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA -define('SAI_EVENT_WAYPOINT_START', 39); // On Creature Waypoint ID Started -define('SAI_EVENT_WAYPOINT_REACHED', 40); // On Creature Waypoint ID Reached -// define('SAI_EVENT_TRANSPORT_ADDPLAYER', 41); // -// define('SAI_EVENT_TRANSPORT_ADDCREATURE', 42); // -// define('SAI_EVENT_TRANSPORT_REMOVE_PLAYER', 43); // -// define('SAI_EVENT_TRANSPORT_RELOCATE', 44); // -// define('SAI_EVENT_INSTANCE_PLAYER_ENTER', 45); // -define('SAI_EVENT_AREATRIGGER_ONTRIGGER', 46); // -// define('SAI_EVENT_QUEST_ACCEPTED', 47); // On Target Quest Accepted -// define('SAI_EVENT_QUEST_OBJ_COMPLETION', 48); // On Target Quest Objective Completed -// define('SAI_EVENT_QUEST_COMPLETION', 49); // On Target Quest Completed -// define('SAI_EVENT_QUEST_REWARDED', 50); // On Target Quest Rewarded -// define('SAI_EVENT_QUEST_FAIL', 51); // On Target Quest Field -define('SAI_EVENT_TEXT_OVER', 52); // On TEXT_OVER Event Triggered After SMART_ACTION_TALK -define('SAI_EVENT_RECEIVE_HEAL', 53); // On Creature Received Healing -define('SAI_EVENT_JUST_SUMMONED', 54); // On Creature Just spawned -define('SAI_EVENT_WAYPOINT_PAUSED', 55); // On Creature Paused at Waypoint ID -define('SAI_EVENT_WAYPOINT_RESUMED', 56); // On Creature Resumed after Waypoint ID -define('SAI_EVENT_WAYPOINT_STOPPED', 57); // On Creature Stopped On Waypoint ID -define('SAI_EVENT_WAYPOINT_ENDED', 58); // On Creature Waypoint Path Ended -define('SAI_EVENT_TIMED_EVENT_TRIGGERED', 59); // -define('SAI_EVENT_UPDATE', 60); // -define('SAI_EVENT_LINK', 61); // Used to link together multiple events as a chain of events. -define('SAI_EVENT_GOSSIP_SELECT', 62); // On gossip clicked (gossip_menu_option335). -define('SAI_EVENT_JUST_CREATED', 63); // -define('SAI_EVENT_GOSSIP_HELLO', 64); // On Right-Click Creature/Gameobject that have gossip enabled. -define('SAI_EVENT_FOLLOW_COMPLETED', 65); // -define('SAI_EVENT_EVENT_PHASE_CHANGE', 66); // On event phase mask set -define('SAI_EVENT_IS_BEHIND_TARGET', 67); // On Creature is behind target. -define('SAI_EVENT_GAME_EVENT_START', 68); // On game_event started. -define('SAI_EVENT_GAME_EVENT_END', 69); // On game_event ended. -define('SAI_EVENT_GO_STATE_CHANGED', 70); // -define('SAI_EVENT_GO_EVENT_INFORM', 71); // -define('SAI_EVENT_ACTION_DONE', 72); // -define('SAI_EVENT_ON_SPELLCLICK', 73); // -define('SAI_EVENT_FRIENDLY_HEALTH_PCT', 74); // -define('SAI_EVENT_DISTANCE_CREATURE', 75); // On creature guid OR any instance of creature entry is within distance. -define('SAI_EVENT_DISTANCE_GAMEOBJECT', 76); // On gameobject guid OR any instance of gameobject entry is within distance. -define('SAI_EVENT_COUNTER_SET', 77); // If the value of specified counterID is equal to a specified value -// define('SAI_EVENT_SCENE_START', 78); // don't use on 3.3.5a -// define('SAI_EVENT_SCENE_TRIGGER', 79); // don't use on 3.3.5a -// define('SAI_EVENT_SCENE_CANCEL', 80); // don't use on 3.3.5a -// define('SAI_EVENT_SCENE_COMPLETE', 81); // don't use on 3.3.5a -define('SAI_EVENT_SUMMONED_UNIT_DIES', 82); // CreatureId(0 all), CooldownMin, CooldownMax - -define('SAI_ACTION_NONE', 0); // Do nothing -define('SAI_ACTION_TALK', 1); // Param2 in Milliseconds. -define('SAI_ACTION_SET_FACTION', 2); // Sets faction to creature. -define('SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL', 3); // Take DisplayID of creature (param1) OR Turn to DisplayID (param2) OR Both = 0 for Demorph -define('SAI_ACTION_SOUND', 4); // TextRange = 0 only sends sound to self, TextRange = 1 sends sound to everyone in visibility range -define('SAI_ACTION_PLAY_EMOTE', 5); // Play Emote -define('SAI_ACTION_FAIL_QUEST', 6); // Fail Quest of Target -define('SAI_ACTION_OFFER_QUEST', 7); // Add Quest to Target -define('SAI_ACTION_SET_REACT_STATE', 8); // React State. Can be Passive (0), Defensive (1), Aggressive (2), Assist (3). -define('SAI_ACTION_ACTIVATE_GOBJECT', 9); // Activate Object -define('SAI_ACTION_RANDOM_EMOTE', 10); // Play Random Emote -define('SAI_ACTION_CAST', 11); // Cast Spell ID at Target -define('SAI_ACTION_SUMMON_CREATURE', 12); // Summon Unit -define('SAI_ACTION_THREAT_SINGLE_PCT', 13); // Change Threat Percentage for Single Target -define('SAI_ACTION_THREAT_ALL_PCT', 14); // Change Threat Percentage for All Enemies -define('SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS', 15); // -// define('SAI_ACTION_SET_INGAME_PHASE_ID', 16); // For 4.3.4 + only -define('SAI_ACTION_SET_EMOTE_STATE', 17); // Play Emote Continuously -define('SAI_ACTION_SET_UNIT_FLAG', 18); // Can set Multi-able flags at once -define('SAI_ACTION_REMOVE_UNIT_FLAG', 19); // Can Remove Multi-able flags at once -define('SAI_ACTION_AUTO_ATTACK', 20); // Stop or Continue Automatic Attack. -define('SAI_ACTION_ALLOW_COMBAT_MOVEMENT', 21); // Allow or Disable Combat Movement -define('SAI_ACTION_SET_EVENT_PHASE', 22); // -define('SAI_ACTION_INC_EVENT_PHASE', 23); // Set param1 OR param2 (not both). Value 0 has no effect. -define('SAI_ACTION_EVADE', 24); // Evade Incoming Attack -define('SAI_ACTION_FLEE_FOR_ASSIST', 25); // If you want the fleeing NPC to say '%s attempts to run away in fear' on flee, use 1 on param1. 0 for no message. -define('SAI_ACTION_CALL_GROUPEVENTHAPPENS', 26); // -define('SAI_ACTION_COMBAT_STOP', 27); // -define('SAI_ACTION_REMOVEAURASFROMSPELL', 28); // 0 removes all auras -define('SAI_ACTION_FOLLOW', 29); // Follow Target -define('SAI_ACTION_RANDOM_PHASE', 30); // -define('SAI_ACTION_RANDOM_PHASE_RANGE', 31); // -define('SAI_ACTION_RESET_GOBJECT', 32); // Reset Gameobject -define('SAI_ACTION_CALL_KILLEDMONSTER', 33); // This is the ID from quest_template.RequiredNpcOrGo -define('SAI_ACTION_SET_INST_DATA', 34); // Set Instance Data -// define('SAI_ACTION_SET_INST_DATA64', 35); // Set Instance Data uint64 -define('SAI_ACTION_UPDATE_TEMPLATE', 36); // Updates creature_template to given entry -define('SAI_ACTION_DIE', 37); // Kill Target -define('SAI_ACTION_SET_IN_COMBAT_WITH_ZONE', 38); // -define('SAI_ACTION_CALL_FOR_HELP', 39); // If you want the NPC to say '%s calls for help!'. Use 1 on param1, 0 for no message. -define('SAI_ACTION_SET_SHEATH', 40); // -define('SAI_ACTION_FORCE_DESPAWN', 41); // Despawn Target after param1 in Milliseconds. If you want to set respawn time set param2 in seconds. -define('SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL', 42); // If you use both params, only percent will be used. -define('SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL', 43); // Mount to Creature Entry (param1) OR Mount to Creature Display (param2) Or both = 0 for Unmount -define('SAI_ACTION_SET_INGAME_PHASE_MASK', 44); // -define('SAI_ACTION_SET_DATA', 45); // Set Data For Target, can be used with SMART_EVENT_DATA_SET -define('SAI_ACTION_ATTACK_STOP', 46); // -define('SAI_ACTION_SET_VISIBILITY', 47); // Makes creature Visible = 1 or Invisible = 0 -define('SAI_ACTION_SET_ACTIVE', 48); // -define('SAI_ACTION_ATTACK_START', 49); // Allows basic melee swings to creature. -define('SAI_ACTION_SUMMON_GO', 50); // Spawns Gameobject, use target_type to set spawn position. -define('SAI_ACTION_KILL_UNIT', 51); // Kills Creature. -define('SAI_ACTION_ACTIVATE_TAXI', 52); // Sends player to flight path. You have to be close to Flight Master, which gives Taxi ID you need. -define('SAI_ACTION_WP_START', 53); // Creature starts Waypoint Movement. Use waypoints table to create movement. -define('SAI_ACTION_WP_PAUSE', 54); // Creature pauses its Waypoint Movement for given time. -define('SAI_ACTION_WP_STOP', 55); // Creature stops its Waypoint Movement. -define('SAI_ACTION_ADD_ITEM', 56); // Adds item(s) to player. -define('SAI_ACTION_REMOVE_ITEM', 57); // Removes item(s) from player. -define('SAI_ACTION_INSTALL_AI_TEMPLATE', 58); // -define('SAI_ACTION_SET_RUN', 59); // -define('SAI_ACTION_SET_DISABLE_GRAVITY', 60); // Only works for creatures with inhabit air. -define('SAI_ACTION_SET_SWIM', 61); // -define('SAI_ACTION_TELEPORT', 62); // Continue this action with the TARGET_TYPE column. Use any target_type (except 0), and use target_x, target_y, target_z, target_o as the coordinates -define('SAI_ACTION_SET_COUNTER', 63); // -define('SAI_ACTION_STORE_TARGET_LIST', 64); // -define('SAI_ACTION_WP_RESUME', 65); // Creature continues in its Waypoint Movement. -define('SAI_ACTION_SET_ORIENTATION', 66); // -define('SAI_ACTION_CREATE_TIMED_EVENT', 67); // -define('SAI_ACTION_PLAYMOVIE', 68); // -define('SAI_ACTION_MOVE_TO_POS', 69); // PointId is called by SMART_EVENT_MOVEMENTINFORM. Continue this action with the TARGET_TYPE column. Use any target_type, and use target_x, target_y, target_z, target_o as the coordinates -define('SAI_ACTION_ENABLE_TEMP_GOBJ', 70); // param1 = duration -define('SAI_ACTION_EQUIP', 71); // only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), Slots1-3 are only used if no Param1 is set -define('SAI_ACTION_CLOSE_GOSSIP', 72); // Closes gossip window. -define('SAI_ACTION_TRIGGER_TIMED_EVENT', 73); // -define('SAI_ACTION_REMOVE_TIMED_EVENT', 74); // -define('SAI_ACTION_ADD_AURA', 75); // Adds aura to player(s). Use target_type 17 to make AoE aura. -define('SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT', 76); // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing -define('SAI_ACTION_RESET_SCRIPT_BASE_OBJECT', 77); // -define('SAI_ACTION_CALL_SCRIPT_RESET', 78); // -define('SAI_ACTION_SET_RANGED_MOVEMENT', 79); // Sets movement to follow at a specific range to the target. -define('SAI_ACTION_CALL_TIMED_ACTIONLIST', 80); // -define('SAI_ACTION_SET_NPC_FLAG', 81); // -define('SAI_ACTION_ADD_NPC_FLAG', 82); // -define('SAI_ACTION_REMOVE_NPC_FLAG', 83); // -define('SAI_ACTION_SIMPLE_TALK', 84); // Makes a player say text. SMART_EVENT_TEXT_OVER is not triggered and whispers can not be used. -define('SAI_ACTION_SELF_CAST', 85); // spellID, castFlags -define('SAI_ACTION_CROSS_CAST', 86); // This action is used to make selected caster (in CasterTargetType) to cast spell. Actual target is entered in target_type as normally. -define('SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST', 87); // Will select one entry from the ones provided. 0 is ignored. -define('SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST', 88); // 0 is ignored. -define('SAI_ACTION_RANDOM_MOVE', 89); // Creature moves to random position in given radius. -define('SAI_ACTION_SET_UNIT_FIELD_BYTES_1', 90); // -define('SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1', 91); // -define('SAI_ACTION_INTERRUPT_SPELL', 92); // This action allows you to interrupt the current spell being cast. If you do not set the spellId, the core will find the current spell depending on the withDelay and the withInstant values. -define('SAI_ACTION_SEND_GO_CUSTOM_ANIM', 93); // -define('SAI_ACTION_SET_DYNAMIC_FLAG', 94); // -define('SAI_ACTION_ADD_DYNAMIC_FLAG', 95); // -define('SAI_ACTION_REMOVE_DYNAMIC_FLAG', 96); // -define('SAI_ACTION_JUMP_TO_POS', 97); // -define('SAI_ACTION_SEND_GOSSIP_MENU', 98); // Can be used together with 'SMART_EVENT_GOSSIP_HELLO' to set custom gossip. -define('SAI_ACTION_GO_SET_LOOT_STATE', 99); // -define('SAI_ACTION_SEND_TARGET_TO_TARGET', 100); // Send targets previously stored with SMART_ACTION_STORE_TARGET, to another npc/go, the other npc/go can then access them as if it was its own stored list -define('SAI_ACTION_SET_HOME_POS', 101); // Use with SMART_TARGET_SELF or SMART_TARGET_POSITION -define('SAI_ACTION_SET_HEALTH_REGEN', 102); // Sets the current creatures health regen on or off. -define('SAI_ACTION_SET_ROOT', 103); // Enables or disables creature movement -define('SAI_ACTION_SET_GO_FLAG', 104); // oldFlag = newFlag -define('SAI_ACTION_ADD_GO_FLAG', 105); // oldFlag |= newFlag -define('SAI_ACTION_REMOVE_GO_FLAG', 106); // oldFlag &= ~newFlag -define('SAI_ACTION_SUMMON_CREATURE_GROUP', 107); // Use creature_summon_groups table. SAI target has no effect, use 0 -define('SAI_ACTION_SET_POWER', 108); // -define('SAI_ACTION_ADD_POWER', 109); // -define('SAI_ACTION_REMOVE_POWER', 110); // -define('SAI_ACTION_GAME_EVENT_STOP', 111); // -define('SAI_ACTION_GAME_EVENT_START', 112); // -define('SAI_ACTION_START_CLOSEST_WAYPOINT', 113); // Make target follow closest waypoint to its location -define('SAI_ACTION_MOVE_OFFSET', 114); // Use target_x, target_y, target_z With target_type=1 -define('SAI_ACTION_RANDOM_SOUND', 115); // -define('SAI_ACTION_SET_CORPSE_DELAY', 116); // -define('SAI_ACTION_DISABLE_EVADE', 117); // -define('SAI_ACTION_GO_SET_GO_STATE', 118); // -define('SAI_ACTION_SET_CAN_FLY', 119); // -define('SAI_ACTION_REMOVE_AURAS_BY_TYPE', 120); // -define('SAI_ACTION_SET_SIGHT_DIST', 121); // -define('SAI_ACTION_FLEE', 122); // -define('SAI_ACTION_ADD_THREAT', 123); // -define('SAI_ACTION_LOAD_EQUIPMENT', 124); // -define('SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT', 125); // -define('SAI_ACTION_REMOVE_ALL_GAMEOBJECTS', 126); // -define('SAI_ACTION_PAUSE_MOVEMENT', 127); // MovementSlot (default = 0, active = 1, controlled = 2), PauseTime (ms), Force -// define('SAI_ACTION_PLAY_ANIMKIT', 128); // don't use on 3.3.5a -// define('SAI_ACTION_SCENE_PLAY', 129); // don't use on 3.3.5a -// define('SAI_ACTION_SCENE_CANCEL', 130); // don't use on 3.3.5a -define('SAI_ACTION_SPAWN_SPAWNGROUP', 131); // -define('SAI_ACTION_DESPAWN_SPAWNGROUP', 132); // -define('SAI_ACTION_RESPAWN_BY_SPAWNID', 133); // type, typeGuid - Use to respawn npcs and gobs, the target in this case is always=1 and only a single unit could be a target via the spawnId (action_param1, action_param2) -define('SAI_ACTION_INVOKER_CAST', 134); // spellID, castFlags -define('SAI_ACTION_PLAY_CINEMATIC', 135); // cinematic -define('SAI_ACTION_SET_MOVEMENT_SPEED', 136); // movementType, speedInteger, speedFraction -define('SAI_ACTION_PLAY_SPELL_VISUAL_KIT', 137); // spellVisualKitId (RESERVED, PENDING CHERRYPICK) -define('SAI_ACTION_OVERRIDE_LIGHT', 138); // zoneId, areaLightId, overrideLightID, transitionMilliseconds -define('SAI_ACTION_OVERRIDE_WEATHER', 139); // zoneId, weatherId, intensity - -define('SAI_ACTION_ALL_SPELLCASTS', [SAI_ACTION_CAST, SAI_ACTION_ADD_AURA, SAI_ACTION_INVOKER_CAST, SAI_ACTION_SELF_CAST, SAI_ACTION_CROSS_CAST]); -define('SAI_ACTION_ALL_TIMED_ACTION_LISTS', [SAI_ACTION_CALL_TIMED_ACTIONLIST, SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST, SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST]); - -define('SAI_CAST_FLAG_INTERRUPT_PREV', 0x01); -define('SAI_CAST_FLAG_TRIGGERED', 0x02); -// define('SAI_CAST_FORCE_CAST', 0x04); // Forces cast even if creature is out of mana or out of range -// define('SAI_CAST_NO_MELEE_IF_OOM', 0x08); // Prevents creature from entering melee if out of mana or out of range -// define('SAI_CAST_FORCE_TARGET_SELF', 0x10); // the target to cast this spell on itself -define('SAI_CAST_FLAG_AURA_MISSING', 0x20); -define('SAI_CAST_FLAG_COMBAT_MOVE', 0x40); - -define('SAI_REACT_PASSIVE', 0); -define('SAI_REACT_DEFENSIVE', 1); -define('SAI_REACT_AGGRESSIVE', 2); -define('SAI_REACT_ASSIST', 3); - -define('SAI_SUMMON_TIMED_OR_DEAD_DESPAWN', 1); -define('SAI_SUMMON_TIMED_OR_CORPSE_DESPAWN', 2); -define('SAI_SUMMON_TIMED_DESPAWN', 3); -define('SAI_SUMMON_TIMED_DESPAWN_OOC', 4); -define('SAI_SUMMON_CORPSE_DESPAWN', 5); -define('SAI_SUMMON_CORPSE_TIMED_DESPAWN', 6); -define('SAI_SUMMON_DEAD_DESPAWN', 7); -define('SAI_SUMMON_MANUAL_DESPAWN', 8); - -define('SAI_TARGET_NONE', 0); // None. -define('SAI_TARGET_SELF', 1); // Self cast. -define('SAI_TARGET_VICTIM', 2); // Our current target. (ie: highest aggro) -define('SAI_TARGET_HOSTILE_SECOND_AGGRO', 3); // Second highest aggro. -define('SAI_TARGET_HOSTILE_LAST_AGGRO', 4); // Dead last on aggro. -define('SAI_TARGET_HOSTILE_RANDOM', 5); // Just any random target on our threat list. -define('SAI_TARGET_HOSTILE_RANDOM_NOT_TOP', 6); // Any random target except top threat. -define('SAI_TARGET_ACTION_INVOKER', 7); // Unit who caused this Event to occur. -define('SAI_TARGET_POSITION', 8); // Use xyz from event params. -define('SAI_TARGET_CREATURE_RANGE', 9); // (Random?) creature with specified ID within specified range. -define('SAI_TARGET_CREATURE_GUID', 10); // Creature with specified GUID. -define('SAI_TARGET_CREATURE_DISTANCE', 11); // Creature with specified ID within distance. (Different from #9?) -define('SAI_TARGET_STORED', 12); // Uses pre-stored target(list) -define('SAI_TARGET_GAMEOBJECT_RANGE', 13); // (Random?) object with specified ID within specified range. -define('SAI_TARGET_GAMEOBJECT_GUID', 14); // Object with specified GUID. -define('SAI_TARGET_GAMEOBJECT_DISTANCE', 15); // Object with specified ID within distance. (Different from #13?) -define('SAI_TARGET_INVOKER_PARTY', 16); // Invoker's party members -define('SAI_TARGET_PLAYER_RANGE', 17); // (Random?) player within specified range. -define('SAI_TARGET_PLAYER_DISTANCE', 18); // (Random?) player within specified distance. (Different from #17?) -define('SAI_TARGET_CLOSEST_CREATURE', 19); // Closest creature with specified ID within specified range. -define('SAI_TARGET_CLOSEST_GAMEOBJECT', 20); // Closest object with specified ID within specified range. -define('SAI_TARGET_CLOSEST_PLAYER', 21); // Closest player within specified range. -define('SAI_TARGET_ACTION_INVOKER_VEHICLE', 22); // Unit's vehicle who caused this Event to occur -define('SAI_TARGET_OWNER_OR_SUMMONER', 23); // Unit's owner or summoner -define('SAI_TARGET_THREAT_LIST', 24); // All units on creature's threat list -define('SAI_TARGET_CLOSEST_ENEMY', 25); // Any attackable target (creature or player) within maxDist -define('SAI_TARGET_CLOSEST_FRIENDLY', 26); // Any friendly unit (creature, player or pet) within maxDist -define('SAI_TARGET_LOOT_RECIPIENTS', 27); // All tagging players -define('SAI_TARGET_FARTHEST', 28); // Farthest unit on the threat list -define('SAI_TARGET_VEHICLE_PASSENGER', 29); // Vehicle can target unit in given seat -define('SAI_TARGET_CLOSEST_UNSPAWNED_GO', 30); // entry(0any), maxDist - -define('SAI_TEMPLATE_BASIC', 0); // -define('SAI_TEMPLATE_CASTER', 1); // +JOIN: target_param1 as castFlag -define('SAI_TEMPLATE_TURRET', 2); // +JOIN: target_param1 as castflag -define('SAI_TEMPLATE_PASSIVE', 3); // -define('SAI_TEMPLATE_CAGED_GO_PART', 4); // -define('SAI_TEMPLATE_CAGED_NPC_PART', 5); // - -define('SAI_SPAWN_FLAG_NONE', 0x00); -define('SAI_SPAWN_FLAG_IGNORE_RESPAWN', 0x01); // onSpawnIn - ignore & reset respawn timer -define('SAI_SPAWN_FLAG_FORCE_SPAWN', 0x02); // onSpawnIn - force additional spawn if already in world -define('SAI_SPAWN_FLAG_NOSAVE_RESPAWN', 0x04); // onDespawn - remove respawn time - // TrinityCore - Account Security define('SEC_PLAYER', 0); define('SEC_MODERATOR', 1); @@ -2155,32 +1910,6 @@ define('SEC_GAMEMASTER', 2); define('SEC_ADMINISTRATOR', 3); define('SEC_CONSOLE', 4); // console only - should not be encountered -// profiler queue interactions -define('PR_QUEUE_STATUS_ENDED', 0); -define('PR_QUEUE_STATUS_WAITING', 1); -define('PR_QUEUE_STATUS_WORKING', 2); -define('PR_QUEUE_STATUS_READY', 3); -define('PR_QUEUE_STATUS_ERROR', 4); -define('PR_QUEUE_ERROR_UNK', 0); -define('PR_QUEUE_ERROR_CHAR', 1); -define('PR_QUEUE_ERROR_ARMORY', 2); - -// profiler completion manager -define('PR_EXCLUDE_GROUP_UNAVAILABLE', 0x001); -define('PR_EXCLUDE_GROUP_TCG', 0x002); -define('PR_EXCLUDE_GROUP_COLLECTORS_EDITION', 0x004); -define('PR_EXCLUDE_GROUP_PROMOTION', 0x008); -define('PR_EXCLUDE_GROUP_WRONG_REGION', 0x010); -define('PR_EXCLUDE_GROUP_REQ_ALLIANCE', 0x020); -define('PR_EXCLUDE_GROUP_REQ_HORDE', 0x040); -define('PR_EXCLUDE_GROUP_OTHER_FACTION', PR_EXCLUDE_GROUP_REQ_ALLIANCE | PR_EXCLUDE_GROUP_REQ_HORDE); -define('PR_EXCLUDE_GROUP_REQ_FISHING', 0x080); -define('PR_EXCLUDE_GROUP_REQ_ENGINEERING', 0x100); -define('PR_EXCLUDE_GROUP_REQ_TAILORING', 0x200); -define('PR_EXCLUDE_GROUP_WRONG_PROFESSION', PR_EXCLUDE_GROUP_REQ_FISHING | PR_EXCLUDE_GROUP_REQ_ENGINEERING | PR_EXCLUDE_GROUP_REQ_TAILORING); -define('PR_EXCLUDE_GROUP_REQ_CANT_BE_EXALTED', 0x400); -define('PR_EXCLUDE_GROUP_ANY', 0x7FF); - // Areatrigger types define('AT_TYPE_NONE', 0); define('AT_TYPE_TAVERN', 1); @@ -2189,40 +1918,9 @@ define('AT_TYPE_OBJECTIVE', 3); define('AT_TYPE_SMART', 4); define('AT_TYPE_SCRIPT', 5); -// Drop Sources -define('SRC_CRAFTED', 1); -define('SRC_DROP', 2); -define('SRC_PVP', 3); -define('SRC_QUEST', 4); -define('SRC_VENDOR', 5); -define('SRC_TRAINER', 6); -define('SRC_DISCOVERY', 7); -define('SRC_REDEMPTION', 8); // unused -define('SRC_TALENT', 9); -define('SRC_STARTER', 10); -define('SRC_EVENT', 11); // unused -define('SRC_ACHIEVEMENT', 12); -define('SRC_CUSTOM_STRING', 13); -// define('SRC_BLACK_MARKET', 14); // not in 3.3.5 -define('SRC_DISENCHANTMENT', 15); -define('SRC_FISHING', 16); -define('SRC_GATHERING', 17); -define('SRC_MILLING', 18); -define('SRC_MINING', 19); -define('SRC_PROSPECTING', 20); -define('SRC_PICKPOCKETING', 21); -define('SRC_SALVAGING', 22); -define('SRC_SKINNING', 23); -// define('SRC_INGAME_STORE', 24); // not in 3.3.5 - -define('SRC_SUB_PVP_ARENA', 1); -define('SRC_SUB_PVP_BG', 2); -define('SRC_SUB_PVP_WORLD', 4); - -define('SRC_FLAG_BOSSDROP', 0x01); -define('SRC_FLAG_COMMON', 0x02); -define('SRC_FLAG_DUNGEON_DROP', 0x10); -define('SRC_FLAG_RAID_DROP', 0x20); +// summon types +define('SUMMONER_TYPE_CREATURE', 0); +define('SUMMONER_TYPE_GAMEOBJECT', 1); // Map Types define('MAP_TYPE_ZONE', 0); diff --git a/includes/game.php b/includes/game.php index a856389e..b3e795e7 100644 --- a/includes/game.php +++ b/includes/game.php @@ -330,7 +330,7 @@ class Game $result = array_replace($result, DB::World()->select( 'SELECT -`ID` AS ARRAY_KEY, ID AS `id`, `target_map` AS `mapId`, `target_position_x` AS `posX`, `target_position_y` AS `posY` FROM areatrigger_teleport WHERE -`id` IN (?a) UNION SELECT -`entryorguid` AS ARRAY_KEY, entryorguid AS `id`, `action_param1` AS `mapId`, `target_x` AS `posX`, `target_y` AS `posY` FROM smart_scripts WHERE -`entryorguid` IN (?a) AND `source_type` = ?d AND `action_type` = ?d', - $endpoints, $endpoints, SAI_SRC_TYPE_AREATRIGGER, SAI_ACTION_TELEPORT + $endpoints, $endpoints, SmartAI::SRC_TYPE_AREATRIGGER, SmartAction::ACTION_TELEPORT )); break; default: @@ -425,7 +425,7 @@ class Game if (in_array($t['talkType'], [2, 16]) && strpos($msg, '%s') === false) $msg = '%s '.$msg; - // fixup: bad case-insensivity + // fixup: bad case-insensitivity $msg = Util::parseHtmlText(str_replace('%S', '%s', htmlentities($msg)), !$asHTML); if ($talkSource) diff --git a/includes/kernel.php b/includes/kernel.php index 72c01fac..61d8d668 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -28,25 +28,45 @@ if ($error) require_once 'includes/defines.php'; require_once 'includes/locale.class.php'; -require_once 'includes/stats.class.php'; // Game entity statistics conversion +require_once 'localization/lang.class.php'; require_once 'includes/libs/DbSimple/Generic.php'; // Libraray: http://en.dklab.ru/lib/DbSimple (using variant: https://github.com/ivan1986/DbSimple/tree/master) +require_once 'includes/database.class.php'; // wrap DBSimple require_once 'includes/utilities.php'; // helper functions require_once 'includes/config.class.php'; // Config holder +require_once 'includes/user.class.php'; // Session handling (could be skipped for CLI context except for username and password validation used in account creation) + +// todo: make everything below autoloaded +require_once 'includes/stats.class.php'; // Game entity statistics conversion require_once 'includes/game.php'; // game related data & functions require_once 'includes/profiler.class.php'; // Profiler feature -require_once 'includes/user.class.php'; // Session handling require_once 'includes/markup.class.php'; // manipulate markup text -require_once 'includes/database.class.php'; // wrap DBSimple require_once 'includes/community.class.php'; // handle comments, screenshots and videos require_once 'includes/loot.class.php'; // build lv-tabs containing loot-information -require_once 'includes/smartAI.class.php'; // TC: SmartAI system -require_once 'includes/conditions.class.php'; // TC: Conditions system -require_once 'localization/lang.class.php'; require_once 'pages/genericPage.class.php'; +// TC systems +spl_autoload_register(function ($class) +{ + switch($class) + { + case 'SmartAI': + case 'SmartEvent': + case 'SmartAction': + case 'SmartTarget': + require_once 'includes/components/SmartAI/SmartAI.class.php'; + require_once 'includes/components/SmartAI/SmartEvent.class.php'; + require_once 'includes/components/SmartAI/SmartAction.class.php'; + require_once 'includes/components/SmartAI/SmartTarget.class.php'; + break; + case 'Conditions': + require_once 'includes/components/Conditions/Conditions.class.php'; + break; + } +}); // autoload List-classes, associated filters and pages -spl_autoload_register(function ($class) { +spl_autoload_register(function ($class) +{ $class = strtolower(str_replace('ListFilter', 'List', $class)); if (class_exists($class)) // already registered diff --git a/includes/smartAI.class.php b/includes/smartAI.class.php deleted file mode 100644 index 40ecd7ff..00000000 --- a/includes/smartAI.class.php +++ /dev/null @@ -1,1642 +0,0 @@ - [1 => $npcId], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => [1 => $npcId] - ); - - if ($npcGuids = DB::Aowow()->selectCol('SELECT guid FROM ?_spawns WHERE `type` = ?d AND `typeId` = ?d', Type::NPC, $npcId)) - if ($groups = DB::World()->selectCol('SELECT `groupId` FROM spawn_group WHERE `spawnType` = 0 AND `spawnId` IN (?a)', $npcGuids)) - foreach ($groups as $g) - $lookup[SAI_ACTION_SPAWN_SPAWNGROUP][1] = $g; - - $result = self::getActionOwner($lookup, $typeFilter); - - // can skip lookups for SAI_ACTION_SUMMON_CREATURE_GROUP as creature_summon_groups already contains summoner info - if ($sgs = DB::World()->select('SELECT `summonerType` AS "0", `summonerId` AS "1" FROM creature_summon_groups WHERE `entry` = ?d', $npcId)) - foreach ($sgs as [$type, $typeId]) - $result[$type][] = $typeId; - - return $result; - } - - public static function getOwnerOfObjectSummon(int $objectId, int $typeFilter = 0) : array - { - if ($objectId <= 0) - return []; - - $lookup = array( - SAI_ACTION_SUMMON_GO => [1 => $objectId] - ); - - if ($objGuids = DB::Aowow()->selectCol('SELECT guid FROM ?_spawns WHERE `type` = ?d AND `typeId` = ?d', Type::OBJECT, $objectId)) - if ($groups = DB::World()->selectCol('SELECT `groupId` FROM spawn_group WHERE `spawnType` = 1 AND `spawnId` IN (?a)', $objGuids)) - foreach ($groups as $g) - $lookup[SAI_ACTION_SPAWN_SPAWNGROUP][1] = $g; - - return self::getActionOwner($lookup, $typeFilter); - } - - public static function getOwnerOfSpellCast(int $spellId, int $typeFilter = 0) : array - { - if ($spellId <= 0) - return []; - - $lookup = array( - SAI_ACTION_CAST => [1 => $spellId], - SAI_ACTION_ADD_AURA => [1 => $spellId], - SAI_ACTION_SELF_CAST => [1 => $spellId], - SAI_ACTION_CROSS_CAST => [1 => $spellId], - SAI_ACTION_INVOKER_CAST => [1 => $spellId] - ); - - return self::getActionOwner($lookup, $typeFilter); - } - - public static function getOwnerOfSoundPlayed(int $soundId, int $typeFilter = 0) : array - { - if ($soundId <= 0) - return []; - - $lookup = array( - SAI_ACTION_SOUND => [1 => $soundId] - ); - - return self::getActionOwner($lookup, $typeFilter); - } - - private static function getActionOwner(array $lookup, int $typeFilter = 0) : array - { - $qParts = []; - $result = []; - $genLimit = $talLimit = []; - switch ($typeFilter) - { - case Type::NPC: - $genLimit = [SAI_SRC_TYPE_CREATURE, SAI_SRC_TYPE_ACTIONLIST]; - $talLimit = [SAI_SRC_TYPE_CREATURE]; - break; - case Type::OBJECT: - $genLimit = [SAI_SRC_TYPE_OBJECT, SAI_SRC_TYPE_ACTIONLIST]; - $talLimit = [SAI_SRC_TYPE_OBJECT]; - break; - case Type::AREATRIGGER: - $genLimit = [SAI_SRC_TYPE_AREATRIGGER, SAI_SRC_TYPE_ACTIONLIST]; - $talLimit = [SAI_SRC_TYPE_AREATRIGGER]; - break; - } - - foreach ($lookup as $action => $params) - { - $aq = '(`action_type` = '.(int)$action.' AND ('; - $pq = []; - foreach ($params as $idx => $p) - $pq[] = '`action_param'.(int)$idx.'` = '.(int)$p; - - if ($pq) - $qParts[] = $aq.implode(' OR ', $pq).'))'; - } - - $smartS = DB::World()->select(sprintf('SELECT `source_type` AS "0", `entryOrGUID` AS "1" FROM smart_scripts WHERE (%s){ AND `source_type` IN (?a)}', $qParts ? implode(' OR ', $qParts) : '0'), $genLimit ?: DBSIMPLE_SKIP); - - // filter for TAL shenanigans - if ($smartTAL = array_filter($smartS, function ($x) {return $x[0] == SAI_SRC_TYPE_ACTIONLIST;})) - { - $smartS = array_diff_key($smartS, $smartTAL); - - $q = []; - foreach ($smartTAL as [, $eog]) - { - // SAI_ACTION_CALL_TIMED_ACTIONLIST - $q[] = '`action_type` = '.SAI_ACTION_CALL_TIMED_ACTIONLIST.' AND `action_param1` = '.$eog; - - // SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST - $q[] = '`action_type` = '.SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST.' AND (`action_param1` = '.$eog.' OR `action_param2` = '.$eog.' OR `action_param3` = '.$eog.' OR `action_param4` = '.$eog.' OR `action_param5` = '.$eog.')'; - - // SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST - $q[] = '`action_type` = '.SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST.' AND `action_param1` <= '.$eog.' AND `action_param2` >= '.$eog; - } - - if ($_ = DB::World()->select(sprintf('SELECT `source_type` AS "0", `entryOrGUID` AS "1" FROM smart_scripts WHERE ((%s)){ AND `source_type` IN (?a)}', $q ? implode(') OR (', $q) : '0'), $talLimit ?: DBSIMPLE_SKIP)) - $smartS = array_merge($smartS, $_); - } - - // filter guids for entries - if ($smartG = array_filter($smartS, function ($x) {return $x[1] < 0;})) - { - $smartS = array_diff_key($smartS, $smartG); - - $q = []; - foreach ($smartG as [$st, $eog]) - { - if ($st == SAI_SRC_TYPE_CREATURE) - $q[] = '`type` = '.Type::NPC.' AND `guid` = '.-$eog; - else if ($st == SAI_SRC_TYPE_OBJECT) - $q[] = '`type` = '.Type::OBJECT.' AND `guid` = '.-$eog; - } - - if ($q) - { - $owner = DB::Aowow()->select(sprintf('SELECT `type`, `typeId` FROM ?_spawns WHERE (%s)', implode(') OR (', $q))); - foreach ($owner as $o) - $result[$o['type']][] = $o['typeId']; - } - } - - foreach ($smartS as [$st, $eog]) - { - if ($st == SAI_SRC_TYPE_CREATURE) - $result[Type::NPC][] = $eog; - else if ($st == SAI_SRC_TYPE_OBJECT) - $result[Type::OBJECT][] = $eog; - else if ($st == SAI_SRC_TYPE_AREATRIGGER) - $result[Type::AREATRIGGER][] = $eog; - } - - return $result; - } - - - /********************/ - /* Lookups by owner */ - /********************/ - - public static function getNPCSummonsForOwner(int $entry, int $srcType = SAI_SRC_TYPE_CREATURE) : array - { - // action => paramIdx with npcIds/spawnGoupIds - $lookup = array( - SAI_ACTION_SUMMON_CREATURE => [1], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => [1], - SAI_ACTION_SPAWN_SPAWNGROUP => [1] - ); - - $result = self::getOwnerAction($srcType, $entry, $lookup); - - // can skip lookups for SAI_ACTION_SUMMON_CREATURE_GROUP as creature_summon_groups already contains summoner info - if ($srcType == SAI_SRC_TYPE_CREATURE || $srcType == SAI_SRC_TYPE_OBJECT) - { - $st = $srcType == SAI_SRC_TYPE_CREATURE ? 0 : 1;// 0:SUMMONER_TYPE_CREATURE; 1:SUMMONER_TYPE_GAMEOBJECT - if ($csg = DB::World()->selectCol('SELECT `entry` FROM creature_summon_groups WHERE `summonerType` = ?d AND `summonerId` = ?d', $st, $entry)) - $result = array_merge($result, $csg); - } - - if (!empty($moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP])) - { - $grp = $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP]; - if ($sgs = DB::World()->selectCol('SELECT `spawnId` FROM spawn_group WHERE `spawnType` = ?d AND `groupId` IN (?a)', 0 /*0:SUMMONER_TYPE_CREATURE*/, $grp)) - if ($ids = DB::Aowow()->selectCol('SELECT DISTINCT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` IN (?a)', Type::NPC, $sgs)) - $result = array_merge($result, $ids); - } - - return $result; - } - - public static function getObjectSummonsForOwner(int $entry, int $srcType = SAI_SRC_TYPE_CREATURE) : array - { - // action => paramIdx with gobIds/spawnGoupIds - $lookup = array( - SAI_ACTION_SUMMON_GO => [1], - SAI_ACTION_SPAWN_SPAWNGROUP => [1] - ); - - $result = self::getOwnerAction($srcType, $entry, $lookup, $moreInfo); - - if (!empty($moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP])) - { - $grp = $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP]; - if ($sgs = DB::World()->selectCol('SELECT `spawnId` FROM spawn_group WHERE `spawnType` = ?d AND `groupId` IN (?a)', 1 /*1:SUMMONER_TYPE_GAMEOBJECT*/, $grp)) - if ($ids = DB::Aowow()->selectCol('SELECT DISTINCT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` IN (?a)', Type::OBJECT, $sgs)) - $result = array_merge($result, $ids); - } - - return $result; - } - - public static function getSpellCastsForOwner(int $entry, int $srcType = SAI_SRC_TYPE_CREATURE) : array - { - // action => paramIdx with spellIds - $lookup = array( - SAI_SRC_TYPE_CREATURE => [1], - SAI_ACTION_CAST => [1], - SAI_ACTION_ADD_AURA => [1], - SAI_ACTION_INVOKER_CAST => [1], - SAI_ACTION_CROSS_CAST => [1] - ); - - return self::getOwnerAction($srcType, $entry, $lookup); - } - - public static function getSoundsPlayedForOwner(int $entry, int $srcType = SAI_SRC_TYPE_CREATURE) : array - { - // action => paramIdx with soundIds - $lookup = [SAI_ACTION_SOUND => [1]]; - - return self::getOwnerAction($srcType, $entry, $lookup); - } - - private static function getOwnerAction(int $sourceType, int $entry, array $lookup, ?array &$moreInfo = []) : array - { - if ($entry < 0) // please not individual entities :( - return []; - - $smartScripts = 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 = ?d', $sourceType, array_merge(array_keys($lookup), SAI_ACTION_ALL_TIMED_ACTION_LISTS), $entry); - $smartResults = []; - $smartTALs = []; - foreach ($smartScripts as $s) - { - if ($s['action_type'] == SAI_ACTION_SPAWN_SPAWNGROUP) - $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP][] = $s['action_param1']; - else if (in_array($s['action_type'], array_keys($lookup))) - { - foreach ($lookup[$s['action_type']] as $p) - $smartResults[] = $s['action_param'.$p]; - } - else if ($s['action_type'] == SAI_ACTION_CALL_TIMED_ACTIONLIST) - $smartTALs[] = $s['action_param1']; - else if ($s['action_type'] == SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST) - { - for ($i = 1; $i < 7; $i++) - if ($s['action_param'.$i]) - $smartTALs[] = $s['action_param'.$i]; - } - else if ($s['action_type'] == SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST) - { - for ($i = $s['action_param1']; $i <= $s['action_param2']; $i++) - $smartTALs[] = $i; - } - } - - if ($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) - { - foreach ($lookup[$e['action_type']] as $i) - { - if ($e['action_type'] == SAI_ACTION_SPAWN_SPAWNGROUP) - $moreInfo[SAI_ACTION_SPAWN_SPAWNGROUP][] = $e['action_param'.$i]; - else - $smartResults[] = $e['action_param'.$i]; - } - } - } - } - - return $smartResults; - } - - - /******************************/ - /* Structured Lisview Display */ - /******************************/ - - public function __construct(int $srcType, int $entry, array $miscData = []) - { - $this->srcType = $srcType; - $this->entry = $entry; - $this->miscData = $miscData; - - $raw = DB::World()->select('SELECT id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, event_param5, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_param4, target_x, target_y, target_z, target_o FROM smart_scripts WHERE entryorguid = ?d AND source_type = ?d ORDER BY id ASC', $this->entry, $this->srcType); - foreach ($raw as $r) - { - $this->rawData[$r['id']] = array( - 'id' => $r['id'], - 'link' => $r['link'], - 'event' => array( - 'type' => $r['event_type'], - 'phases' => Util::mask2bits($r['event_phase_mask'], 1) ?: [0], - 'chance' => $r['event_chance'], - 'flags' => $r['event_flags'], - 'param' => [$r['event_param1'], $r['event_param2'], $r['event_param3'], $r['event_param4'], $r['event_param5']] - ), - 'action' => array( - 'type' => $r['action_type'], - 'param' => [$r['action_param1'], $r['action_param2'], $r['action_param3'], $r['action_param4'], $r['action_param5'], $r['action_param6']] - ), - 'target' => array( - 'type' => $r['target_type'], - 'param' => [$r['target_param1'], $r['target_param2'], $r['target_param3'], $r['target_param4']], - 'pos' => [$r['target_x'], $r['target_y'], $r['target_z'], $r['target_o']] - ) - ); - } - } - - public function prepare() : bool - { - if (!$this->rawData) - return false; - - if ($this->result) - return true; - - $hidePhase = - $hideChance = true; - - foreach ($this->iterate() as $_) - { - $this->rowKey = Util::createHash(8); - - if ($ts = $this->getTalkSource()) - $this->getQuotes($ts); - - [$evtBody, $evtFooter] = $this->event(); - [$actBody, $actFooter] = $this->action(); - - if ($ef = $this->eventFlags()) - { - if ($evtFooter) - $evtFooter = $ef.', '.$evtFooter; - else - $evtFooter = $ef; - } - - if ($this->itr['event']['phases'] != [0]) - $hidePhase = false; - - if ($this->itr['event']['chance'] != 100) - $hideChance = false; - - $this->result[] = array( - $this->itr['id'], - implode(', ', $this->itr['event']['phases']), - $evtBody.($evtFooter ? '[div float=right margin=0px][i][small class=q0]'.$evtFooter.'[/small][/i][/div]' : null), - $this->itr['event']['chance'].'%', - $actBody.($actFooter ? '[div float=right margin=0px clear=both][i][small class=q0]'.$actFooter.'[/small][/i][/div]' : null) - ); - } - - $th = array( - '#' => 16, - 'Phase' => 32, - 'Event' => 350, - 'Chance' => 24, - 'Action' => 0 - ); - - if ($hidePhase) - { - unset($th['Phase']); - foreach ($this->result as &$r) - unset($r[1]); - } - unset($r); - - if ($hideChance) - { - unset($th['Chance']); - foreach ($this->result as &$r) - unset($r[3]); - } - unset($r); - - $tbl = '[tr]'; - foreach ($th as $n => $w) - $tbl .= '[td header '.($w ? 'width='.$w.'px' : null).']'.$n.'[/td]'; - $tbl .= '[/tr]'; - - foreach ($this->result as $r) - $tbl .= '[tr][td]'.implode('[/td][td]', $r).'[/td][/tr]'; - - if ($this->srcType == SAI_SRC_TYPE_ACTIONLIST) - $this->tabs[$this->entry] = $tbl; - else - $this->tabs[0] = $tbl; - - return true; - } - - public function getMarkdown() : string - { - # id | event (footer phase) | chance | action + target - - if (!$this->rawData) - return ''; - - $return = '[style]#text-generic .grid { clear:left; } #text-generic .tabbed-contents { padding:0px; clear:left; }[/style][pad][h3][toggler id=sai]SmartAI'.(!empty($this->miscData['title']) ? $this->miscData['title'] : null).'[/toggler][/h3][div id=sai clear=left]%s[/div]'; - if (count($this->tabs) > 1) - { - $wrapper = '[tabs name=sai width=942px]%s[/tabs]'; - $tabs = ''; - foreach ($this->tabs as $guid => $data) - { - $buff = '[tab name=\"'.($guid ? 'ActionList #'.$guid : 'Main').'\"][table class=grid width=940px]'.$data.'[/table][/tab]'; - if ($guid) - $tabs .= $buff; - else - $tabs = $buff . $tabs; - } - - return sprintf($return, sprintf($wrapper, $tabs)); - } - else - return sprintf($return, '[table class=grid width=940px]'.$this->tabs[0].'[/table]'); - } - - public function getJSGlobals() : array - { - return $this->jsGlobals; - } - - public function getTabs() : array - { - return $this->tabs; - } - - - private function &iterate() : iterable - { - reset($this->rawData); - - foreach ($this->rawData as $k => $__) - { - $this->itr = &$this->rawData[$k]; - - yield $this->itr; - } - } - - private function numRange(string $f, int $n, bool $isTime = false) : string - { - if (!isset($this->itr[$f]['param'][$n]) || !isset($this->itr[$f]['param'][$n + 1])) - return 0; - - if (empty($this->itr[$f]['param'][$n]) && empty($this->itr[$f]['param'][$n + 1])) - return 0; - - $str = $isTime ? Util::formatTime($this->itr[$f]['param'][$n], true) : $this->itr[$f]['param'][$n]; - if ($this->itr[$f]['param'][$n + 1] > $this->itr[$f]['param'][$n]) - $str .= ' – '.($isTime ? Util::formatTime($this->itr[$f]['param'][$n + 1], true) : $this->itr[$f]['param'][$n + 1]); - - return $str; - } - - private function getQuotes(int $creatureId) : void - { - if (isset($this->quotes[$creatureId])) - return; - - [$quotes, , ] = Game::getQuotesForCreature($creatureId); - - $this->quotes[$creatureId] = $quotes; - - if (!empty($this->quotes[$creatureId])) - $this->quotes[$creatureId]['src'] = CreatureList::getName($creatureId); - } - - private function getTalkSource(bool &$emptySource = false) : int - { - if ($this->itr['action']['type'] != SAI_ACTION_TALK && - $this->itr['action']['type'] != SAI_ACTION_SIMPLE_TALK) - return 0; - - switch ($this->itr['target']['type']) - { - case SAI_TARGET_CREATURE_GUID: - if ($id = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $this->itr['target']['param'][0])) - return $id; - - break; - case SAI_TARGET_CREATURE_RANGE: - case SAI_TARGET_CREATURE_DISTANCE: - case SAI_TARGET_CLOSEST_CREATURE: - return $this->itr['target']['param'][0]; - case SAI_TARGET_CLOSEST_PLAYER: - $emptySource = true; - case SAI_TARGET_SELF: - case SAI_TARGET_ACTION_INVOKER: - case SAI_TARGET_CLOSEST_FRIENDLY: // unsure about this - default: - return empty($this->miscData['baseEntry']) ? $this->entry : $this->miscData['baseEntry']; - } - - return 0; - } - - private function eventFlags() : string - { - $ef = []; - for ($i = 1; $i <= SAI_EVENT_FLAG_WHILE_CHARMED; $i <<= 1) - if ($this->itr['event']['flags'] & $i) - if ($x = Lang::smartAI('eventFlags', $i)) - $ef[] = $x; - - return Lang::concat($ef); - } - - private function castFlags(string $f, int $n) : string - { - $cf = []; - for ($i = 1; $i <= SAI_CAST_FLAG_COMBAT_MOVE; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::smartAI('castFlags', $i)) - $cf[] = $x; - - return Lang::concat($cf); - } - - private function npcFlags(string $f, int $n) : string - { - $nf = []; - for ($i = 1; $i <= NPC_FLAG_MAILBOX; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::npc('npcFlags', $i)) - $nf[] = $x; - - return Lang::concat($nf ?: [Lang::smartAI('empty')]); - } - - private function unitFlags(string $f, int $n) : string - { - $uf = []; - for ($i = 1; $i <= UNIT_FLAG_UNK_31; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::unit('flags', $i)) - $uf[] = $x; - - return Lang::concat($uf ?: [Lang::smartAI('empty')]); - } - - private function unitFlags2(string $f, int $n) : string - { - $uf = []; - for ($i = 1; $i <= UNIT_FLAG2_ALLOW_CHEAT_SPELLS; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::unit('flags2', $i)) - $uf[] = $x; - - return Lang::concat($uf ?: [Lang::smartAI('empty')]); - } - - private function unitFieldBytes1(int $idx, int $val) : string - { - if ($idx === 0) - { - if ($standState = Lang::unit('bytes1', $idx, $val)) - return $standState; - else - return Lang::unit('bytes1', 'valueUNK', [$val, $idx]); - } - else if ($idx === 2 || $idx == 3) - { - $buff = []; - for ($i = 1; $i <= 0x10; $i <<= 1) - if ($val & $i) - if ($x = Lang::unit('bytes1', $idx, $val)) - $buff[] = $x; - - return $buff ? Lang::concat($buff) : Lang::unit('bytes1', 'valueUNK', [$val, $idx]); - } - else - return Lang::unit('bytes1', 'idxUNK', [$idx]); - } - - private function summonType(int $summonType) : string - { - if ($summonType = Lang::smartAI('summonTypes', $summonType)) - return $summonType; - else - return Lang::smartAI('summonType', 'summonTypeUNK', [$summonType]); - } - - private function dynFlags(string $f, int $n) : string - { - $df = []; - for ($i = 1; $i <= UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::unit('dynFlags', $i)) - $df[] = $x; - - return Lang::concat($df ?: [Lang::smartAI('empty')]); - } - - private function goFlags(string $f, int $n) : string - { - $gf = []; - for ($i = 1; $i <= GO_FLAG_DESTROYED; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::gameObject('goFlags', $i)) - $gf[] = $x; - - return Lang::concat($gf ?: [Lang::smartAI('empty')]); - } - - private function spawnFlags(string $f, int $n) : string - { - $sf = []; - for ($i = 1; $i <= SAI_SPAWN_FLAG_NOSAVE_RESPAWN; $i <<= 1) - if ($this->itr[$f]['param'][$n] & $i) - if ($x = Lang::smartAI('spawnFlags', $i)) - $sf[] = $x; - - return Lang::concat($sf ?: [Lang::smartAI('empty')]); - } - - private function aiTemplate(int $aiNum) : string - { - if ($standState = Lang::smartAI('aiTpl', $aiNum)) - return $standState; - else - return Lang::smartAI('aiTplUNK', [$aiNum]); - } - - private function reactState(int $stateNum) : string - { - if ($reactState = Lang::smartAI('reactStates', $stateNum)) - return $reactState; - else - return Lang::smartAI('reactStateUNK', [$stateNum]); - } - - private function target(array $override = []) : string - { - $target = ''; - - $t = $override ?: $this->itr['target']; - - $getDist = function ($min, $max) { return ($min && $max) ? min($min, $max).' – '.max($min, $max) : max($min, $max); }; - $tooltip = '[tooltip name=t-'.$this->rowKey.']'.Lang::smartAI('targetTT', array_merge([$t['type']], $t['param'], $t['pos'])).'[/tooltip][span class=tip tooltip=t-'.$this->rowKey.']%s[/span]'; - - // additional parameters - $t['param'] = array_pad($t['param'], 15, ''); - - switch ($t['type']) - { - // direct param use - case SAI_TARGET_SELF: // 1 - case SAI_TARGET_VICTIM: // 2 - case SAI_TARGET_HOSTILE_SECOND_AGGRO: // 3 - case SAI_TARGET_HOSTILE_LAST_AGGRO: // 4 - case SAI_TARGET_HOSTILE_RANDOM: // 5 - case SAI_TARGET_HOSTILE_RANDOM_NOT_TOP: // 6 - case SAI_TARGET_ACTION_INVOKER: // 7 - case SAI_TARGET_POSITION: // 8 - case SAI_TARGET_STORED: // 12 - case SAI_TARGET_INVOKER_PARTY: // 16 - case SAI_TARGET_CLOSEST_PLAYER: // 21 - case SAI_TARGET_ACTION_INVOKER_VEHICLE: // 22 - case SAI_TARGET_OWNER_OR_SUMMONER: // 23 - case SAI_TARGET_THREAT_LIST: // 24 - case SAI_TARGET_CLOSEST_ENEMY: // 25 - case SAI_TARGET_CLOSEST_FRIENDLY: // 26 - case SAI_TARGET_LOOT_RECIPIENTS: // 27 - case SAI_TARGET_FARTHEST: // 28 - break; - case SAI_TARGET_VEHICLE_PASSENGER: // 29 - if ($t['param'][0]) - $t['param'][10] = Lang::concat(Util::mask2bits($t['param'][0])); - break; - // distance - case SAI_TARGET_PLAYER_RANGE: // 17 - $t['param'][10] = $getDist($t['param'][0], $t['param'][1]); - break; - case SAI_TARGET_PLAYER_DISTANCE: // 18 - $t['param'][10] = $getDist(0, $t['param'][0]); - break; - // creature link - case SAI_TARGET_CREATURE_RANGE: // 9 - if ($t['param'][0]) - $this->jsGlobals[Type::NPC][] = $t['param'][0]; - - $t['param'][10] = $getDist($t['param'][1], $t['param'][2]); - break; - case SAI_TARGET_CREATURE_GUID: // 10 - if ($t['param'][10] = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $t['param'][0])) - $this->jsGlobals[Type::NPC][] = $t['param'][10]; - else - trigger_error('SmartAI::resloveTarget - creature with guid '.$t['param'][0].' not in DB'); - break; - case SAI_TARGET_CREATURE_DISTANCE: // 11 - case SAI_TARGET_CLOSEST_CREATURE: // 19 - $t['param'][10] = $getDist(0, $t['param'][1]); - - if ($t['param'][0]) - $this->jsGlobals[Type::NPC][] = $t['param'][0]; - break; - // gameobject link - case SAI_TARGET_GAMEOBJECT_GUID: // 14 - if ($t['param'][10] = DB::World()->selectCell('SELECT id FROM gameobject WHERE guid = ?d', $t['param'][0])) - $this->jsGlobals[Type::OBJECT][] = $t['param'][10]; - else - trigger_error('SmartAI::resloveTarget - gameobject with guid '.$t['param'][0].' not in DB'); - break; - case SAI_TARGET_GAMEOBJECT_RANGE: // 13 - $t['param'][10] = $getDist($t['param'][1], $t['param'][2]); - - if ($t['param'][0]) - $this->jsGlobals[Type::OBJECT][] = $t['param'][0]; - break; - case SAI_TARGET_GAMEOBJECT_DISTANCE: // 15 - case SAI_TARGET_CLOSEST_GAMEOBJECT: // 20 - case SAI_TARGET_CLOSEST_UNSPAWNED_GO: // 30 - $t['param'][10] = $getDist(0, $t['param'][1]); - - if ($t['param'][0]) - $this->jsGlobals[Type::OBJECT][] = $t['param'][0]; - break; - // error - default: - $target = Lang::smartAI('targetUNK', [$t['type']]); - } - - $target = $target ?: Lang::smartAI('targets', $t['type'], $t['param']); - - // resolve conditionals - $target = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $target); - - // wrap in tooltip (suspend action-tooltip) - return '[/span]'.sprintf($tooltip, $target).'[span tooltip=a-'.$this->rowKey.']'; - } - - private function event() : array - { - $body = - $footer = ''; - - $e = &$this->itr['event']; - - $tooltip = '[tooltip name=e-'.$this->rowKey.']'.Lang::smartAI('eventTT', array_merge([$e['type'], $e['phases'], $e['chance'], $e['flags']], $e['param'])).'[/tooltip][span tooltip=e-'.$this->rowKey.']%s[/span]'; - - // additional parameters - $e['param'] = array_pad($e['param'], 15, ''); - - switch ($e['type']) - { - // simple - case SAI_EVENT_AGGRO: // 4 - On Creature Aggro - case SAI_EVENT_DEATH: // 6 - On Creature Death - case SAI_EVENT_EVADE: // 7 - On Creature Evade Attack - case SAI_EVENT_RESPAWN: // 11 - On Creature/Gameobject Respawn - case SAI_EVENT_REACHED_HOME: // 21 - On Creature Reached Home - case SAI_EVENT_RESET: // 25 - After Combat, On Respawn or Spawn - case SAI_EVENT_CHARMED: // 29 - On Creature Charmed - case SAI_EVENT_CHARMED_TARGET: // 30 - On Target Charmed - case SAI_EVENT_MOVEMENTINFORM: // 34 - WAYPOINT_MOTION_TYPE = 2, POINT_MOTION_TYPE = 8 - case SAI_EVENT_CORPSE_REMOVED: // 36 - On Creature Corpse Removed - case SAI_EVENT_AI_INIT: // 37 - - case SAI_EVENT_WAYPOINT_START: // 39 - On Creature Waypoint ID Started - case SAI_EVENT_WAYPOINT_REACHED: // 40 - On Creature Waypoint ID Reached - case SAI_EVENT_AREATRIGGER_ONTRIGGER: // 46 - - case SAI_EVENT_JUST_SUMMONED: // 54 - On Creature Just spawned - case SAI_EVENT_WAYPOINT_PAUSED: // 55 - On Creature Paused at Waypoint ID - case SAI_EVENT_WAYPOINT_RESUMED: // 56 - On Creature Resumed after Waypoint ID - case SAI_EVENT_WAYPOINT_STOPPED: // 57 - On Creature Stopped On Waypoint ID - case SAI_EVENT_WAYPOINT_ENDED: // 58 - On Creature Waypoint Path Ended - case SAI_EVENT_TIMED_EVENT_TRIGGERED: // 59 - - case SAI_EVENT_JUST_CREATED: // 63 - - case SAI_EVENT_FOLLOW_COMPLETED: // 65 - - case SAI_EVENT_GO_STATE_CHANGED: // 70 - - case SAI_EVENT_GO_EVENT_INFORM: // 71 - - case SAI_EVENT_ACTION_DONE: // 72 - - case SAI_EVENT_ON_SPELLCLICK: // 73 - - case SAI_EVENT_COUNTER_SET: // 77 - If the value of specified counterID is equal to a specified value - break; - // num range [+ time footer] - case SAI_EVENT_HEALTH_PCT: // 2 - Health Percentage - case SAI_EVENT_MANA_PCT: // 3 - Mana Percentage - case SAI_EVENT_RANGE: // 9 - On Target In Range - case SAI_EVENT_TARGET_HEALTH_PCT: // 12 - On Target Health Percentage - case SAI_EVENT_TARGET_MANA_PCT: // 18 - On Target Mana Percentage - case SAI_EVENT_DAMAGED: // 32 - On Creature Damaged - case SAI_EVENT_DAMAGED_TARGET: // 33 - On Target Damaged - case SAI_EVENT_RECEIVE_HEAL: // 53 - On Creature Received Healing - case SAI_EVENT_FRIENDLY_HEALTH_PCT: // 74 - - $e['param'][10] = $this->numRange('event', 0); - // do not break; - case SAI_EVENT_OOC_LOS: // 10 - On Target In Distance Out of Combat - case SAI_EVENT_FRIENDLY_HEALTH: // 14 - On Friendly Health Deficit - case SAI_EVENT_FRIENDLY_MISSING_BUFF: // 16 - On Friendly Lost Buff - case SAI_EVENT_IC_LOS: // 26 - On Target In Distance In Combat - case SAI_EVENT_DATA_SET: // 38 - On Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA - if ($time = $this->numRange('event', 2, true)) - $footer = $time; - break; - // SAI updates - case SAI_EVENT_UPDATE_IC: // 0 - In combat. - case SAI_EVENT_UPDATE_OOC: // 1 - Out of combat. - if ($this->srcType == SAI_SRC_TYPE_ACTIONLIST) - $e['param'][11] = 1; - // do not break; - case SAI_EVENT_UPDATE: // 60 - - $e['param'][10] = $this->numRange('event', 0, true); - if ($time = $this->numRange('event', 2, true)) - $footer = $time; - break; - case SAI_EVENT_GOSSIP_HELLO: // 64 - On Right-Click Creature/Gameobject that have gossip enabled. - if ($this->srcType == SAI_SRC_TYPE_OBJECT) - $footer = array( - $e['param'][0] == 1, - $e['param'][0] == 2, - ); - break; - case SAI_EVENT_KILL: // 5 - On Creature Kill - if ($time = $this->numRange('event', 0, true)) - $footer = $time; - - if ($e['param'][3] && !$e['param'][2]) - $this->jsGlobals[Type::NPC][] = $e['param'][3]; - break; - case SAI_EVENT_SPELLHIT: // 8 - On Creature/Gameobject Spell Hit - case SAI_EVENT_HAS_AURA: // 23 - On Creature Has Aura - case SAI_EVENT_TARGET_BUFFED: // 24 - On Target Buffed With Spell - case SAI_EVENT_SPELLHIT_TARGET: // 31 - On Target Spell Hit - if ($time = $this->numRange('event', 2, true)) - $footer = $time; - - if ($e['param'][1]) - $e['param'][10] = Lang::getMagicSchools($e['param'][1]); - - if ($e['param'][0]) - $this->jsGlobals[Type::SPELL][] = $e['param'][0]; - break; - case SAI_EVENT_VICTIM_CASTING: // 13 - On Target Casting Spell - if ($e['param'][2]) - $this->jsGlobals[Type::SPELL][$e['param'][2]]; - // do not break; - case SAI_EVENT_PASSENGER_BOARDED: // 27 - - case SAI_EVENT_PASSENGER_REMOVED: // 28 - - case SAI_EVENT_IS_BEHIND_TARGET: // 67 - On Creature is behind target. - if ($time = $this->numRange('event', 0, true)) - $footer = $time; - break; - case SAI_EVENT_SUMMONED_UNIT: // 17 - On Creature/Gameobject Summoned Unit - case SAI_EVENT_SUMMONED_UNIT_DIES: // 82 - On Summoned Unit Dies - if ($e['param'][0]) - $this->jsGlobals[Type::NPC][] = $e['param'][0]; - // do not break; - case SAI_EVENT_FRIENDLY_IS_CC: // 15 - - case SAI_EVENT_SUMMON_DESPAWNED: // 35 - On Summoned Unit Despawned - if ($time = $this->numRange('event', 1, true)) - $footer = $time; - break; - case SAI_EVENT_ACCEPTED_QUEST: // 19 - On Target Accepted Quest - case SAI_EVENT_REWARD_QUEST: // 20 - On Target Rewarded Quest - if ($e['param'][0]) - $this->jsGlobals[Type::QUEST][] = $e['param'][0]; - if ($time = $this->numRange('event', 1, true)) - $footer = $time; - break; - case SAI_EVENT_RECEIVE_EMOTE: // 22 - On Receive Player Emote. - $this->jsGlobals[Type::EMOTE][] = $e['param'][0]; - - if ($time = $this->numRange('event', 1, true)) - $footer = $time; - break; - case SAI_EVENT_TEXT_OVER: // 52 - On TEXT_OVER Event Triggered After SMART_ACTION_TALK - if ($e['param'][1]) - $this->jsGlobals[Type::NPC][] = $e['param'][1]; - break; - case SAI_EVENT_LINK: // 61 - Used to link together multiple events as a chain of events. - if ($links = DB::World()->selectCol('SELECT `id` FROM smart_scripts WHERE `link` = ?d AND `entryorguid` = ?d AND `source_type` = ?d', $this->itr['id'], $this->entry, $this->srcType)) - $e['param'][10] = LANG::concat($links, false, fn($x) => "#[b]".$x."[/b]"); - break; - case SAI_EVENT_GOSSIP_SELECT: // 62 - On gossip clicked (gossip_menu_option335). - $gmo = DB::World()->selectRow( - 'SELECT gmo.`OptionText` AS "text_loc0" {, gmol.`OptionText` AS text_loc?d } - FROM gossip_menu_option gmo - LEFT JOIN gossip_menu_option_locale gmol ON gmo.`MenuID` = gmol.`MenuID` AND gmo.`OptionID` = gmol.`OptionID` AND gmol.`Locale` = ?d - WHERE gmo.`MenuId` = ?d AND gmo.`OptionID` = ?d', - Lang::getLocale() != Locale::EN ? Lang::getLocale()->json() : DBSIMPLE_SKIP, - Lang::getLocale()->value, - $e['param'][0], $e['param'][1] - ); - - if ($gmo) - $e['param'][10] = Util::localizedString($gmo, 'text'); - else - trigger_error('SmartAI::event - could not find gossip menu option for event #'.$e['type']); - break; - case SAI_EVENT_GAME_EVENT_START: // 68 - On game_event started. - case SAI_EVENT_GAME_EVENT_END: // 69 - On game_event ended. - $this->jsGlobals[Type::WORLDEVENT][] = $e['param'][0]; - break; - case SAI_EVENT_DISTANCE_CREATURE: // 75 - On creature guid OR any instance of creature entry is within distance. - if ($e['param'][0]) - $e['param'][10] = DB::World()->selectCell('SELECT `id` FROM creature WHERE `guid` = ?d', $e['param'][0]); - // do not break; - case SAI_EVENT_DISTANCE_GAMEOBJECT: // 76 - On gameobject guid OR any instance of gameobject entry is within distance. - if ($e['param'][0] && !$e['param'][10]) - $e['param'][10] = DB::World()->selectCell('SELECT `id` FROM gameobject WHERE `guid` = ?d', $e['param'][0]); - else if ($e['param'][1]) - $e['param'][10] = $e['param'][1]; - else if (!$e['param'][10]) - trigger_error('SmartAI::event - entity for event #'.$e['type'].' not defined'); - - if ($e['param'][10]) - $this->jsGlobals[Type::NPC][] = $e['param'][10]; - - if ($e['param'][3]) - $footer = Util::formatTime($e['param'][3], true); - break; - case SAI_EVENT_EVENT_PHASE_CHANGE: // 66 - On event phase mask set - $e['param'][10] = Lang::concat(Util::mask2bits($e['param'][0]), false); - break; - default: - $body = '[span class=q10]Unhandled Event[/span] #'.$e['type']; - } - - $body = $body ?: Lang::smartAI('events', $e['type'], 0, $e['param']); - if ($footer) - $footer = Lang::smartAI('events', $e['type'], 1, (array)$footer); - - // resolve conditionals - $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $footer); - $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $body); - $body = str_replace('#target#', $this->target(), $body); - - // wrap body in tooltip - return [sprintf($tooltip, $body), $footer]; - } - - private function action() : array - { - $body = - $footer = ''; - - $a = &$this->itr['action']; - - $tooltip = '[tooltip name=a-'.$this->rowKey.']'.Lang::smartAI('actionTT', array_merge([$a['type']], $a['param'])).'[/tooltip][span tooltip=a-'.$this->rowKey.']%s[/span]'; - - // init additional parameters - $a['param'] = array_pad($a['param'], 15, ''); - - switch ($a['type']) - { - // simple - case SAI_ACTION_ACTIVATE_GOBJECT: // 9 -> any target - case SAI_ACTION_AUTO_ATTACK: // 20 -> any target - case SAI_ACTION_ALLOW_COMBAT_MOVEMENT: // 21 -> self - case SAI_ACTION_SET_EVENT_PHASE: // 22 -> any target - case SAI_ACTION_INC_EVENT_PHASE: // 23 -> any target - case SAI_ACTION_EVADE: // 24 -> any target - case SAI_ACTION_COMBAT_STOP: // 27 -> self - case SAI_ACTION_RANDOM_PHASE_RANGE: // 31 -> self - case SAI_ACTION_RESET_GOBJECT: // 32 -> any target - case SAI_ACTION_SET_INST_DATA: // 34 -> self, invoker, irrelevant - case SAI_ACTION_DIE: // 37 -> self - case SAI_ACTION_SET_IN_COMBAT_WITH_ZONE: // 38 -> self - case SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL: // 42 -> self - case SAI_ACTION_SET_DATA: // 45 -> any target - case SAI_ACTION_ATTACK_STOP: // 46 -> self - case SAI_ACTION_SET_VISIBILITY: // 47 -> any target - case SAI_ACTION_SET_ACTIVE: // 48 -> any target - case SAI_ACTION_ATTACK_START: // 49 -> any target - case SAI_ACTION_KILL_UNIT: // 51 -> any target - case SAI_ACTION_SET_RUN: // 59 -> self - case SAI_ACTION_SET_DISABLE_GRAVITY: // 60 -> self - case SAI_ACTION_SET_SWIM: // 61 -> self - case SAI_ACTION_SET_COUNTER: // 63 -> any target - case SAI_ACTION_STORE_TARGET_LIST: // 64 -> any target - case SAI_ACTION_WP_RESUME: // 65 -> self - case SAI_ACTION_PLAYMOVIE: // 68 -> invoker - case SAI_ACTION_CLOSE_GOSSIP: // 72 -> any target .. doesn't matter though - case SAI_ACTION_TRIGGER_TIMED_EVENT: // 73 -> self - case SAI_ACTION_REMOVE_TIMED_EVENT: // 74 -> self - case SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT: // 76 -> any?? - case SAI_ACTION_RESET_SCRIPT_BASE_OBJECT: // 77 -> self - case SAI_ACTION_CALL_SCRIPT_RESET: // 78 -> self - case SAI_ACTION_SET_RANGED_MOVEMENT: // 79 -> self - case SAI_ACTION_RANDOM_MOVE: // 89 -> any target - case SAI_ACTION_SEND_GO_CUSTOM_ANIM: // 93 -> self - case SAI_ACTION_SEND_GOSSIP_MENU: // 98 -> invoker - case SAI_ACTION_SEND_TARGET_TO_TARGET: // 100 -> any target - case SAI_ACTION_SET_HEALTH_REGEN: // 102 -> any target - case SAI_ACTION_SET_ROOT: // 103 -> any target - case SAI_ACTION_DISABLE_EVADE: // 117 -> self - case SAI_ACTION_SET_CAN_FLY: // 119 -> self - case SAI_ACTION_SET_SIGHT_DIST: // 121 -> any target - case SAI_ACTION_REMOVE_ALL_GAMEOBJECTS: // 126 -> any target - case SAI_ACTION_PLAY_CINEMATIC: // 135 -> player target - break; - case SAI_ACTION_PAUSE_MOVEMENT: // 127 -> any target [ye, not gonna resolve this nonsense] - $a['param'][6] = Util::formatTime($a['param'][1], true); - if ($a['param'][2]) - $footer = true; - break; - // simple type as param[0] - case SAI_ACTION_PLAY_EMOTE: // 5 -> any target - case SAI_ACTION_SET_EMOTE_STATE: // 17 -> any target - if ($a['param'][0]) - { - $a['param'][0] *= -1; // handle creature emote - $this->jsGlobals[Type::EMOTE][] = $a['param'][0]; - } - break; - case SAI_ACTION_FAIL_QUEST: // 6 -> any target - case SAI_ACTION_OFFER_QUEST: // 7 -> invoker - case SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS:// 15 -> any target - case SAI_ACTION_CALL_GROUPEVENTHAPPENS: // 26 -> invoker - if ($a['param'][0]) - $this->jsGlobals[Type::QUEST][] = $a['param'][0]; - break; - case SAI_ACTION_REMOVEAURASFROMSPELL: // 28 -> any target - if ($a['param'][2]) - $footer = true; - case SAI_ACTION_ADD_AURA: // 75 -> any target - if ($a['param'][0]) - $this->jsGlobals[Type::SPELL][] = $a['param'][0]; - break; - case SAI_ACTION_CALL_KILLEDMONSTER: // 33 -> any target - case SAI_ACTION_UPDATE_TEMPLATE: // 36 -> self - if ($a['param'][0]) - $this->jsGlobals[Type::NPC][] = $a['param'][0]; - break; - case SAI_ACTION_ADD_ITEM: // 56 -> invoker - case SAI_ACTION_REMOVE_ITEM: // 57 -> invoker - if ($a['param'][0]) - $this->jsGlobals[Type::ITEM][] = $a['param'][0]; - break; - case SAI_ACTION_GAME_EVENT_STOP: // 111 -> doesnt matter - case SAI_ACTION_GAME_EVENT_START: // 112 -> doesnt matter - if ($a['param'][0]) - $this->jsGlobals[Type::WORLDEVENT][] = $a['param'][0]; - break; - // simple preparse from param[0] to param[6] - case SAI_ACTION_SET_REACT_STATE: // 8 -> any target - $a['param'][6] = $this->reactState($a['param'][0]); - break; - case SAI_ACTION_SET_NPC_FLAG: // 81 -> any target - case SAI_ACTION_ADD_NPC_FLAG: // 82 -> any target - case SAI_ACTION_REMOVE_NPC_FLAG: // 83 -> any target - $a['param'][6] = $this->npcFlags('action', 0); - break; - case SAI_ACTION_SET_UNIT_FIELD_BYTES_1: // 90 -> any target - case SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1: // 91 -> any target - $a['param'][6] = $this->unitFieldBytes1($a['param'][1], $a['param'][0]); - break; - case SAI_ACTION_SET_DYNAMIC_FLAG: // 94 -> any target - case SAI_ACTION_ADD_DYNAMIC_FLAG: // 95 -> any target - case SAI_ACTION_REMOVE_DYNAMIC_FLAG: // 96 -> any target - $a['param'][6] = $this->dynFlags('action', 0); - break; - case SAI_ACTION_SET_GO_FLAG: // 104 -> any target - case SAI_ACTION_ADD_GO_FLAG: // 105 -> any target - case SAI_ACTION_REMOVE_GO_FLAG: // 106 -> any target - $a['param'][6] = $this->goFlags('action', 0); - break; - case SAI_ACTION_SET_POWER: // 108 -> any target - case SAI_ACTION_ADD_POWER: // 109 -> any target - case SAI_ACTION_REMOVE_POWER: // 110 -> any target - $a['param'][6] = Lang::spell('powerTypes', $a['param'][0]); - break; - // misc - case SAI_ACTION_TALK: // 1 -> any target - $noSrc = false; - if ($src = $this->getTalkSource($noSrc)) - { - if ($a['param'][6] = isset($this->quotes[$src][$a['param'][0]])) - { - $quotes = $this->quotes[$src][$a['param'][0]]; - foreach ($quotes as $quote) - { - $a['param'][7] .= sprintf($quote['text'], $noSrc ? '' : sprintf($quote['prefix'], $this->quotes[$src]['src']), $this->quotes[$src]['src']); - if ($a['param'][1]) - $footer = [Util::formatTime($a['param'][1], true)]; - } - - // todo (low): undestand what action_param2 does - } - } - else - trigger_error('SmartAI::action - could not determine talk source for action #'.$a['type']); - - break; - case SAI_ACTION_SET_FACTION: // 2 -> any target - if ($a['param'][0]) - { - $a['param'][6] = DB::Aowow()->selectCell('SELECT factionId FROM ?_factiontemplate WHERE id = ?d', $a['param'][0]); - $this->jsGlobals[Type::FACTION][] = $a['param'][6]; - } - break; - case SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL: // 3 -> self - if ($a['param'][0]) - $this->jsGlobals[Type::NPC][] = $a['param'][0]; - else if (!$a['param'][1]) - $a['param'][6] = 1; - - break; - case SAI_ACTION_SOUND: // 4 -> self [param3 set in DB but not used in core?] - $this->jsGlobals[Type::SOUND][] = $a['param'][0]; - if ($a['param'][2]) - $footer = true; - - break; - case SAI_ACTION_RANDOM_EMOTE: // 10 -> any target - $buff = []; - for ($i = 0; $i < 6; $i++) - { - if (empty($a['param'][$i])) - continue; - - $a['param'][$i] *= -1; // handle creature emote - $buff[] = '[emote='.$a['param'][$i].']'; - $this->jsGlobals[Type::EMOTE][] = $a['param'][$i]; - } - $a['param'][6] = Lang::concat($buff, false); - break; - case SAI_ACTION_CAST: // 11 -> any target - $this->jsGlobals[Type::SPELL][] = $a['param'][0]; - if ($_ = $this->castFlags('action', 1)) - $footer = $_; - - break; - case SAI_ACTION_SUMMON_CREATURE: // 12 -> any target - $this->jsGlobals[Type::NPC][] = $a['param'][0]; - if ($a['param'][2]) - $a['param'][6] = Util::formatTime($a['param'][2], true); - - $footer = $this->summonType($a['param'][1]); - break; - case SAI_ACTION_THREAT_SINGLE_PCT: // 13 -> victim - case SAI_ACTION_THREAT_ALL_PCT: // 14 -> self - case SAI_ACTION_ADD_THREAT: // 123 -> any target - $a['param'][6] = $a['param'][0] - $a['param'][1]; - break; - case SAI_ACTION_SET_UNIT_FLAG: // 18 -> any target - case SAI_ACTION_REMOVE_UNIT_FLAG: // 19 -> any target - $a['param'][6] = $a['param'][1] ? $this->unitFlags2('action', 0) : $this->unitFlags('action', 0); - break; - case SAI_ACTION_FLEE_FOR_ASSIST: // 25 -> none - case SAI_ACTION_CALL_FOR_HELP: // 39 -> self - if ($a['param'][0]) - $footer = true; - break; - case SAI_ACTION_FOLLOW: // 29 -> any target [what the heck are param 4 & 5] - $this->jsGlobals[Type::NPC][] = $a['param'][2]; - if ($a['param'][1]) - $a['param'][6] = Util::O2Deg($a['param'][1])[0]; - if ($a['param'][3] || $a['param'][4]) - $a['param'][7] = 1; - - if ($a['param'][6] || $a['param'][7]) - $footer = $a['param']; - - break; - case SAI_ACTION_RANDOM_PHASE: // 30 -> self - $buff = []; - for ($i = 0; $i < 7; $i++) - if ($_ = $a['param'][$i]) - $buff[] = $_; - - $a['param'][6] = Lang::concat($buff); - break; - case SAI_ACTION_SET_SHEATH: // 40 -> self - if ($sheath = Lang::smartAI('sheaths', $a['param'][0])) - $a['param'][6] = $sheath; - else - $a['param'][6] = lang::smartAI('sheathUNK', $a['param'][0]); - - break; - case SAI_ACTION_FORCE_DESPAWN: // 41 -> any target - $a['param'][6] = Util::formatTime($a['param'][0], true); - $a['param'][7] = Util::formatTime($a['param'][1] * 1000, true); - break; - case SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL: // 43 -> self - if ($a['param'][0]) - $this->jsGlobals[Type::NPC][] = $a['param'][0]; - else if (!$a['param'][1]) - $a['param'][6] = 1; - break; - case SAI_ACTION_SET_INGAME_PHASE_MASK: // 44 -> any target - $a['param'][6] = $a['param'][0] ? Lang::concat(Util::mask2bits($a['param'][0])) : 0; - break; - case SAI_ACTION_SUMMON_GO: // 50 -> self, world coords - $this->jsGlobals[Type::OBJECT][] = $a['param'][0]; - $a['param'][6] = Util::formatTime($a['param'][1] * 1000, true); - - if (!$a['param'][2]) - $footer = true; - - break; - case SAI_ACTION_ACTIVATE_TAXI: // 52 -> invoker - $nodes = DB::Aowow()->selectRow(' - SELECT tn1.name_loc0 AS start_loc0, tn1.name_loc?d AS start_loc?d, tn2.name_loc0 AS end_loc0, tn2.name_loc?d AS end_loc?d - FROM ?_taxipath tp - JOIN ?_taxinodes tn1 ON tp.startNodeId = tn1.id - JOIN ?_taxinodes tn2 ON tp.endNodeId = tn2.id - WHERE tp.id = ?d', - Lang::getLocale()->value, Lang::getLocale()->value, Lang::getLocale()->value, Lang::getLocale()->value, $a['param'][0] - ); - $a['param'][6] = Util::localizedString($nodes, 'start'); - $a['param'][7] = Util::localizedString($nodes, 'end'); - break; - case SAI_ACTION_WP_START: // 53 -> any .. why tho? - $a['param'][7] = $this->reactState($a['param'][5]); - if ($a['param'][3]) - $this->jsGlobals[Type::QUEST][] = $a['param'][3]; - if ($a['param'][4]) - $a['param'][6] = Util::formatTime($a['param'][4], true); - if ($a['param'][2]) - $footer = true; - - break; - case SAI_ACTION_WP_PAUSE: // 54 -> self - $a['param'][6] = Util::formatTime($a['param'][0], true); - break; - case SAI_ACTION_WP_STOP: // 55 -> self - if ($a['param'][0]) - $a['param'][6] = Util::formatTime($a['param'][0], true); - - if ($a['param'][1]) - { - $this->jsGlobals[Type::QUEST][] = $a['param'][1]; - $a['param'][$a['param'][2] ? 7 : 8] = 1; - } - - break; - case SAI_ACTION_INSTALL_AI_TEMPLATE: // 58 -> self - $a['param'][6] = $this->aiTemplate($a['param'][0]); - break; - case SAI_ACTION_TELEPORT: // 62 -> invoker [resolved coords already stored in areatrigger entry] - if (isset($this->miscData['teleportA'])) - $a['param'][6] = $this->miscData['teleportA']; - else if ($pos = Game::worldPosToZonePos($a['param'][0], $this->itr['target']['pos'][0], $this->itr['target']['pos'][1])) - $a['param'][6] = $pos['areaId']; - else if ($areaId = DB::Aowow()->selectCell('SELECT id FROM ?_zones WHERE mapId = ?d LIMIT 1', $a['param'][0])) - $a['param'][6] = $areaId; - else - trigger_error('SmartAI::action - could not resolve teleport target: map:'.$a['param'][0].' x:'.$this->itr['target']['pos'][0].' y:'.$this->itr['target']['pos'][1]); - - $this->jsGlobals[Type::ZONE][] = $a['param'][6]; - break; - case SAI_ACTION_SET_ORIENTATION: // 66 -> any target - if ($this->itr['target']['type'] == SAI_TARGET_POSITION) - $a['param'][6] = Util::O2Deg($this->itr['target']['pos'][3])[1]; - else if ($this->itr['target']['type'] != SAI_TARGET_SELF) - $a['param'][6] = '#target#'; - break; - case SAI_ACTION_CREATE_TIMED_EVENT: // 67 -> self - $a['param'][6] = $this->numRange('action', 1, true); - $a['param'][7] = ($a['param'][5] < 100); - if ($repeat = $this->numRange('action', 3, true)) - $footer = [$repeat]; - break; - case SAI_ACTION_MOVE_TO_POS: // 69 -> any target - if ($a['param'][2]) - $footer = true; - break; - case SAI_ACTION_ENABLE_TEMP_GOBJ: // 70 -> any target - case SAI_ACTION_SET_CORPSE_DELAY: // 116 -> ??? - case SAI_ACTION_FLEE: // 122 -> any target - $a['param'][6] = Util::formatTime($a['param'][0] * 1000, true); - break; - case SAI_ACTION_EQUIP: // 71 -> any - $buff = []; - if ($a['param'][0]) - { - $slots = [1, 2, 3]; - if ($a['param'][1]) - $slots = Util::mask2bits($a['param'][1], 1); - - $items = DB::World()->selectRow('SELECT ItemID1, ItemID2, ItemID3 FROM creature_equip_template WHERE CreatureID = ?d AND ID = ?d', $this->miscData['baseEntry'] ?: $this->entry, $a['param'][0]); - foreach ($items as $i) - $this->jsGlobals[Type::ITEM][] = $i; - - foreach ($slots as $s) - if ($_ = $items['ItemID'.$s]) - $buff[] = '[item='.$_.']'; - } - else if ($a['param'][2] || $a['param'][3] || $a['param'][4]) - { - if ($_ = $a['param'][2]) - { - $this->jsGlobals[Type::ITEM][] = $_; - $buff[] = '[item='.$_.']'; - } - if ($_ = $a['param'][3]) - { - $this->jsGlobals[Type::ITEM][] = $_; - $buff[] = '[item='.$_.']'; - } - if ($_ = $a['param'][4]) - { - $this->jsGlobals[Type::ITEM][] = $_; - $buff[] = '[item='.$_.']'; - } - } - else - $a['param'][7] = 1; - - $a['param'][6] = Lang::concat($buff); - - $footer = true; - - break; - case SAI_ACTION_CALL_TIMED_ACTIONLIST: // 80 -> any target - switch ($a['param'][1]) - { - case 0: - case 1: - case 2: - $a['param'][6] = Lang::smartAI('saiUpdate', $a['param'][1]); - break; - default: - $a['param'][6] = Lang::smartAI('saiUpdateUNK', [$a['param'][1]]); - } - - $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $a['param'][0], array_merge(['baseEntry' => $this->entry], $this->miscData)); - $tal->prepare(); - foreach ($tal->getJSGlobals() as $type => $data) - { - if (empty($this->jsGlobals[$type])) - $this->jsGlobals[$type] = []; - - $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); - } - - foreach ($tal->getTabs() as $guid => $tt) - $this->tabs[$guid] = $tt; - - break; - case SAI_ACTION_SIMPLE_TALK: // 84 -> any target - $noSrc = false; - if ($src = $this->getTalkSource($noSrc)) - { - if (isset($this->quotes[$src][$a['param'][0]])) - { - $quotes = $this->quotes[$src][$a['param'][0]]; - foreach ($quotes as $quote) - $a['param'][6] .= sprintf($quote['text'], $noSrc ? '' : sprintf($quote['prefix'], $this->quotes[$src]['src']), $this->quotes[$src]['src']); - } - } - else - trigger_error('SmartAI::action - could not determine talk source for action #'.$a['type']); - - break; - case SAI_ACTION_CROSS_CAST: // 86 -> entity by TargetingBlock(param3, param4, param5, param6) cross cast spell at any target - $a['param'][6] = $this->target(array( - 'type' => $a['param'][2], - 'param' => [$a['param'][3], $a['param'][4], $a['param'][5], 0], - 'pos' => [0, 0, 0, 0] - )); - // do not break; - case SAI_ACTION_SELF_CAST: // 85 -> self - case SAI_ACTION_INVOKER_CAST: // 134 -> any target - $this->jsGlobals[Type::SPELL][] = $a['param'][0]; - if ($_ = $this->castFlags('action', 1)) - $footer = $_; - break; - case SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST: // 87 -> self - $talBuff = []; - for ($i = 0; $i < 6; $i++) - { - if (!$a['param'][$i]) - continue; - - $talBuff[] = '#'.$a['param'][$i].''; - - $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $a['param'][$i], array_merge(['baseEntry' => $this->entry], $this->miscData)); - $tal->prepare(); - foreach ($tal->getJSGlobals() as $type => $data) - { - if (empty($this->jsGlobals[$type])) - $this->jsGlobals[$type] = []; - - $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); - } - - foreach ($tal->getTabs() as $guid => $tt) - $this->tabs[$guid] = $tt; - } - $a['param'][6] = Lang::concat($talBuff, false); - break; - case SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:// 88 -> self - $talBuff = []; - for ($i = $a['param'][0]; $i <= $a['param'][1]; $i++) - { - $talBuff[] = '#'.$i.''; - - $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $i, array_merge(['baseEntry' => $this->entry], $this->miscData)); - $tal->prepare(); - foreach ($tal->getJSGlobals() as $type => $data) - { - if (empty($this->jsGlobals[$type])) - $this->jsGlobals[$type] = []; - - $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); - } - - foreach ($tal->getTabs() as $guid => $tt) - $this->tabs[$guid] = $tt; - } - $a['param'][6] = Lang::concat($talBuff, false); - - break; - case SAI_ACTION_INTERRUPT_SPELL: // 92 -> self - if ($_ = $a['param'][1]) - $this->jsGlobals[Type::SPELL][] = $a['param'][1]; - - if ($a['param'][0] || $a['param'][2]) - $footer = [$a['param'][0]]; - - break; - case SAI_ACTION_SET_HOME_POS: // 101 -> self - if ($this->itr['target']['type'] == SAI_TARGET_SELF) - $a['param'][9] = 1; - // do not break; - case SAI_ACTION_JUMP_TO_POS: // 97 -> self - case SAI_ACTION_MOVE_OFFSET: // 114 -> self - $a['param'][6] = $this->itr['target']['pos'][0]; - $a['param'][7] = $this->itr['target']['pos'][1]; - $a['param'][8] = $this->itr['target']['pos'][2]; - break; - case SAI_ACTION_GO_SET_LOOT_STATE: // 99 -> any target - switch ($a['param'][0]) - { - case 0: - case 1: - case 2: - case 3: - $a['param'][6] = Lang::smartAI('lootStates', $a['param'][0]); - break; - default: - $a['param'][6] = Lang::smartAI('lootStateUNK', [$a['param'][0]]); - } - break; - - break; - case SAI_ACTION_SUMMON_CREATURE_GROUP: // 107 -> untargeted - if ($this->summons === null) - $this->summons = DB::World()->selectCol('SELECT groupId AS ARRAY_KEY, entry AS ARRAY_KEY2, COUNT(*) AS n FROM creature_summon_groups WHERE summonerId = ?d GROUP BY groupId, entry', empty($this->miscData['baseEntry']) ? $this->entry : $this->miscData['baseEntry']); - - $buff = []; - if (!empty($this->summons[$a['param'][0]])) - { - foreach ($this->summons[$a['param'][0]] as $id => $n) - { - $this->jsGlobals[Type::NPC][] = $id; - $buff[] = $n.'x [npc='.$id.']'; - } - } - - if ($buff) - $a['param'][6] = Lang::concat($buff); - - break; - case SAI_ACTION_START_CLOSEST_WAYPOINT: // 113 -> any target - $buff = []; - for ($i = 0; $i < 6; $i++) - if ($a['param'][$i]) - $buff[] = '#[b]'.$a['param'][$i].'[/b]'; - - $a['param'][6] = Lang::concat($buff, false); - break; - case SAI_ACTION_RANDOM_SOUND: // 115 -> self - for ($i = 0; $i < 4; $i++) - { - if ($x = $a['param'][$i]) - { - $this->jsGlobals[Type::SOUND][] = $x; - $a['param'][6] .= '[sound='.$x.']'; - } - } - - if ($a['param'][5]) - $footer = true; - - break; - case SAI_ACTION_GO_SET_GO_STATE: // 118 -> ??? - switch ($a['param'][0]) - { - case 0: - case 1: - case 2: - $a['param'][6] = Lang::smartAI('GOStates', $a['param'][0]); - break; - default: - $a['param'][6] = Lang::smartAI('GOStateUNK', [$a['param'][0]]); - } - break; - case SAI_ACTION_REMOVE_AURAS_BY_TYPE: // 120 -> any target - $a['param'][6] = Lang::spell('auras', $a['param'][0]); - break; - case SAI_ACTION_LOAD_EQUIPMENT: // 124 -> any target - $buff = []; - if ($a['param'][0]) - { - $items = DB::World()->selectRow('SELECT ItemID1, ItemID2, ItemID3 FROM creature_equip_template WHERE CreatureID = ?d AND ID = ?d', $this->miscData['baseEntry'] ?: $this->entry, $a['param'][0]); - foreach ($items as $i) - { - if (!$i) - continue; - - $this->jsGlobals[Type::ITEM][] = $i; - $buff[] = '[item='.$i.']'; - } - } - else if (!$a['param'][1]) - trigger_error('SmartAI::action - action #124 (SAI_ACTION_LOAD_EQIPMENT) is malformed'); - - $a['param'][6] = Lang::concat($buff); - $footer = true; - - break; - case SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT: // 125 -> self - $a['param'][6] = $this->numRange('action', 0); - break; - case SAI_ACTION_SPAWN_SPAWNGROUP: // 131 - case SAI_ACTION_DESPAWN_SPAWNGROUP: // 132 - $a['param'][6] = DB::World()->selectCell('SELECT `GroupName` FROM spawn_group_template WHERE `groupId` = ?d', $a['param'][0]); - $entities = DB::World()->select('SELECT `spawnType` AS "0", `spawnId` AS "1" FROM spawn_group WHERE `groupId` = ?d', $a['param'][0]); - - $n = 5; - foreach ($entities as [$spawnType, $guid]) - { - $type = Type::NPC; - if ($spawnType == 1) - $type == Type::OBJECT; - - $a['param'][7] = $this->spawnFlags('action', 3); - - if ($_ = DB::Aowow()->selectCell('SELECT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` = ?d', $type, $guid)) - { - $this->jsGlobals[$type][] = $_; - $a['param'][8] .= '[li]['.Type::getFileString($type).'='.$_.'][small class=q0] (GUID: '.$guid.')[/small][/li]'; - } - else - $a['param'][8] .= '[li]'.Lang::smartAI('entityUNK').'[small class=q0] (GUID: '.$guid.')[/small][/li]'; - - if (!--$n) - break; - } - - if (count($entities) > 5) - $a['param'][8] .= '[li]+'.(count($entities) - 5).'…[/li]'; - - $a['param'][8] = '[ul]'.$a['param'][8].'[/ul]'; - - if ($time = $this->numRange('action', 1, true)) - $footer = [$time]; - break; - case SAI_ACTION_RESPAWN_BY_SPAWNID: // 133 - $type = Type::NPC; - if ($a['param'][0] == 1) - $type == Type::OBJECT; - - if ($_ = DB::Aowow()->selectCell('SELECT `typeId` FROM ?_spawns WHERE `type` = ?d AND `guid` = ?d', $type, $a['param'][1])) - $a['param'][6] = '['.Type::getFileString($type).'='.$_.']'; - else - $a['param'][6] = Lang::smartAI('entityUNK'); - break; - case SAI_ACTION_SET_MOVEMENT_SPEED: // 136 - $a['param'][6] = $a['param'][1] + $a['param'][2] / pow(10, floor(log10($a['param'][2] ?: 1.0) + 1)); // i know string concatenation is a thing. don't @ me! - break; - case SAI_ACTION_OVERRIDE_LIGHT: // 138 - $this->jsGlobals[Type::ZONE][] = $a['param'][0]; - $footer = [Util::formatTime($a['param'][2], true)]; - break; - case SAI_ACTION_OVERRIDE_WEATHER: // 139 - $this->jsGlobals[Type::ZONE][] = $a['param'][0]; - if (!($a['param'][6] = Lang::smartAI('weatherStates', $a['param'][1]))) - $a['param'][6] = Lang::smartAI('weatherStateUNK', [$a['param'][1]]); - break; - default: - $body = Lang::smartAI('actionUNK', [$a['type']]); - } - - $body = $body ?: Lang::smartAI('actions', $a['type'], 0, $a['param']); - if (gettype($footer) != 'string') - $footer = Lang::smartAI('actions', $a['type'], 1, (array)$footer); - - // resolve conditionals - $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $footer); - $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $body); - $body = str_replace('#target#', $this->target(), $body); - - // wrap body in tooltip - return [sprintf($tooltip, $body), $footer]; - } -} - -?> diff --git a/includes/types/quest.class.php b/includes/types/quest.class.php index bf58cd08..3b839982 100644 --- a/includes/types/quest.class.php +++ b/includes/types/quest.class.php @@ -578,7 +578,7 @@ class QuestListFilter extends Filter protected function cbQuestRelation($cr, $flags) { - return match($cr[1]) + return match ($cr[1]) { Type::NPC, Type::OBJECT, diff --git a/localization/locale_dede.php b/localization/locale_dede.php index cebf446b..6be2a032 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -511,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Getappt durch ganze Aggro-Liste' ), 'bytes1' => array( -/*idx:0*/ ['Stehend', 'Am Boden sitzend', 'Auf Stuhl sitzend', 'Schlafend', 'Auf niedrigem Stuhl sitzend', 'Auf mittlerem Stuhl sitzend', 'Auf hohem Stuhl sitzend', 'Tot', 'Kniehend', 'Untergetaucht'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Stehend', + UNIT_STAND_STATE_SIT => 'Am Boden sitzend', + UNIT_STAND_STATE_SIT_CHAIR => 'Auf Stuhl sitzend', + UNIT_STAND_STATE_SLEEP => 'Schlafend', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Auf niedrigem Stuhl sitzend', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Auf mittlerem Stuhl sitzend', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Auf hohem Stuhl sitzend', + UNIT_STAND_STATE_DEAD => 'Tot', + UNIT_STAND_STATE_KNEEL => 'Kniehend', + UNIT_STAND_STATE_SUBMERGED => 'Untergetaucht' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Unangreifbar', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Unaufspürbar', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Immer stehend', - UNIT_BYTE1_FLAG_HOVER => 'Schwebend', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'Bodenanimationen', + UNIT_BYTE1_ANIM_TIER_SWIM => 'Schwimmanimationen', + UNIT_BYTE1_ANIM_TIER_HOVER => 'Schwebeanimationen', + UNIT_BYTE1_ANIM_TIER_FLY => 'Fluganimationen', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'abgetauchte Animationen' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unbenutzter Wert [b class=q1]%d[/b] übergeben an UnitFieldBytes1 auf Offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unbenutzter Offset [b class=q1]%d[/b] übergeben an UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unbenkanntes Event #[b class=q1]%d[/b] in Benutzung.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:Im Kampf, ;(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:Nicht im Kampf, ;(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], - SAI_EVENT_HEALTH_PCT => ['Ab %11$s%% Gesundheit', 'Wiederhole alle %s'], - SAI_EVENT_MANA_PCT => ['Ab %11$s%% Mana', 'Wiederhole alle %s'], - SAI_EVENT_AGGRO => ['Bei Aggro', null], - SAI_EVENT_KILL => ['Beim Töten von (%3$d)?einem Spieler:;(%4$d)?[npc=%4$d]:einer Kreatur;', 'Abklingzeit: %s'], - SAI_EVENT_DEATH => ['Im Tod', null], - SAI_EVENT_EVADE => ['Beim Entkommen', null], - SAI_EVENT_SPELLHIT => ['Von (%11$s)?%11$s-:;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], - SAI_EVENT_RANGE => ['Ziel innerhalb von %11$sm', 'Wiederhole alle %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['(%1$d)?Freundlicher:Feindlicher; (%5$d)?Spieler:NPC; kommt ausserhalb des Kampfes innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], - SAI_EVENT_RESPAWN => ['Beim Wiedereinstieg', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['Ziel hat %11$s%% Gesundheit', 'Wiederhole alle %s'], - SAI_EVENT_VICTIM_CASTING => ['Aktuelles Ziel wirkt (%3$d)?[spell=%3$d]:beliebigen Zauber;', 'Wiederhole alle %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Freundlicher NPC innerhalb von %2$dm hat %1$d Gesundheit', 'Wiederhole alle %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Freundlicher NPC innerhalb von %1$dm ist beeinflusst von \'Crowd Control\'', 'Wiederhole alle %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Freundlichem NPC innerhalb von %2$dm fehlt [spell=%1$d]', 'Wiederhole alle %s'], - SAI_EVENT_SUMMONED_UNIT => ['(%1$d)?[npc=%1$d]:Beliebige Kreatur; wurde gerade beschworen', 'Abklingzeit: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['Ziel hat %11$s%% Mana', 'Wiederhole alle %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Gebe (%1$d)?[quest=%1$d]:beliebiges Quest;', 'Abklingzeit: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Belohne (%1$d)?[quest=%1$d]:beliebiges Quest;', 'Abklingzeit: %s'], - SAI_EVENT_REACHED_HOME => ['Erreiche \'Heimat\'-Koordinaten', null], - SAI_EVENT_RECEIVE_EMOTE => ['Das Ziel von [emote=%1$d] seiend', 'Abklingzeit: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Habe %2$d Aufladungen von [spell=%1$d]:Aura von [spell=%1$d] fehlt; ', 'Wiederhole alle %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# hat (%2$d)?%2$d Aufladungen:Aura; von [spell=%1$d]', 'Wiederhole alle %s'], - SAI_EVENT_RESET => ['Beim Reset', null], - SAI_EVENT_IC_LOS => ['(%1$d)?Freundlicher:Feindlicher; (%5$d)?Spieler:NPC; kommt im Kampf innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['Ein Passagier steigt zu', 'Abklingzeit: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['Ein Passagier steigt ab', 'Abklingzeit: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?Bezaubert werden:Bezauberung läuft ab;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['Beim Bezaubern von #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['#target# wird von (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], - SAI_EVENT_DAMAGED => ['Nehme %11$s Punkte Schaden', 'Wiederhole alle %s'], - SAI_EVENT_DAMAGED_TARGET => ['#target# nahm %11$s Punkte Schaden', 'Wiederhole alle %s'], - SAI_EVENT_MOVEMENTINFORM => ['Beginne Bewegung zu Punkt #[b]%2$d[/b](%1$d)? mit MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Beschworener NPC [npc=%1$d] verschwindet', 'Abklingzeit: %s'], - SAI_EVENT_CORPSE_REMOVED => ['Leiche verschwindet', null], - SAI_EVENT_AI_INIT => ['KI initialisiert', null], - SAI_EVENT_DATA_SET => ['Datenfeld #[b]%1$d[/b] auf [b]%2$d[/b] gesetzt', 'Abklingzeit: %s'], - SAI_EVENT_WAYPOINT_START => ['Beginne Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Erreiche (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigen Wegpunkt;(%2$d)? auf Pfad #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['Bei Aktivierung', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:Beliebige Kreatur; ist fertig mit der Wiedergabe von Textgruppe #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Erhalte %11$s Punkte Heilung', 'Abklingzeit: %s'], - SAI_EVENT_JUST_SUMMONED => ['Wurde gerade beschworen', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausiere Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Setze Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt; fort', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Halte Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt; an', null], - SAI_EVENT_WAYPOINT_ENDED => ['Beende aktuellen Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Geplanted Ereignis #[b]%1$d[/b] löst aus', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], - SAI_EVENT_LINK => ['Nach Ereignis %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Wähle Gossip:[br](%11$s)?[span class=q1]%11$s[/span]:Menü #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['Beim ersten Erscheinen in der Welt', null], - SAI_EVENT_GOSSIP_HELLO => ['Öffne Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Ist fertig mit folgen', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Ereignisphase wurde geändert und passt auf %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Stehe hinter #target#', 'Abklingzeit: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] beginnt', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] endet', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['Zustand wurde geändert', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi-Pfad Ereignis #[b]%1$d[/b] wurde ausgelöst', null], - SAI_EVENT_ACTION_DONE => ['Script-Aktion #[b]%1$d[/b] ausgeführt', null], - SAI_EVENT_ON_SPELLCLICK => ['Zauber-Klick wurde ausgelöst', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Gesundheit von #target# ist %11$s%%', 'Wiederhole alle %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? mit GUID #%1$d:; nähert sich auf %2$dm', 'Wiederhole alle %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? mit GUID #%1$d:; nähert sich auf %2$dm', 'Wiederhole alle %s'], - SAI_EVENT_COUNTER_SET => ['Zähler #[b]%1$d[/b] ist gleich [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:Im Kampf, ;(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:Nicht im Kampf, ;(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], + SmartEvent::EVENT_HEALTH_PCT => ['Ab %11$s%% Gesundheit', 'Wiederhole alle %s'], + SmartEvent::EVENT_MANA_PCT => ['Ab %11$s%% Mana', 'Wiederhole alle %s'], + SmartEvent::EVENT_AGGRO => ['Bei Aggro', ''], + SmartEvent::EVENT_KILL => ['Beim Töten (%3$d)?eines Spielers:(%4$d)?von [npc=%4$d]:einer Kreatur;;', 'Abklingzeit: %s'], + SmartEvent::EVENT_DEATH => ['Im Tod', ''], + SmartEvent::EVENT_EVADE => ['Beim Entkommen', ''], + SmartEvent::EVENT_SPELLHIT => ['Von (%11$s)?%11$s-:;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], + SmartEvent::EVENT_RANGE => ['#target# innerhalb von %11$sm', 'Wiederhole alle %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['(%5$d)?Spieler:Einheit;(%11$s)? (%11$s):; kommt ausserhalb des Kampfes innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], + SmartEvent::EVENT_RESPAWN => ['Beim Erscheinen(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['#target# hat %11$s%% Gesundheit', 'Wiederhole alle %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# wirkt (%3$d)?[spell=%3$d]:beliebigen Zauber;', 'Wiederhole alle %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Freundlicher NPC innerhalb von %2$dm hat %1$d Gesundheit', 'Wiederhole alle %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Freundlicher NPC innerhalb von %1$dm ist beeinflusst von \'Crowd Control\'', 'Wiederhole alle %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Freundlichem NPC innerhalb von %2$dm fehlt [spell=%1$d]', 'Wiederhole alle %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['(%1$d)?[npc=%1$d]:Beliebige Kreatur; wurde gerade beschworen', 'Abklingzeit: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['#target# hat %11$s%% Mana', 'Wiederhole alle %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Gebe (%1$d)?[quest=%1$d]:beliebiges Quest;', 'Abklingzeit: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Belohne (%1$d)?[quest=%1$d]:beliebiges Quest;', 'Abklingzeit: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Erreiche \'Heimat\'-Koordinaten', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Das Ziel von [emote=%1$d] seiend', 'Abklingzeit: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Habe %2$d Aufladungen von [spell=%1$d]:Aura von [spell=%1$d] fehlt; ', 'Wiederhole alle %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# hat (%2$d)?%2$d Aufladungen:Aura; von [spell=%1$d]', 'Wiederhole alle %s'], + SmartEvent::EVENT_RESET => ['Beim Reset', ''], + SmartEvent::EVENT_IC_LOS => ['(%5$d)?Spieler:Einheit;(%11$s)? (%11$s):; kommt im Kampf innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['Ein Passagier steigt zu', 'Abklingzeit: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['Ein Passagier steigt ab', 'Abklingzeit: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?Bezaubert werden:Bezauberung läuft ab;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['Beim Bezaubern von #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['#target# wird von (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], + SmartEvent::EVENT_DAMAGED => ['Nehme %11$s Punkte Schaden', 'Wiederhole alle %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['#target# nahm %11$s Punkte Schaden', 'Wiederhole alle %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Beende (%1$d)?%11$s:Bewegung; an Punkt #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Beschworener NPC(%1$d)? [npc=%1$d]:; verschwindet', 'Abklingzeit: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['Leiche verschwindet', ''], + SmartEvent::EVENT_AI_INIT => ['KI initialisiert', ''], + SmartEvent::EVENT_DATA_SET => ['Datenfeld #[b]%1$d[/b] auf [b]%2$d[/b] gesetzt', 'Abklingzeit: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Beginne Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Erreiche (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigen Wegpunkt;(%2$d)? auf Pfad #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['Bei Aktivierung', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:Beliebige Kreatur; ist fertig mit der Wiedergabe von Textgruppe #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Erhalte %11$s Punkte Heilung', 'Abklingzeit: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['Wurde gerade beschworen', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausiere Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Setze Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt; fort', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Halte Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt; an', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Beende aktuellen Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Geplanted Ereignis #[b]%1$d[/b] löst aus', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?Nach %11$s:Sofort;', 'Wiederhole alle %s'], + SmartEvent::EVENT_LINK => ['Nach Ereignis %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Wähle Gossip:[br](%11$s)?[span class=q1]%11$s[/span]:Menü #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['Beim ersten Erscheinen in der Welt', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Öffne Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Ist fertig mit folgen', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Ereignisphase wurde geändert und passt auf %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Stehe hinter #target#', 'Abklingzeit: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] beginnt', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] endet', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['Zustand geändert auf: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Im Template definiertes Ereignis #[b]%1$d[/b] wurde ausgelöst', ''], + SmartEvent::EVENT_ACTION_DONE => ['Aktion #[b]%1$d[/b] angefordert von anderem Skript', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['Ein \'SpellClick\' wurde ausgelöst', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Gesundheit von #target# ist %11$s%%', 'Wiederhole alle %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; ist in einem %3$dm Umkreis', 'Wiederhole alle %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; ist in einem %3$dm Umkreis', 'Wiederhole alle %s'], + SmartEvent::EVENT_COUNTER_SET => ['Zähler #[b]%1$d[/b] ist gleich [b]%2$d[/b]', 'Abklingzeit: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 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_DESPAWN => ['Beim Verschwinden', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'Nicht wiederholbar', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normaler Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroischer Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normaler Schlachtzug', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroischer Schlachtzug', - SAI_EVENT_FLAG_NO_RESET => 'Nicht resetbar', - SAI_EVENT_FLAG_WHILE_CHARMED => 'Auch wenn bezaubert' + SmartEvent::FLAG_NO_REPEAT => 'Nicht wiederholbar', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Schlachtzug', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Schlachtzug', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Schlachtzug', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Schlachtzug', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'Nicht resetbar', + SmartEvent::FLAG_WHILE_CHARMED => 'Auch wenn bezaubert' ), 'actionUNK' => '[span class=q10]Unbekannte Action #[b class=q1]%d[/b] in Benutzung.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Gib:#target# gibt; (%7$d)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] für #target# wieder%8$s', 'Dauer: %s'], - SAI_ACTION_SET_FACTION => ['Setze Fraktion von #target# (%1$d)?auf [faction=%7$d]:zurück;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Setze Aussehen zurück.:Nimm folgendes Erscheinungsbild an:;(%1$d)? [npc=%1$d]:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Spiele Audio(%2$d)? für auslösenden Spieler:;:[div float=right width=270px][sound=%1$d][/div]', 'Abgespielt durch Welt.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] zu #target#.:Beende Emote;', null], - SAI_ACTION_FAIL_QUEST => ['[quest=%1$d] von #target# schlägt fehl.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Füge [quest=%1$d] dem Log von #target# hinzu:Biete [quest=%1$d] #target# an;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# wird %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# wird aktiviert.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s zu #target#.', null], - SAI_ACTION_CAST => ['Wirke [spell=%1$d] auf #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Beschwöre [npc=%1$d](%4$d)?, den Auslöser angreifend:;(%3$d)? für %7$s:.;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Ändere Bedrohung von #target# um %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Ändere Bedrohung aller Ziele um %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Erfülle Entdeckungsereignis von [quest=%1$d] für #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Emote [emote=%1$d] kontinuierlich zu #target#:Beende Emote.;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %7$s zurück.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Beginne:Beende; automatische Angriffe gegen #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Erlaube:Verbiete; Bewegung im Kampf.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Setze Ereignisphase von #target# auf [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Inkrementiere:Dekrementiere; Ereignisphase von #target#.', null], - SAI_ACTION_EVADE => ['#target# entkommt (%1$d)?zu letzten gespeicherten Position:zum Respawnpunkt;.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Fliehe nach Hilfe.', 'Benutze Standard Flucht-Emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Erfülle Ziel von [quest=%1$d] für #target#.', null], - SAI_ACTION_COMBAT_STOP => ['Beende aktuellen Kampf.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Entferne (%1$d)?alle Auren:Aura [spell=%1$d]; von #target#.', 'Nur eigene Auren'], - SAI_ACTION_FOLLOW => ['Folge #target#(%1$d)? mit %1$dm Abstand:;(%3$d)? bis zum Erreichen von [npc=%3$d]:;.', '(%7$d)?Winkel\u003A %7$.2f°:;(%8$d)? Eine Form von Questziel wird erfüllt:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Wähle zufällige Ereignisphase aus %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Wähle zufällige Ereignisphase zwischen %1$d und %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Setze #target# zurück.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['Ein Tod von [npc=%1$d] wird #target# zugeschrieben.', null], - SAI_ACTION_SET_INST_DATA => ['Setze Instanz (%3$d)?Boss State:Datenfeld; #[b]%1$d[/b] auf [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transformiere zu [npc=%1$d](%2$d)? mit Stufe [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Stirb!', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Beginne Kampf mit allen Einheiten in der Zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Rufe nach Hilfe.', 'Benutze Standard Hilfe-Emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Stecke %7$s -waffen ein.', null], - SAI_ACTION_FORCE_DESPAWN => ['Entferne #target#(%1$d)? nach %7$s:;(%2$d)? und setze es nach %8$s wieder ein.:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Werde unverwundbar mit weniger als (%2$d)?%2$d%%:%1$d; Gesundheit.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['Sitze (%7$d)?auf:ab; (%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Setze Sichtbarkeit von #target# auf Phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] wird in Datenfeld #[b]%1$d[/b] von #target# abgelegt.', null], - SAI_ACTION_ATTACK_STOP => ['Beende Angriff.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# wird (%1$d)?sichtbar:unsichtbar;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# kann(%1$d)?: keine; Grids aktivieren.', null], - SAI_ACTION_ATTACK_START => ['Greife #target# an.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Beschwöre [object=%1$d] bei #target#(%2$d)? für %7$s:.;', 'Verschwinden an Beschwörer geknüpft'], - SAI_ACTION_KILL_UNIT => ['#target# stirbt!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fliege von [span class=q1]%7$s[/span] nach [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Gehe:Renne; auf Pfad #[b]%2$d[/b].(%4$d)? Verknüpft mit [quest=%4$d].:; Reagiere auf dem Pfad %8$s.(%5$d)? Verschwinde nach %7$s:;', 'Wiederholbar'], - SAI_ACTION_WP_PAUSE => ['Pausiere Pfad für %7$s.', null], - SAI_ACTION_WP_STOP => ['Beende Pfad(%1$d)? und verschwinde nach %7$s:.;(%8$d)? [quest=%2$d] schlägt fehl.:;(%9$d)? [quest=%2$d] wird abgeschlossen.:;', null], - SAI_ACTION_ADD_ITEM => ['Gib #target# %2$d [item=%1$d].', null], - SAI_ACTION_REMOVE_ITEM => ['Nimm %2$d [item=%1$d] von #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Verhalten als %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Renne:Gehe;.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Ignoriere:Berücksichtige; Scherkraft!', null], - SAI_ACTION_SET_SWIM => ['Kann(%1$d)?: nicht; schwimmen.', null], - SAI_ACTION_TELEPORT => ['#target# wird nach [zone=%7$d] teleportiert.', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Setze:Erhöhe; Zähler #[b]%1$d[/b] von #target# (%3$d)?zurück:um [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Speichere #target# als Ziel in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Setze Pfad fort.', null], - SAI_ACTION_SET_ORIENTATION => ['Richte nach (%7$s)?%7$s:\'Heimat\'-Position; aus.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% Chance:Löse; Verzögertes Ereignis #[b]%1$d[/b](%7$s)? nach %7$s:; (%8$d)?auszulösen:aus;.', 'Wiederhole alle %s'], - SAI_ACTION_PLAYMOVIE => ['Spiele Video #[b]%1$d[/b] für #target# ab.', null], - SAI_ACTION_MOVE_TO_POS => ['Bewege (%4$d)?innerhalb von %4$dm von:nach; Punkt #[b]%1$d[/b] bei #target#(%2$d)? auf einerm Transporter:;.', 'ohne Wegfindung'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# wird für %7$s wieder eingesetzt.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Lege nicht-standard Ausrüstung ab:Rüste %7$s;(%1$d)? vom Ausrüstungs-Template #[b]%1$d[/b]:; an #target#(%8$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], - SAI_ACTION_CLOSE_GOSSIP => ['Schließe Gossip-Fenster.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Löse Verzögertes Ereignis #[b]%1$d[/b] aus.', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Lösche Verzögertes Ereignis #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Wende Aura von [spell=%1$d] auf #target# an.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Benutze #target# als Basis für alle weiteren SmartAI-Ereignisse.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Setze Basis für SmartAI-Ereignisse zurück.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Setze aktuelles SmartAI zurück.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Setze Abstand für Fernkampf auf [b]%1$d[/b]m(%2$d)?, %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Rufe [html]Timed Actionlist #%1$d[/html] auf. Läuft %7$s ab.', null], - SAI_ACTION_SET_NPC_FLAG => ['Setze NpcFlags von #target# auf %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Füge NpcFlags %7$s #target# hinzu.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Entferne NpcFlags %7$s von #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# gibt (%7$s)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] für #target# wieder%7$s', null], - SAI_ACTION_SELF_CAST => ['Selbst wirkt [spell=%1$d] auf #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s wirkt [spell=%1$d] auf #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist auf: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist aus Zahlenbreich auf: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Bewege #target# zu zufälligem Punkt innerhalb von %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Setze UnitFieldBytes1 von #target# auf %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Entferne UnitFieldBytes1 %7$s von #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Unterbreche Wirken (%2$d)?von [spell=%2$d]:vom aktuellen Zauber;.', '(%1$d)?Sofort:Verzögert;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Setze Animationsfortschritt auf [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Setze Dynamic Flag von #target# auf %7$s.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Füge Dynamic Flag %7$s #target# hinzu.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Entferne Dynamic Flag %7$s von #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Springe auf feste Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Zeige Gossip #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Setze Plündern-Status von #target# auf %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Sende gespeicherte Ziele aus #[b]%1$d[/b] an #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Setze Heimat-Position auf (%10$d)?aktuelle Position.:feste Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Lasse:Verhindere; Gesundheitsregeneration von #target#(%1$d)? zu:;.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Lasse:Verhindere; Bewegung im Kampf von #target#(%1$d)? zu:;.', null], - SAI_ACTION_SET_GO_FLAG => ['Setze Gameobject Flags von #target# auf %7$s.', null], - SAI_ACTION_ADD_GO_FLAG => ['Füge Gameobject Flag %7$s #target# hinzu.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Entferne Gameobject Flag %7$s von #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Beschwöre Kreaturengruppe #[b]%1$d[/b](%2$d)?, den Auslöser angreifend:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['Setze %7$s von #target# auf [b]%2$d[/b].', null], - SAI_ACTION_ADD_POWER => ['Gib #target# [b]%2$d[/b] %7$s.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Entferne [b]%2$d[/b] %7$s von #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Beende [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Starte [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# beginnt Pfad. Betritt den Pfad am nächstliegenden dieser Punkte: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Bewege zu relativer Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Spiele zufälliges Audio(%5$d)? an auslösenden Spieler:;:[div float=right width=270px]%7$s[/div]', 'Abgespielt durch Welt.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Setze Verzögerung für das Verschwindne der Leiche von #target# auf %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Verhindere:Lasse; Entkommen(%1$d)?: zu;.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Setze Gameobject Status auf %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Lasse:Verhindere; Fliegen(%1$d)? zu:;.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Entferne alle Auren mit [b]%7$s[/b] von #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Setze Sichtweite von #target# auf %1$dm.', null], - SAI_ACTION_FLEE => ['#target# flieht für %7$s und sucht Hilfe.', null], - SAI_ACTION_ADD_THREAT => ['Ändere Bedrohung von #target# um %7$d Punkte.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Lege nicht-standart Ausrüstung ab:Rüste %7$s; von Ausrüstungs-Template #[b]%1$d[/b] an #target#(%8$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Löse definiertes verzögertes Ereignis innerhalb von %7$s aus.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Entferne alle Gameobjects von #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pausiere Bewegung aus Slot #[b]%1$d[/b] für %7$s.', 'Erzwungen'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawne SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Abklingzeit: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawne SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Abklingzeit: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawne %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Auslöser wirkt [spell=%1$d] auf #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Gebe Film #[b]%1$d[/b] für #target# wieder.', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Setze Geschwindigkeit von MotionType #[b]%1$d[/b] auf [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Ändere Skybox in [zone=%1$d] auf #[b]%2$d[/b].', 'Übergang: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Ändere Wetter in [zone=%1$d] zu %7$s mit %3$d%% Stärke.', null] // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Gib:#target# gibt; (%11$s)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] (3$d)?für #target#:für den Auslöser; wieder%11$s', 'Dauer: %s'], + SmartAction::ACTION_SET_FACTION => ['Setze Fraktion von #target# (%1$d)?auf [faction=%11$d]:zurück;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Setze Aussehen zurück.:Nimm Erscheinungsbild an:;(%1$d)? [npc=%1$d]:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Spiele Audio für (%2$d)?auslösenden Spieler:alle Spieler im Sichtfeld;:[div][sound=%1$d][/div]', 'Wiedergabe durch Umwelt'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] zu #target#.:Beende fortlaufenden Emote;', ''], + SmartAction::ACTION_FAIL_QUEST => ['[quest=%1$d] von #target# schlägt fehl.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Füge [quest=%1$d] dem Log von #target# hinzu:Biete [quest=%1$d] #target# an;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# wird %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# wird aktiviert.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s zu #target#.', ''], + SmartAction::ACTION_CAST => ['Wirke [spell=%1$d] auf #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Beschwöre [npc=%1$d](%4$d)?, den Auslöser angreifend:;(%3$d)? für %11$s:.;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Ändere Bedrohung von #target# um %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Ändere Bedrohung aller Gegner um %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Erfülle Entdeckungsereignis von [quest=%1$d] für #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Emote [emote=%1$d] kontinuierlich zu #target#:Beende fortlaufenden Emote.;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %11$s zurück.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Beginne:Beende; automatische Angriffe gegen #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Erlaube:Verbiete; Bewegung im Kampf.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Setze Ereignisphase von #target# auf [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Inkrementiere:Dekrementiere; Ereignisphase von #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# entkommt (%1$d)?zur letzten gespeicherten Position:zum Spawnpunkt;.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Fliehe nach Hilfe.', 'Benutze Standard Flucht-Emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Erfülle Entdeckungsereignis von [quest=%1$d] für Gruppe von #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['Beende aktuellen Kampf.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Entferne(%2$d)? %2$d Aufladungen von:;(%1$d)? alle Auren:Aura [spell=%1$d]; von #target#.', 'Nur eigene Auren'], + SmartAction::ACTION_FOLLOW => ['Folge #target#(%1$d)? mit %1$dm Abstand:;(%3$d)? bis zum Erreichen von [npc=%3$d]:;.(%12$d)? Am Ende wird ein Entdeckungsereignis für [quest=%4$d] erfüllt.:;(%13$d)? Am Ende wird ein Tod von [npc=%4$d] gutgeschrieben.:;', '(%11$d)?Folgt im Winkel von\u003A %11$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Wähle zufällige Ereignisphase aus %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Wähle zufällige Ereignisphase zwischen %1$d und %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Setze #target# zurück.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['Ein Tod von [npc=%1$d] wird (%11$s)?%11$s:#target#; gutgeschrieben.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Setze Instanz (%3$d)?Boss State:Datenfeld; #[b]%1$d[/b] auf [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Speichere GUID von #target# in Datenfeld #[b]%1$d[/b] der Instanz', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transformiere zu [npc=%1$d].', 'Übernehme Stufe von [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Stirb!', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Beginne Kampf mit allen Einheiten in der Zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Rufe im Umkreis von %1$dm nach Hilfe.', 'Benutze Standard Hilfe-Emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Stecke %11$s -waffen ein.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Entferne #target#(%1$d)? nach %11$s:;(%2$d)? und setze es nach %12$s wieder ein.:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Werde unverwundbar mit weniger als (%2$d)?%2$d%%:%1$d; Gesundheit.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['Sitze (%11$d)?ab:auf; (%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Setze Sichtbarkeit von #target# auf Phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] wird in Datenfeld #[b]%1$d[/b] von #target# abgelegt.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Beende Angriff.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# wird (%1$d)?sichtbar:unsichtbar;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# kann(%1$d)?: keine; Grids aktivieren.', ''], + SmartAction::ACTION_ATTACK_START => ['Greife #target# an.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Beschwöre [object=%1$d] bei #target#(%2$d)? für %11$s:.;', 'Verschwinden an Beschwörer geknüpft'], + SmartAction::ACTION_KILL_UNIT => ['#target# stirbt!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fliege von [span class=q1]%11$s[/span] nach [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Renne:Gehe; auf Pfad #[b]%2$d[/b].(%4$d)? Verknüpft mit [quest=%4$d].:;(%5$d)? Verschwinde nach %11$s:;', 'Wiederholbar(%12$s)? [DEPRECATED] Reagiere auf dem Pfad %12$s:;'], + SmartAction::ACTION_WP_PAUSE => ['Pausiere Pfad für %11$s.', ''], + SmartAction::ACTION_WP_STOP => ['Beende Pfad(%1$d)? und verschwinde nach %11$s:;. (%2$d)?[quest=%2$d]:Quest vom Pfadanfang; (%3$d)?schlägt fehl:wird abgeschlossen;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Gib #target# %2$d [item=%1$d].', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Nimm %2$d [item=%1$d] von #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Verhalten als %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['Wähle Bewegung (%1$d)?Rennen:Gehen;.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Ignoriere:Berücksichtige; Scherkraft!', ''], + SmartAction::ACTION_SET_SWIM => ['Kann(%1$d)?: nicht; schwimmen.', ''], + SmartAction::ACTION_TELEPORT => ['#target# wird zu [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]Werltkoordinaten[/lightbox] teleportiert.', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Setze:Erhöhe; Zähler #[b]%1$d[/b] von #target# (%3$d)?auf:um; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Speichere #target# als Ziel in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Setze Pfad fort.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Richte nach (%11$s)?%11$s:\'Heimat\'-Position; aus.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% Chance:Löse; Verzögertes Ereignis #[b]%1$d[/b](%11$s)? nach %11$s:; (%6$d)?auszulösen:aus;.', 'Wiederhole alle %s'], + SmartAction::ACTION_PLAYMOVIE => ['Spiele Video #[b]%1$d[/b] für #target# ab.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Bewege (%4$d)?innerhalb von %4$dm von:nach; Punkt #[b]%1$d[/b] bei #target#(%2$d)? auf einerm Transporter:;.', 'ohne Wegfindung'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# erscheint für %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Rüste %11$s:Lege nicht-standard Ausrüstung ab;(%1$d)? vom Ausrüstungs-Template #[b]%1$d[/b]:; an #target#(%12$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Schließe Gossip-Fenster.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Löse Verzögertes Ereignis #[b]%1$d[/b] aus.', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Lösche Verzögertes Ereignis #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Wende Aura von [spell=%1$d] auf #target# an.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Benutze #target# als Basis für alle weiteren SmartAction-Ereignisse.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Setze Basis für SmartAction-Ereignisse zurück.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Setze aktuelle SmartAI zurück.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Setze Abstand für Fernkampf auf [b]%1$d[/b]m(%2$d)?, %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Rufe Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url] auf. Läuft %11$s ab.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Setze NpcFlags von #target# auf %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Füge NpcFlags %11$s #target# hinzu.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Entferne NpcFlags %11$s von #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# gibt (%11$s)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] für #target# wieder%11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# wirkt [spell=%1$d] auf #target#.(%4$d)? (max. %4$d |4Ziel:Ziele;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s wirkt [spell=%1$d] auf #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist auf: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist aus Zahlenbreich auf: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Bewege #target# zu zufälligem Punkt innerhalb von %1$dm:#target# beendet zufälllige Bewegung.;', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Setze UnitFieldBytes1 von #target# auf %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Entferne UnitFieldBytes1 %11$s von #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Unterbreche Wirken (%2$d)?von [spell=%2$d]:vom aktuellen Zauber;.', '(%1$d)?Inklusive Spontanzauber:; (%3$d)? Inklusive verzögerter Zauber:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Setze Animationsfortschritt auf [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Setze Dynamic Flag von #target# auf %11$s.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Füge Dynamic Flag %11$s #target# hinzu.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Entferne Dynamic Flag %11$s von #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Springe auf feste Position — [b]X: %11$.2f, Y: %12$.2f, Z: %13$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Zeige Gossip #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Setze Plündern-Status von #target# auf %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Sende gespeicherte Ziele aus #[b]%1$d[/b] an #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Setze Heimat-Position auf (%11$d)?aktuelle Position.:feste Position — [b]X: %11$.2f, Y: %12$.2f, Z: %13$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Lasse:Verhindere; Gesundheitsregeneration von #target#(%1$d)? zu:;.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Lasse:Verhindere; Bewegung im Kampf von #target#(%1$d)? zu:;.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Setze Gameobject Flags von #target# auf %11$s.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Füge Gameobject Flag %11$s #target# hinzu.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Entferne Gameobject Flag %11$s von #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Beschwöre Kreaturengruppe #[b]%1$d[/b](%2$d)?, den Auslöser angreifend:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['Setze %11$s von #target# auf [b]%2$d[/b].', ''], + SmartAction::ACTION_ADD_POWER => ['Gib #target# [b]%2$d[/b] %11$s.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Entferne [b]%2$d[/b] %11$s von #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Beende [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Starte [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# beginnt Pfad. Betritt den Pfad am nächstliegenden dieser Punkte: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Bewege zu relativer Position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Spiele zufälliges Audio für (%5$d)?auslösenden Spieler:alle Spieler im Sichtfeld;:%11$s', 'Wiedergabe durch Umwelt'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Setze Verzögerung für das Verschwindne der Leiche von #target# auf %11$s.', 'Zeitfaktor für geplünderte Leichen wird angewendet'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Verhindere:Lasse; Entkommen(%1$d)?: zu;.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Setze Gameobject Status auf %11$s.', ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Lasse:Verhindere; Fliegen(%1$d)? zu:;.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Entferne alle Auren mit [b]%11$s[/b] von #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Setze Sichtweite von #target# auf %1$dm.', ''], + SmartAction::ACTION_FLEE => ['#target# flieht für %11$s und sucht Hilfe.', ''], + SmartAction::ACTION_ADD_THREAT => ['Ändere Bedrohung von #target# um %11$+d Punkte.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Lege nicht-standard Ausrüstung ab:Rüste %11$s; von Ausrüstungs-Template #[b]%1$d[/b] an #target#(%12$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Löse definiertes verzögertes Ereignis innerhalb von %11$s aus.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Entferne alle Gameobjects von #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pausiere Bewegung aus Slot #[b]%1$d[/b] für %11$s.', 'Erzwungen'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawne SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Abklingzeit: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawne SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Abklingzeit: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawne %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Auslöser wirkt [spell=%1$d] auf #target#.(%4$d)? (max. %4$d |4Ziel:Ziele;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Gebe Film #[b]%1$d[/b] für #target# wieder.', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Setze Geschwindigkeit von MotionType #[b]%1$d[/b] auf [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Ändere Skybox in [zone=%1$d] auf #[b]%3$d[/b]:Setze Skybox in [zone=%1$d] zurück;.', 'Übergang: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Ändere Wetter in [zone=%1$d] zu %11$s mit %3$d%% Stärke.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Aktiviere:Deaktiviere; Schweben.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Aktiviere:Deaktiviere; #target# Immunität gegen Spieler.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Aktiviere:Deaktiviere; #target# Immunität gegen NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Verhindere:Erlaube; Interaktion mit #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Aktiviere Gameobject (Methode: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Füge #target# zur Zieleliste #%1$d hinzu.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unbekanntes Ziel#[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'selbst', - SAI_TARGET_VICTIM => 'aktuelles Ziel', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2. in Aggro', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'letzter in Aggro', - SAI_TARGET_HOSTILE_RANDOM => 'zufälliges Ziel', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'zufälliges nicht-Tank Ziel', - SAI_TARGET_ACTION_INVOKER => 'Auslöser', - SAI_TARGET_POSITION => 'Weltkoordinaten', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?zufällige Instanz von [npc=%1$d]:beliebige Kreatur; innerhalb von %11$sm(%4$d)? (max. %4$d Ziele):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; mit GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?zufällige Instanz von [npc=%1$d]:beliebige Kreatur; innerhalb von %11$sm(%3$d)? (max. %3$d Ziele):;', - SAI_TARGET_STORED => 'vorher gespeichertes Ziel', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?zufällige Instanz von [object=%1$d]:beliebiges Objekt; innerhalb von %11$sm(%4$d)? (max. %4$d Ziele):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:Gameobject; mit GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?zufällige Instanz von [object=%1$d]:beliebiges Objekt; innerhalb von %11$sm(%3$d)? (max. %3$d Ziele):;', - SAI_TARGET_INVOKER_PARTY => 'Gruppe des Auslösenden', - SAI_TARGET_PLAYER_RANGE => 'zufälliger Spieler innerhalb von %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'zufälliger Spieler innerhalb von %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'nächste (%3$d)?tote:lebendige; (%1$d)?[npc=%1$d]:beliebige Kreatur; innerhalb von %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'nächstes (%1$d)?[object=%1$d]:beliebiges Gameobject; innerhalb von %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'nächster Spieler innerhalb von %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Fahrzeug des Auslösenden', - SAI_TARGET_OWNER_OR_SUMMONER => 'Besitzer oder Beschwörer des Auslösenden', - SAI_TARGET_THREAT_LIST => 'alle Einheiten, die mit mir im Kampf sind', - SAI_TARGET_CLOSEST_ENEMY => 'nächster angreifbarer (%2$d)?Spieler:Gegner; innerhalb von %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'nächster (%2$d)?freundlicher Spieler:freundliche Kreatur; innerhalb von %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'alle Spieler mit Lootberechtigung', - SAI_TARGET_FARTHEST => 'am weitesten (%2$d)?entferter, kämpfender Spieler:entferte, kämpfende Kreatur; innerhalb von %1$dm(%3$d)? und im Sichtfeld:;', - SAI_TARGET_VEHICLE_PASSENGER => 'Zusatz in (%1$d)?Sitz %11$s:allen Sitzen; des Fahrzeug des Auslösenden', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => '(%1$d)?zufällige, ungespawnte Instanz von [object=%1$d]:beliebiges, ungespawntes Objekt; innerhalb von %11$sm(%3$d)' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'selbst', + SmartTarget::TARGET_VICTIM => 'Gegner', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '(%2$d)?Spieler:Einheit;(%11$s)? mit %11$s:;(%1$d)? innerhalb von %1$dm:; an 2. Stelle in Aggro', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => '(%2$d)?Spieler:Einheit;(%11$s)? mit %11$s:;(%1$d)? innerhalb von %1$dm:; an letzter Stelle in Aggro', + SmartTarget::TARGET_HOSTILE_RANDOM => '(%2$d)?zufälliger Spieler:zufällige Einheit;(%11$s)? mit %11$s:;(%1$d)? innerhalb von %1$dm:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => '(%2$d)?zufälliger nicht-Tank Spieler:zufällige nicht-Tank Einheit;(%11$s)? mit %11$s:;(%1$d)? innerhalb von %1$dm:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Auslöser', + SmartTarget::TARGET_POSITION => 'Weltkoordinaten', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?Instanz von [npc=%1$d]:beliebige Kreatur; innerhalb von %11$sm(%4$d)? (max. %4$d |4Ziel:Ziele;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?Instanz von [npc=%1$d]:beliebige Kreatur;(%2$d)? innerhalb von %2$dm:;(%3$d)? (max. %3$d |4Ziel:Ziele;):;', + SmartTarget::TARGET_STORED => 'vorher gespeichertes Ziel', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?Instanz von [object=%1$d]:beliebiges Objekt; innerhalb von %11$sm(%4$d)? (max. %4$d |4Ziel:Ziele;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:Gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?Instanz von [object=%1$d]:beliebiges Objekt;(%2$d)? innerhalb von %2$dm:;(%3$d)? (max. %3$d |4Ziel:Ziele;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Gruppe des Auslösenden', + SmartTarget::TARGET_PLAYER_RANGE => 'alle Spieler innerhalb von %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'alle Spieler innerhalb von %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'näheste (%3$d)?tote:lebendige; (%1$d)?[npc=%1$d]:beliebige Kreatur; innerhalb von (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'nähestes (%1$d)?[object=%1$d]:beliebiges Gameobject; innerhalb von (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'nähester Spieler innerhalb von %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Fahrzeug des Auslösenden', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'Besitzer oder Beschwörer', + SmartTarget::TARGET_THREAT_LIST => 'alle Einheiten(%1$d)? innerhalb von %1$dm:;, die mit mir im Kampf sind', + SmartTarget::TARGET_CLOSEST_ENEMY => '(%2$d)?nähester angreifbarer Spieler:näheste angreifbare Einheit; innerhalb von %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => '(%2$d)?nähester freundlicher Spieler:näheste freundliche Einheit; innerhalb von %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'alle Spieler mit Lootberechtigung', + SmartTarget::TARGET_FARTHEST => 'am weitesten (%2$d)?entferter, kämpfender Spieler:entferte, kämpfende Einheit; innerhalb von %1$dm(%3$d)? und im Sichtfeld:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'Fahrzeugzusatz in (%1$d)?Sitz %11$s:allen Sitzen;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => '(%1$d)?näheste ungespawnte Instanz von [object=%1$d]:nähestes ungespawntes Objekt; innerhalb von %11$sm(%3$d)' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Unterbreche aktives wirken', - SAI_CAST_FLAG_TRIGGERED => 'Ausgelöst', - SAI_CAST_FLAG_AURA_MISSING => 'Aura fehlt', - SAI_CAST_FLAG_COMBAT_MOVE => 'Bewegung im Kampf' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Unterbreche aktives wirken', + SmartAI::CAST_FLAG_TRIGGERED => 'Ausgelöst', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura fehlt', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Bewegung im Kampf' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Überschreibe und resette Respawnzeit', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Erzwinge spawn, wenn bereits gespawnt', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Lösche Respawnzeit bei Despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Überschreibe und resette Respawnzeit', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Erzwinge spawn, wenn bereits gespawnt', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Lösche Respawnzeit bei Despawn' ), - 'GOStates' => ['aktiv', 'bereit', 'alternativ aktiv'], - 'summonTypes' => [null, 'Despawn nach Zeit oder wenn Leiche verschwindet', 'Despawn nach Zeit oder beim Sterben', 'Despawn nach Zeit', 'Despawn nach Zeit ausserhalb des Kampfes', 'Despawn beim Sterben', 'Despawn nach Zeit nach dem Tod', 'Despawn wenn Leiche verschwindet', 'Manueller despawn'], - 'aiTpl' => ['einfache KI', 'Zauberer', 'Geschütz', 'passive Kreatur', 'Käfig für Kreatur', 'Kreatur im Käfig'], - 'reactStates' => ['passiv', 'defensiv', 'aggressiv', 'helfend'], - 'sheaths' => ['alle', 'Nahkampf', 'Fernkampf'], - 'saiUpdate' => ['ausserhalb des Kampfes', 'im Kampf', 'immer'], - 'lootStates' => ['Nicht bereit', 'Bereit', 'Aktiviert', 'Gerade deaktiviert'], - 'weatherStates' => ['Schön', 'Nebel', 'Niesel', 'leichter Regen', 'Regen', 'starker Rain', 'leichter Schneefall', 'Schneefall', 'starker Schneefall', 22 => 'leichter Sandsturm', 41=> 'Sandsturm', 42 => 'starker Sandsturm', 86 => 'Gewitter', 90 => 'schwarzer Regen', 106 => 'schwarzer Schneefall'], + 'GOStates' => ['aktiv', 'bereit', 'zerstört'], + 'summonTypes' => [null, 'Despawn nach Zeit oder wenn Leiche verschwindet', 'Despawn nach Zeit oder beim Sterben', 'Despawn nach Zeit', 'Despawn nach Zeit ausserhalb des Kampfes', 'Despawn beim Sterben', 'Despawn nach Zeit nach dem Tod', 'Despawn wenn Leiche verschwindet', 'Manueller despawn'], + 'aiTpl' => ['einfache KI', 'Zauberer', 'Geschütz', 'passive Kreatur', 'Käfig für Kreatur', 'Kreatur im Käfig'], + 'reactStates' => ['passiv', 'defensiv', 'aggressiv', 'helfend'], + 'sheaths' => ['alle', 'Nahkampf', 'Fernkampf'], + 'saiUpdate' => ['ausserhalb des Kampfes', 'im Kampf', 'immer'], + 'lootStates' => ['Nicht bereit', 'Bereit', 'Aktiviert', 'Gerade deaktiviert'], + 'weatherStates' => ['Schön', 'Nebel', 'Niesel', 'leichter Regen', 'Regen', 'starker Rain', 'leichter Schneefall', 'Schneefall', 'starker Schneefall', 22 => 'leichter Sandsturm', 41=> 'Sandsturm', 42 => 'starker Sandsturm', 86 => 'Gewitter', 90 => 'schwarzer Regen', 106 => 'schwarzer Schneefall'], + 'hostilityModes' => ['feindlich', 'nicht-feindlich', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unbekannter Gameobject-Status #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unbekannter SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unbekanntes AI-Template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unbekannter ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unbekannter sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unbekannte Updatebedingung #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unbekannter Plündern-Status #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unbekannter Wetter-Zustand #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unbekannte Entität[/b]', + 'GOStateUNK' => '[span class=q10]unbekannter Gameobject-Status #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unbekannter SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unbekanntes AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unbekannter ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unbekannter sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unbekannte Updatebedingung #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unbekannter Plündern-Status #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unbekannter Wetter-Zustand #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unbekannte Ressource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unbekannte Gegner-Beziehung #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unbekannter Bewegungstyp #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unbekannte Entität[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/localization/locale_enus.php b/localization/locale_enus.php index ba09873c..3e687896 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -4,7 +4,6 @@ if (!defined('AOWOW_REVISION')) die('illegal access'); - // comments in CAPS point to items in \Interface\FrameXML\GlobalStrings.lua - lowercase sources are contextual @@ -512,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' ), 'bytes1' => array( -/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Standing', + UNIT_STAND_STATE_SIT => 'Sitting on ground', + UNIT_STAND_STATE_SIT_CHAIR => 'Sitting on chair', + UNIT_STAND_STATE_SLEEP => 'Sleeping', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Sitting on low chair', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Sitting on medium chair', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Sitting on high chair', + UNIT_STAND_STATE_DEAD => 'Dead', + UNIT_STAND_STATE_KNEEL => 'Kneeing', + UNIT_STAND_STATE_SUBMERGED => 'Submerged' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', - UNIT_BYTE1_FLAG_HOVER => 'Hovering', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'ground animations', + UNIT_BYTE1_ANIM_TIER_SWIM => 'swimming animations', + UNIT_BYTE1_ANIM_TIER_HOVER => 'hovering animations', + UNIT_BYTE1_ANIM_TIER_FLY => 'flying animations', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'submerged animations' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], - SAI_EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], - SAI_EVENT_AGGRO => ['On Aggro', null], - SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_DEATH => ['On death', null], - SAI_EVENT_EVADE => ['When evading', null], - SAI_EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_RANGE => ['On target at %11$sm', 'Repeat every %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_RESPAWN => ['On respawn', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %11$s%% health', 'Repeat every %s'], - SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['On target at %11$s%% mana', 'Repeat every %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], - SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], - SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_RESET => ['On reset', null], - SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], - SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], - SAI_EVENT_AI_INIT => ['AI initialized', null], - SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], - SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], - SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_LINK => ['After Event %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], - SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], - SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], - SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %12$s%%', 'Repeat every %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], + SmartEvent::EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], + SmartEvent::EVENT_AGGRO => ['On Aggro', ''], + SmartEvent::EVENT_KILL => ['On killing (%3$d)?a player:(%4$d)?[npc=%4$d]:any creature;;', 'Cooldown: %s'], + SmartEvent::EVENT_DEATH => ['On death', ''], + SmartEvent::EVENT_EVADE => ['When evading', ''], + SmartEvent::EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_RANGE => ['On #target# at %11$sm', 'Repeat every %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['While out of combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_RESPAWN => ['On respawn(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['On #target# at %11$s%% health', 'Repeat every %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['On #target# at %11$s%% mana', 'Repeat every %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Arriving at home coordinates', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_RESET => ['On reset', ''], + SmartEvent::EVENT_IC_LOS => ['While in combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['When charming #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Ended (%1$d)?%11$s:movement; on point #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Summoned npc(%1$d)? [npc=%1$d]:; despawned', 'Cooldown: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['On corpse despawn', ''], + SmartEvent::EVENT_AI_INIT => ['AI initialized', ''], + SmartEvent::EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Start pathing from (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['On activation', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['On being summoned', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_LINK => ['After Event %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['On being spawned for the first time', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Finished following', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] started', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] ended', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['State changed to: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Event #[b]%1$d[/b] defined in template was trigered', ''], + SmartEvent::EVENT_ACTION_DONE => ['Action #[b]%1$d[/b] requested by other script', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['SpellClick was triggered', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %11$s%%', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null, + SmartEvent::EVENT_SCENE_COMPLETE => null, + SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['My summoned (%1$d)?[npc=%1$d]:NPC; died', 'Cooldown: %s'], + SmartEvent::EVENT_ON_SPELL_CAST => ['On [spell=%1$d] cast success', 'Cooldown: %s'], + 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', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', - SAI_EVENT_FLAG_NO_RESET => 'No Reset', - SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + SmartEvent::FLAG_NO_REPEAT => 'No Repeat', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Raid', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Raid', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Raid', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Raid', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'No Reset', + SmartEvent::FLAG_WHILE_CHARMED => 'While Charmed' ), 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], - SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End Emote.;', null], - SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], - SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$s:;(%4$d)?, attacking invoker.:;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], - SAI_ACTION_EVADE => ['#target# evades to (%1$d)?last stored:respawn; position.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], - SAI_ACTION_COMBAT_STOP => ['End current combat.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', 'Only own auras'], - SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle\u003A %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], - SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]%1$d[/b] to [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Die…   painfully.', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], - SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], - SAI_ACTION_ATTACK_STOP => ['Stop attacking.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], - SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %7$s:; at #target#.', 'Despawn linked to summoner'], - SAI_ACTION_KILL_UNIT => ['#target# dies!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s:;', 'Repeatable'], - SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$s', null], - SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:.;(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], - SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], - SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], - SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], - SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], - SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], - SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], - SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], - SAI_ACTION_SELF_CAST => ['Self casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], - SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], - SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], - SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], - SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %7$s.', 'Forced'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawn %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Change skybox in [zone=%1$d] to #[b]%2$d[/b].', 'Transition: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %7$s at %3$d%% intensity.', null], // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Say:#target# says; (%%11$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to (%3$d)?#target#:invoker;%11$s', 'Duration: %s'], + SmartAction::ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%11$d]:Reset faction of #target#;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Play sound to (%2$d)?invoking player:all players in sight;:[div][sound=%1$d][/div]', 'Played by environment.'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End emote state.;', ''], + SmartAction::ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# becomes %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s to #target#.', ''], + SmartAction::ACTION_CAST => ['Cast [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %11$s:;(%4$d)?, attacking invoker.:;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Modify the threat of all opponents by %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# evades to (%1$d)?last stored:spawn; position.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for group of #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['End current combat.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Remove(%2$d)? %2$d charges of:;(%1$d)? all auras: [spell=%1$d]\'s aura; from #target#.', 'Only own auras'], + SmartAction::ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.(%12$d)?Exploration event of [quest=%4$d] will be satisfied.:;(%13$d)? A kill of [npc=%4$d] will be credited.:;', '(%11$d)?Follow angle\u003A %7$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Pick random Event Phase from %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Reset #target#.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to (%11$s)?%11$s:#target#;.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Set instance (%3$d)?BossState:data field; #[b]%1$d[/b] to [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Store GUID of #target# in instance data field #[b]%1$d[/b].', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d].', 'Use level from [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Die…   painfully.', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Call for help within %1$dm.', 'Use default help emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Sheath %11$s weapons.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %11$s:;(%2$d)? and then respawn after %12$s:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%11$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Stop attacking.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', ''], + SmartAction::ACTION_ATTACK_START => ['Start attacking #target#.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %11$s:; at #target#.', 'Despawn not linked to summoner'], + SmartAction::ACTION_KILL_UNIT => ['#target# dies!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%11$s[/span] to [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Run:Walk; on waypoint path #[b]%2$d[/b](%4$d)? and be bound to [quest=%4$d]:;.(%5$d)? Despawn after %11$s:;', 'Repeatable(%12$s)? [DEPRECATED] React %12$s on path:;'], + SmartAction::ACTION_WP_PAUSE => ['Pause waypoint path for %11$s', ''], + SmartAction::ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %11$s:.; (%2$d)?[quest=%2$d]:quest from start action; (%3$d)?fails:is completed;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', ''], + SmartAction::ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', ''], + SmartAction::ACTION_TELEPORT => ['#target# is teleported to [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]World Coordinates[/lightbox].', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Set:Increase; Counter #[b]%1$d[/b] of #target# (%3$d)?to:by; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Continue on waypoint path.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Set orientation to (%11$s)?face %11$s:Home Position;.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%11$s)? after %11$s:;.', 'Repeat every %s'], + SmartAction::ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Equip %11$s:Unequip non-standard items;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Call Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url]. Updates %11$s.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Add %11$s npc flags to #target#.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Remove %11$s npc flags from #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# says (%11$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] %11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s casts [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Move #target# to a random point within %1$dm:#target# ends idle movement;.', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Including instant spells.:;(%3$d)? Including delayed spells.:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %11$s from #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Set Home Position to (%11$d)?current position.:fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Set GameObject Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Add GameObject Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %11$s from #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['%11$s is set to [b]%2$d[/b] for #target#.', ''], + SmartAction::ACTION_ADD_POWER => ['Add [b]%2$d[/b] %11$s to #target#.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %11$s from #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Start [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Play a random sound to (%5$d)?invoking player:all players in sight;:%11$s', 'Played by environment.'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %11$s.', 'Apply Looted Corpse Decay Factor'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Set gameobject state to %11$s.'. ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%11$s[/b] from #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', ''], + SmartAction::ACTION_FLEE => ['#target# flees for assistance for %11$s.', ''], + SmartAction::ACTION_ADD_THREAT => ['Modify threat level of #target# by %11$+d points.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %11$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %11$s.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %11$s.', 'Forced'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawn %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Change skybox in [zone=%1$d] to #[b]%3$d[/b]:Reset skybox in [zone=%1$d];.', 'Transition: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %11$s at %3$d%% intensity.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Enable:Disable; hovering.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Enable:Disable; #target# immunity to players.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Enable:Disable; #target# immunity to NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Prevent:Allow; interaction with #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Activate Gameobject (Method: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Add #target# as target to list #%1$d.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'self', - SAI_TARGET_VICTIM => 'current target', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', - SAI_TARGET_HOSTILE_RANDOM => 'random target', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', - SAI_TARGET_ACTION_INVOKER => 'Invoker', - SAI_TARGET_POSITION => 'world coordinates', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%4$d)? (max. %4$d targets):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; with GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_STORED => 'previously stored targets', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%4$d)? (max. %4$d targets):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; with GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_INVOKER_PARTY => 'Invokers party', - SAI_TARGET_PLAYER_RANGE => 'random player within %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'random player within %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', - SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', - SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', - SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', - SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', - SAI_TARGET_VEHICLE_PASSENGER => 'accessory in Invokers vehicle in (%1$d)?seat %11$s:all seats;', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, arbitrary gameobject; within %11$sm' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'self', + SmartTarget::TARGET_VICTIM => 'Opponent', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '2nd (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => 'last (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM => 'random (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Invoker', + SmartTarget::TARGET_POSITION => 'world coordinates', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?instance of [npc=%1$d]:any creature; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?instance of [npc=%1$d]:any creature;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_STORED => 'previously stored targets', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?instance of [object=%1$d]:any object; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?instance of [object=%1$d]:any object;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Invokers party', + SmartTarget::TARGET_PLAYER_RANGE => 'all players within %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'all players within %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:creature; within (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:gameobject; within (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'owner or summoner', + SmartTarget::TARGET_THREAT_LIST => 'all units(%1$d)? within %1$dm:; engaged in combat with me', + SmartTarget::TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SmartTarget::TARGET_FARTHEST => 'furthest engaged (%2$d)?player:unit; within %1$dm(%3$d)? and line of sight:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'vehicle accessory in (%1$d)?seat %11$s:all seats;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, gameobject; within %11$sm' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', - SAI_CAST_FLAG_TRIGGERED => 'Triggered', - SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', - SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SmartAI::CAST_FLAG_TRIGGERED => 'Triggered', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura missing', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Combat movement' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' ), - 'GOStates' => ['active', 'ready', 'active alternative'], - 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], - 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], - 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], - 'sheaths' => ['all', 'melee', 'ranged'], - 'saiUpdate' => ['out of combat', 'in combat', 'always'], - 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], - 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'GOStates' => ['active', 'ready', 'destroyed'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'hostilityModes' => ['hostile', 'non-hostile', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unknown entity[/b]', + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unknown resource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unknown HostilityMode #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unknown MotionType #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unknown entity[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 7734c8ef..09086d4b 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -511,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' ), 'bytes1' => array( -/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Standing', + UNIT_STAND_STATE_SIT => 'Sitting on ground', + UNIT_STAND_STATE_SIT_CHAIR => 'Sitting on chair', + UNIT_STAND_STATE_SLEEP => 'Sleeping', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Sitting on low chair', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Sitting on medium chair', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Sitting on high chair', + UNIT_STAND_STATE_DEAD => 'Dead', + UNIT_STAND_STATE_KNEEL => 'Kneeing', + UNIT_STAND_STATE_SUBMERGED => 'Submerged' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', - UNIT_BYTE1_FLAG_HOVER => 'Hovering', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'ground animations', + UNIT_BYTE1_ANIM_TIER_SWIM => 'swimming animations', + UNIT_BYTE1_ANIM_TIER_HOVER => 'hovering animations', + UNIT_BYTE1_ANIM_TIER_FLY => 'flying animations', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'submerged animations' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], - SAI_EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], - SAI_EVENT_AGGRO => ['On Aggro', null], - SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_DEATH => ['On death', null], - SAI_EVENT_EVADE => ['When evading', null], - SAI_EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_RANGE => ['On target at %11$sm', 'Repeat every %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_RESPAWN => ['On respawn', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %11$s%% health', 'Repeat every %s'], - SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['On target at %11$s%% mana', 'Repeat every %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], - SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], - SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_RESET => ['On reset', null], - SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], - SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], - SAI_EVENT_AI_INIT => ['AI initialized', null], - SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], - SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], - SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_LINK => ['After Event %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], - SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], - SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], - SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %12$s%%', 'Repeat every %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], + SmartEvent::EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], + SmartEvent::EVENT_AGGRO => ['On Aggro', ''], + SmartEvent::EVENT_KILL => ['On killing (%3$d)?a player:(%4$d)?[npc=%4$d]:any creature;;', 'Cooldown: %s'], + SmartEvent::EVENT_DEATH => ['On death', ''], + SmartEvent::EVENT_EVADE => ['When evading', ''], + SmartEvent::EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_RANGE => ['On #target# at %11$sm', 'Repeat every %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['While out of combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_RESPAWN => ['On respawn(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['On #target# at %11$s%% health', 'Repeat every %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['On #target# at %11$s%% mana', 'Repeat every %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Arriving at home coordinates', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_RESET => ['On reset', ''], + SmartEvent::EVENT_IC_LOS => ['While in combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['When charming #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Ended (%1$d)?%11$s:movement; on point #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Summoned npc(%1$d)? [npc=%1$d]:; despawned', 'Cooldown: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['On corpse despawn', ''], + SmartEvent::EVENT_AI_INIT => ['AI initialized', ''], + SmartEvent::EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Start pathing from (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['On activation', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['On being summoned', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_LINK => ['After Event %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['On being spawned for the first time', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Finished following', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] started', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] ended', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['State changed to: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Event #[b]%1$d[/b] defined in template was trigered', ''], + SmartEvent::EVENT_ACTION_DONE => ['Action #[b]%1$d[/b] requested by other script', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['SpellClick was triggered', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %11$s%%', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null, + SmartEvent::EVENT_SCENE_COMPLETE => null, + SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['My summoned (%1$d)?[npc=%1$d]:NPC; died', 'Cooldown: %s'], + SmartEvent::EVENT_ON_SPELL_CAST => ['On [spell=%1$d] cast success', 'Cooldown: %s'], + 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', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', - SAI_EVENT_FLAG_NO_RESET => 'No Reset', - SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + SmartEvent::FLAG_NO_REPEAT => 'No Repeat', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Raid', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Raid', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Raid', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Raid', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'No Reset', + SmartEvent::FLAG_WHILE_CHARMED => 'While Charmed' ), 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], - SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End Emote.;', null], - SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], - SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$s:;(%4$d)?, attacking invoker.:;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], - SAI_ACTION_EVADE => ['#target# evades to (%1$d)?last stored:respawn; position.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], - SAI_ACTION_COMBAT_STOP => ['End current combat.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', 'Only own auras'], - SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle\u003A %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], - SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]%1$d[/b] to [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Die…   painfully.', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], - SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become inviniable below (%2$d)?%2$d%%:%1$d; HP.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], - SAI_ACTION_ATTACK_STOP => ['Stop attacking.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], - SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %7$s:; at #target#.', 'Despawn linked to summoner'], - SAI_ACTION_KILL_UNIT => ['#target# dies!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s:;', 'Repeatable'], - SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$s', null], - SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:.;(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], - SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], - SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], - SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], - SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], - SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], - SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], - SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], - SAI_ACTION_SELF_CAST => ['Self casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], - SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], - SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], - SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], - SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %7$s.', 'Forced'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawn %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Change skybox in [zone=%1$d] to #[b]%2$d[/b].', 'Transition: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %7$s at %3$d%% intensity.', null], // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Say:#target# says; (%%11$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to (%3$d)?#target#:invoker;%11$s', 'Duration: %s'], + SmartAction::ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%11$d]:Reset faction of #target#;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Play sound to (%2$d)?invoking player:all players in sight;:[div][sound=%1$d][/div]', 'Played by environment.'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End emote state.;', ''], + SmartAction::ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# becomes %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s to #target#.', ''], + SmartAction::ACTION_CAST => ['Cast [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %11$s:;(%4$d)?, attacking invoker.:;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Modify the threat of all opponents by %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# evades to (%1$d)?last stored:spawn; position.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for group of #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['End current combat.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Remove(%2$d)? %2$d charges of:;(%1$d)? all auras: [spell=%1$d]\'s aura; from #target#.', 'Only own auras'], + SmartAction::ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.(%12$d)?Exploration event of [quest=%4$d] will be satisfied.:;(%13$d)? A kill of [npc=%4$d] will be credited.:;', '(%11$d)?Follow angle\u003A %7$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Pick random Event Phase from %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Reset #target#.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to (%11$s)?%11$s:#target#;.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Set instance (%3$d)?BossState:data field; #[b]%1$d[/b] to [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Store GUID of #target# in instance data field #[b]%1$d[/b].', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d].', 'Use level from [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Die…   painfully.', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Call for help within %1$dm.', 'Use default help emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Sheath %11$s weapons.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %11$s:;(%2$d)? and then respawn after %12$s:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%11$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Stop attacking.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', ''], + SmartAction::ACTION_ATTACK_START => ['Start attacking #target#.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %11$s:; at #target#.', 'Despawn not linked to summoner'], + SmartAction::ACTION_KILL_UNIT => ['#target# dies!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%11$s[/span] to [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Run:Walk; on waypoint path #[b]%2$d[/b](%4$d)? and be bound to [quest=%4$d]:;.(%5$d)? Despawn after %11$s:;', 'Repeatable(%12$s)? [DEPRECATED] React %12$s on path:;'], + SmartAction::ACTION_WP_PAUSE => ['Pause waypoint path for %11$s', ''], + SmartAction::ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %11$s:.; (%2$d)?[quest=%2$d]:quest from start action; (%3$d)?fails:is completed;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', ''], + SmartAction::ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', ''], + SmartAction::ACTION_TELEPORT => ['#target# is teleported to [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]World Coordinates[/lightbox].', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Set:Increase; Counter #[b]%1$d[/b] of #target# (%3$d)?to:by; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Continue on waypoint path.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Set orientation to (%11$s)?face %11$s:Home Position;.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%11$s)? after %11$s:;.', 'Repeat every %s'], + SmartAction::ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Equip %11$s:Unequip non-standard items;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Call Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url]. Updates %11$s.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Add %11$s npc flags to #target#.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Remove %11$s npc flags from #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# says (%11$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] %11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s casts [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Move #target# to a random point within %1$dm:#target# ends idle movement;.', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Including instant spells.:;(%3$d)? Including delayed spells.:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %11$s from #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Set Home Position to (%11$d)?current position.:fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Set GameObject Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Add GameObject Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %11$s from #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['%11$s is set to [b]%2$d[/b] for #target#.', ''], + SmartAction::ACTION_ADD_POWER => ['Add [b]%2$d[/b] %11$s to #target#.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %11$s from #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Start [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Play a random sound to (%5$d)?invoking player:all players in sight;:%11$s', 'Played by environment.'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %11$s.', 'Apply Looted Corpse Decay Factor'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Set gameobject state to %11$s.'. ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%11$s[/b] from #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', ''], + SmartAction::ACTION_FLEE => ['#target# flees for assistance for %11$s.', ''], + SmartAction::ACTION_ADD_THREAT => ['Modify threat level of #target# by %11$+d points.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %11$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %11$s.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %11$s.', 'Forced'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawn %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Change skybox in [zone=%1$d] to #[b]%3$d[/b]:Reset skybox in [zone=%1$d];.', 'Transition: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %11$s at %3$d%% intensity.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Enable:Disable; hovering.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Enable:Disable; #target# immunity to players.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Enable:Disable; #target# immunity to NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Prevent:Allow; interaction with #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Activate Gameobject (Method: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Add #target# as target to list #%1$d.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'self', - SAI_TARGET_VICTIM => 'current target', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', - SAI_TARGET_HOSTILE_RANDOM => 'random target', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', - SAI_TARGET_ACTION_INVOKER => 'Invoker', - SAI_TARGET_POSITION => 'world coordinates', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%4$d)? (max. %4$d targets):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; with GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_STORED => 'previously stored targets', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%4$d)? (max. %4$d targets):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; with GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_INVOKER_PARTY => 'Invokers party', - SAI_TARGET_PLAYER_RANGE => 'random player within %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'random player within %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', - SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', - SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', - SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', - SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', - SAI_TARGET_VEHICLE_PASSENGER => 'accessory in Invokers vehicle in (%1$d)?seat %11$s:all seats;', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, arbitrary gameobject; within %11$sm' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'self', + SmartTarget::TARGET_VICTIM => 'Opponent', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '2nd (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => 'last (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM => 'random (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Invoker', + SmartTarget::TARGET_POSITION => 'world coordinates', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?instance of [npc=%1$d]:any creature; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?instance of [npc=%1$d]:any creature;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_STORED => 'previously stored targets', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?instance of [object=%1$d]:any object; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?instance of [object=%1$d]:any object;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Invokers party', + SmartTarget::TARGET_PLAYER_RANGE => 'all players within %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'all players within %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:creature; within (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:gameobject; within (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'owner or summoner', + SmartTarget::TARGET_THREAT_LIST => 'all units(%1$d)? within %1$dm:; engaged in combat with me', + SmartTarget::TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SmartTarget::TARGET_FARTHEST => 'furthest engaged (%2$d)?player:unit; within %1$dm(%3$d)? and line of sight:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'vehicle accessory in (%1$d)?seat %11$s:all seats;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, gameobject; within %11$sm' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', - SAI_CAST_FLAG_TRIGGERED => 'Triggered', - SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', - SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SmartAI::CAST_FLAG_TRIGGERED => 'Triggered', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura missing', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Combat movement' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' ), - 'GOStates' => ['active', 'ready', 'active alternative'], - 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], - 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], - 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], - 'sheaths' => ['all', 'melee', 'ranged'], - 'saiUpdate' => ['out of combat', 'in combat', 'always'], - 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], - 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'GOStates' => ['active', 'ready', 'destroyed'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'hostilityModes' => ['hostile', 'non-hostile', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unknown entity[/b]', + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unknown resource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unknown HostilityMode #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unknown MotionType #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unknown entity[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 08bef730..2228836f 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -511,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' ), 'bytes1' => array( -/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Standing', + UNIT_STAND_STATE_SIT => 'Sitting on ground', + UNIT_STAND_STATE_SIT_CHAIR => 'Sitting on chair', + UNIT_STAND_STATE_SLEEP => 'Sleeping', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Sitting on low chair', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Sitting on medium chair', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Sitting on high chair', + UNIT_STAND_STATE_DEAD => 'Dead', + UNIT_STAND_STATE_KNEEL => 'Kneeing', + UNIT_STAND_STATE_SUBMERGED => 'Submerged' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', - UNIT_BYTE1_FLAG_HOVER => 'Hovering', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'ground animations', + UNIT_BYTE1_ANIM_TIER_SWIM => 'swimming animations', + UNIT_BYTE1_ANIM_TIER_HOVER => 'hovering animations', + UNIT_BYTE1_ANIM_TIER_FLY => 'flying animations', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'submerged animations' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], - SAI_EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], - SAI_EVENT_AGGRO => ['On Aggro', null], - SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_DEATH => ['On death', null], - SAI_EVENT_EVADE => ['When evading', null], - SAI_EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_RANGE => ['On target at %11$sm', 'Repeat every %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_RESPAWN => ['On respawn', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %11$s%% health', 'Repeat every %s'], - SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['On target at %11$s%% mana', 'Repeat every %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], - SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], - SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_RESET => ['On reset', null], - SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], - SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], - SAI_EVENT_AI_INIT => ['AI initialized', null], - SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], - SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], - SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_LINK => ['After Event %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], - SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], - SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], - SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %12$s%%', 'Repeat every %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], + SmartEvent::EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], + SmartEvent::EVENT_AGGRO => ['On Aggro', ''], + SmartEvent::EVENT_KILL => ['On killing (%3$d)?a player:(%4$d)?[npc=%4$d]:any creature;;', 'Cooldown: %s'], + SmartEvent::EVENT_DEATH => ['On death', ''], + SmartEvent::EVENT_EVADE => ['When evading', ''], + SmartEvent::EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_RANGE => ['On #target# at %11$sm', 'Repeat every %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['While out of combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_RESPAWN => ['On respawn(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['On #target# at %11$s%% health', 'Repeat every %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['On #target# at %11$s%% mana', 'Repeat every %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Arriving at home coordinates', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_RESET => ['On reset', ''], + SmartEvent::EVENT_IC_LOS => ['While in combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['When charming #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Ended (%1$d)?%11$s:movement; on point #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Summoned npc(%1$d)? [npc=%1$d]:; despawned', 'Cooldown: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['On corpse despawn', ''], + SmartEvent::EVENT_AI_INIT => ['AI initialized', ''], + SmartEvent::EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Start pathing from (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['On activation', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['On being summoned', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_LINK => ['After Event %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['On being spawned for the first time', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Finished following', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] started', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] ended', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['State changed to: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Event #[b]%1$d[/b] defined in template was trigered', ''], + SmartEvent::EVENT_ACTION_DONE => ['Action #[b]%1$d[/b] requested by other script', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['SpellClick was triggered', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %11$s%%', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null, + SmartEvent::EVENT_SCENE_COMPLETE => null, + SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['My summoned (%1$d)?[npc=%1$d]:NPC; died', 'Cooldown: %s'], + SmartEvent::EVENT_ON_SPELL_CAST => ['On [spell=%1$d] cast success', 'Cooldown: %s'], + 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', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', - SAI_EVENT_FLAG_NO_RESET => 'No Reset', - SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + SmartEvent::FLAG_NO_REPEAT => 'No Repeat', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Raid', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Raid', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Raid', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Raid', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'No Reset', + SmartEvent::FLAG_WHILE_CHARMED => 'While Charmed' ), 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], - SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End Emote.;', null], - SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], - SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$s:;(%4$d)?, attacking invoker.:;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], - SAI_ACTION_EVADE => ['#target# evades to (%1$d)?last stored:respawn; position.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], - SAI_ACTION_COMBAT_STOP => ['End current combat.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', 'Only own auras'], - SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle\u003A %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], - SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]%1$d[/b] to [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Die…   painfully.', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], - SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become inviniable below (%2$d)?%2$d%%:%1$d; HP.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], - SAI_ACTION_ATTACK_STOP => ['Stop attacking.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], - SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %7$s:; at #target#.', 'Despawn linked to summoner'], - SAI_ACTION_KILL_UNIT => ['#target# dies!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s:;', 'Repeatable'], - SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$s', null], - SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:.;(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], - SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], - SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], - SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], - SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], - SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], - SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], - SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], - SAI_ACTION_SELF_CAST => ['Self casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], - SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], - SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], - SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], - SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %7$s.', 'Forced'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawn %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Change skybox in [zone=%1$d] to #[b]%2$d[/b].', 'Transition: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %7$s at %3$d%% intensity.', null], // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Say:#target# says; (%%11$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to (%3$d)?#target#:invoker;%11$s', 'Duration: %s'], + SmartAction::ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%11$d]:Reset faction of #target#;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Play sound to (%2$d)?invoking player:all players in sight;:[div][sound=%1$d][/div]', 'Played by environment.'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End emote state.;', ''], + SmartAction::ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# becomes %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s to #target#.', ''], + SmartAction::ACTION_CAST => ['Cast [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %11$s:;(%4$d)?, attacking invoker.:;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Modify the threat of all opponents by %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# evades to (%1$d)?last stored:spawn; position.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for group of #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['End current combat.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Remove(%2$d)? %2$d charges of:;(%1$d)? all auras: [spell=%1$d]\'s aura; from #target#.', 'Only own auras'], + SmartAction::ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.(%12$d)?Exploration event of [quest=%4$d] will be satisfied.:;(%13$d)? A kill of [npc=%4$d] will be credited.:;', '(%11$d)?Follow angle\u003A %7$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Pick random Event Phase from %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Reset #target#.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to (%11$s)?%11$s:#target#;.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Set instance (%3$d)?BossState:data field; #[b]%1$d[/b] to [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Store GUID of #target# in instance data field #[b]%1$d[/b].', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d].', 'Use level from [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Die…   painfully.', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Call for help within %1$dm.', 'Use default help emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Sheath %11$s weapons.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %11$s:;(%2$d)? and then respawn after %12$s:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%11$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Stop attacking.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', ''], + SmartAction::ACTION_ATTACK_START => ['Start attacking #target#.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %11$s:; at #target#.', 'Despawn not linked to summoner'], + SmartAction::ACTION_KILL_UNIT => ['#target# dies!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%11$s[/span] to [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Run:Walk; on waypoint path #[b]%2$d[/b](%4$d)? and be bound to [quest=%4$d]:;.(%5$d)? Despawn after %11$s:;', 'Repeatable(%12$s)? [DEPRECATED] React %12$s on path:;'], + SmartAction::ACTION_WP_PAUSE => ['Pause waypoint path for %11$s', ''], + SmartAction::ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %11$s:.; (%2$d)?[quest=%2$d]:quest from start action; (%3$d)?fails:is completed;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', ''], + SmartAction::ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', ''], + SmartAction::ACTION_TELEPORT => ['#target# is teleported to [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]World Coordinates[/lightbox].', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Set:Increase; Counter #[b]%1$d[/b] of #target# (%3$d)?to:by; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Continue on waypoint path.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Set orientation to (%11$s)?face %11$s:Home Position;.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%11$s)? after %11$s:;.', 'Repeat every %s'], + SmartAction::ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Equip %11$s:Unequip non-standard items;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Call Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url]. Updates %11$s.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Add %11$s npc flags to #target#.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Remove %11$s npc flags from #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# says (%11$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] %11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s casts [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Move #target# to a random point within %1$dm:#target# ends idle movement;.', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Including instant spells.:;(%3$d)? Including delayed spells.:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %11$s from #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Set Home Position to (%11$d)?current position.:fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Set GameObject Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Add GameObject Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %11$s from #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['%11$s is set to [b]%2$d[/b] for #target#.', ''], + SmartAction::ACTION_ADD_POWER => ['Add [b]%2$d[/b] %11$s to #target#.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %11$s from #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Start [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Play a random sound to (%5$d)?invoking player:all players in sight;:%11$s', 'Played by environment.'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %11$s.', 'Apply Looted Corpse Decay Factor'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Set gameobject state to %11$s.'. ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%11$s[/b] from #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', ''], + SmartAction::ACTION_FLEE => ['#target# flees for assistance for %11$s.', ''], + SmartAction::ACTION_ADD_THREAT => ['Modify threat level of #target# by %11$+d points.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %11$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %11$s.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %11$s.', 'Forced'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawn %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Change skybox in [zone=%1$d] to #[b]%3$d[/b]:Reset skybox in [zone=%1$d];.', 'Transition: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %11$s at %3$d%% intensity.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Enable:Disable; hovering.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Enable:Disable; #target# immunity to players.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Enable:Disable; #target# immunity to NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Prevent:Allow; interaction with #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Activate Gameobject (Method: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Add #target# as target to list #%1$d.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'self', - SAI_TARGET_VICTIM => 'current target', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', - SAI_TARGET_HOSTILE_RANDOM => 'random target', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', - SAI_TARGET_ACTION_INVOKER => 'Invoker', - SAI_TARGET_POSITION => 'world coordinates', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%4$d)? (max. %4$d targets):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; with GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_STORED => 'previously stored targets', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%4$d)? (max. %4$d targets):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; with GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_INVOKER_PARTY => 'Invokers party', - SAI_TARGET_PLAYER_RANGE => 'random player within %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'random player within %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', - SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', - SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', - SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', - SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', - SAI_TARGET_VEHICLE_PASSENGER => 'accessory in Invokers vehicle in (%1$d)?seat %11$s:all seats;', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, arbitrary gameobject; within %11$sm' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'self', + SmartTarget::TARGET_VICTIM => 'Opponent', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '2nd (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => 'last (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM => 'random (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Invoker', + SmartTarget::TARGET_POSITION => 'world coordinates', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?instance of [npc=%1$d]:any creature; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?instance of [npc=%1$d]:any creature;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_STORED => 'previously stored targets', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?instance of [object=%1$d]:any object; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?instance of [object=%1$d]:any object;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Invokers party', + SmartTarget::TARGET_PLAYER_RANGE => 'all players within %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'all players within %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:creature; within (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:gameobject; within (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'owner or summoner', + SmartTarget::TARGET_THREAT_LIST => 'all units(%1$d)? within %1$dm:; engaged in combat with me', + SmartTarget::TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SmartTarget::TARGET_FARTHEST => 'furthest engaged (%2$d)?player:unit; within %1$dm(%3$d)? and line of sight:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'vehicle accessory in (%1$d)?seat %11$s:all seats;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, gameobject; within %11$sm' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', - SAI_CAST_FLAG_TRIGGERED => 'Triggered', - SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', - SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SmartAI::CAST_FLAG_TRIGGERED => 'Triggered', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura missing', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Combat movement' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' ), - 'GOStates' => ['active', 'ready', 'active alternative'], - 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], - 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], - 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], - 'sheaths' => ['all', 'melee', 'ranged'], - 'saiUpdate' => ['out of combat', 'in combat', 'always'], - 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], - 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'GOStates' => ['active', 'ready', 'destroyed'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'hostilityModes' => ['hostile', 'non-hostile', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unknown entity[/b]', + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unknown resource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unknown HostilityMode #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unknown MotionType #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unknown entity[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index d0f76aba..3d65f16e 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -511,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' ), 'bytes1' => array( -/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Standing', + UNIT_STAND_STATE_SIT => 'Sitting on ground', + UNIT_STAND_STATE_SIT_CHAIR => 'Sitting on chair', + UNIT_STAND_STATE_SLEEP => 'Sleeping', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Sitting on low chair', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Sitting on medium chair', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Sitting on high chair', + UNIT_STAND_STATE_DEAD => 'Dead', + UNIT_STAND_STATE_KNEEL => 'Kneeing', + UNIT_STAND_STATE_SUBMERGED => 'Submerged' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', - UNIT_BYTE1_FLAG_HOVER => 'Hovering', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'ground animations', + UNIT_BYTE1_ANIM_TIER_SWIM => 'swimming animations', + UNIT_BYTE1_ANIM_TIER_HOVER => 'hovering animations', + UNIT_BYTE1_ANIM_TIER_FLY => 'flying animations', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'submerged animations' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], - SAI_EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], - SAI_EVENT_AGGRO => ['On Aggro', null], - SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_DEATH => ['On death', null], - SAI_EVENT_EVADE => ['When evading', null], - SAI_EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_RANGE => ['On target at %11$sm', 'Repeat every %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_RESPAWN => ['On respawn', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %11$s%% health', 'Repeat every %s'], - SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['On target at %11$s%% mana', 'Repeat every %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], - SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], - SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_RESET => ['On reset', null], - SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], - SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], - SAI_EVENT_AI_INIT => ['AI initialized', null], - SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], - SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], - SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_LINK => ['After Event %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], - SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], - SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], - SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %12$s%%', 'Repeat every %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], + SmartEvent::EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], + SmartEvent::EVENT_AGGRO => ['On Aggro', ''], + SmartEvent::EVENT_KILL => ['On killing (%3$d)?a player:(%4$d)?[npc=%4$d]:any creature;;', 'Cooldown: %s'], + SmartEvent::EVENT_DEATH => ['On death', ''], + SmartEvent::EVENT_EVADE => ['When evading', ''], + SmartEvent::EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_RANGE => ['On #target# at %11$sm', 'Repeat every %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['While out of combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_RESPAWN => ['On respawn(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['On #target# at %11$s%% health', 'Repeat every %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['On #target# at %11$s%% mana', 'Repeat every %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Arriving at home coordinates', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_RESET => ['On reset', ''], + SmartEvent::EVENT_IC_LOS => ['While in combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['When charming #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Ended (%1$d)?%11$s:movement; on point #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Summoned npc(%1$d)? [npc=%1$d]:; despawned', 'Cooldown: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['On corpse despawn', ''], + SmartEvent::EVENT_AI_INIT => ['AI initialized', ''], + SmartEvent::EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Start pathing from (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['On activation', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['On being summoned', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_LINK => ['After Event %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['On being spawned for the first time', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Finished following', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] started', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] ended', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['State changed to: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Event #[b]%1$d[/b] defined in template was trigered', ''], + SmartEvent::EVENT_ACTION_DONE => ['Action #[b]%1$d[/b] requested by other script', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['SpellClick was triggered', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %11$s%%', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null, + SmartEvent::EVENT_SCENE_COMPLETE => null, + SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['My summoned (%1$d)?[npc=%1$d]:NPC; died', 'Cooldown: %s'], + SmartEvent::EVENT_ON_SPELL_CAST => ['On [spell=%1$d] cast success', 'Cooldown: %s'], + 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', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', - SAI_EVENT_FLAG_NO_RESET => 'No Reset', - SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + SmartEvent::FLAG_NO_REPEAT => 'No Repeat', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Raid', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Raid', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Raid', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Raid', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'No Reset', + SmartEvent::FLAG_WHILE_CHARMED => 'While Charmed' ), 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], - SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End Emote.;', null], - SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], - SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$s:;(%4$d)?, attacking invoker.:;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], - SAI_ACTION_EVADE => ['#target# evades to (%1$d)?last stored:respawn; position.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], - SAI_ACTION_COMBAT_STOP => ['End current combat.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', 'Only own auras'], - SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle\u003A %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], - SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]%1$d[/b] to [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Die…   painfully.', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], - SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become inviniable below (%2$d)?%2$d%%:%1$d; HP.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], - SAI_ACTION_ATTACK_STOP => ['Stop attacking.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], - SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %7$s:; at #target#.', 'Despawn linked to summoner'], - SAI_ACTION_KILL_UNIT => ['#target# dies!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s:;', 'Repeatable'], - SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$s', null], - SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:.;(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], - SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], - SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], - SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], - SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], - SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], - SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], - SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], - SAI_ACTION_SELF_CAST => ['Self casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], - SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], - SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], - SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], - SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %7$s.', 'Forced'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawn %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Change skybox in [zone=%1$d] to #[b]%2$d[/b].', 'Transition: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %7$s at %3$d%% intensity.', null], // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Say:#target# says; (%%11$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to (%3$d)?#target#:invoker;%11$s', 'Duration: %s'], + SmartAction::ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%11$d]:Reset faction of #target#;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Play sound to (%2$d)?invoking player:all players in sight;:[div][sound=%1$d][/div]', 'Played by environment.'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End emote state.;', ''], + SmartAction::ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# becomes %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s to #target#.', ''], + SmartAction::ACTION_CAST => ['Cast [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %11$s:;(%4$d)?, attacking invoker.:;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Modify the threat of all opponents by %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# evades to (%1$d)?last stored:spawn; position.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for group of #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['End current combat.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Remove(%2$d)? %2$d charges of:;(%1$d)? all auras: [spell=%1$d]\'s aura; from #target#.', 'Only own auras'], + SmartAction::ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.(%12$d)?Exploration event of [quest=%4$d] will be satisfied.:;(%13$d)? A kill of [npc=%4$d] will be credited.:;', '(%11$d)?Follow angle\u003A %7$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Pick random Event Phase from %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Reset #target#.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to (%11$s)?%11$s:#target#;.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Set instance (%3$d)?BossState:data field; #[b]%1$d[/b] to [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Store GUID of #target# in instance data field #[b]%1$d[/b].', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d].', 'Use level from [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Die…   painfully.', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Call for help within %1$dm.', 'Use default help emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Sheath %11$s weapons.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %11$s:;(%2$d)? and then respawn after %12$s:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%11$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Stop attacking.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', ''], + SmartAction::ACTION_ATTACK_START => ['Start attacking #target#.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %11$s:; at #target#.', 'Despawn not linked to summoner'], + SmartAction::ACTION_KILL_UNIT => ['#target# dies!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%11$s[/span] to [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Run:Walk; on waypoint path #[b]%2$d[/b](%4$d)? and be bound to [quest=%4$d]:;.(%5$d)? Despawn after %11$s:;', 'Repeatable(%12$s)? [DEPRECATED] React %12$s on path:;'], + SmartAction::ACTION_WP_PAUSE => ['Pause waypoint path for %11$s', ''], + SmartAction::ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %11$s:.; (%2$d)?[quest=%2$d]:quest from start action; (%3$d)?fails:is completed;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', ''], + SmartAction::ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', ''], + SmartAction::ACTION_TELEPORT => ['#target# is teleported to [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]World Coordinates[/lightbox].', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Set:Increase; Counter #[b]%1$d[/b] of #target# (%3$d)?to:by; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Continue on waypoint path.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Set orientation to (%11$s)?face %11$s:Home Position;.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%11$s)? after %11$s:;.', 'Repeat every %s'], + SmartAction::ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Equip %11$s:Unequip non-standard items;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Call Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url]. Updates %11$s.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Add %11$s npc flags to #target#.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Remove %11$s npc flags from #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# says (%11$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] %11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s casts [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Move #target# to a random point within %1$dm:#target# ends idle movement;.', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Including instant spells.:;(%3$d)? Including delayed spells.:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %11$s from #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Set Home Position to (%11$d)?current position.:fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Set GameObject Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Add GameObject Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %11$s from #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['%11$s is set to [b]%2$d[/b] for #target#.', ''], + SmartAction::ACTION_ADD_POWER => ['Add [b]%2$d[/b] %11$s to #target#.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %11$s from #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Start [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Play a random sound to (%5$d)?invoking player:all players in sight;:%11$s', 'Played by environment.'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %11$s.', 'Apply Looted Corpse Decay Factor'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Set gameobject state to %11$s.'. ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%11$s[/b] from #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', ''], + SmartAction::ACTION_FLEE => ['#target# flees for assistance for %11$s.', ''], + SmartAction::ACTION_ADD_THREAT => ['Modify threat level of #target# by %11$+d points.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %11$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %11$s.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %11$s.', 'Forced'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawn %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Change skybox in [zone=%1$d] to #[b]%3$d[/b]:Reset skybox in [zone=%1$d];.', 'Transition: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %11$s at %3$d%% intensity.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Enable:Disable; hovering.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Enable:Disable; #target# immunity to players.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Enable:Disable; #target# immunity to NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Prevent:Allow; interaction with #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Activate Gameobject (Method: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Add #target# as target to list #%1$d.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'self', - SAI_TARGET_VICTIM => 'current target', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', - SAI_TARGET_HOSTILE_RANDOM => 'random target', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', - SAI_TARGET_ACTION_INVOKER => 'Invoker', - SAI_TARGET_POSITION => 'world coordinates', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%4$d)? (max. %4$d targets):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; with GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_STORED => 'previously stored targets', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%4$d)? (max. %4$d targets):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; with GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_INVOKER_PARTY => 'Invokers party', - SAI_TARGET_PLAYER_RANGE => 'random player within %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'random player within %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', - SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', - SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', - SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', - SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', - SAI_TARGET_VEHICLE_PASSENGER => 'accessory in Invokers vehicle in (%1$d)?seat %11$s:all seats;', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, arbitrary gameobject; within %11$sm' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'self', + SmartTarget::TARGET_VICTIM => 'Opponent', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '2nd (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => 'last (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM => 'random (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Invoker', + SmartTarget::TARGET_POSITION => 'world coordinates', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?instance of [npc=%1$d]:any creature; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?instance of [npc=%1$d]:any creature;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_STORED => 'previously stored targets', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?instance of [object=%1$d]:any object; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?instance of [object=%1$d]:any object;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Invokers party', + SmartTarget::TARGET_PLAYER_RANGE => 'all players within %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'all players within %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:creature; within (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:gameobject; within (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'owner or summoner', + SmartTarget::TARGET_THREAT_LIST => 'all units(%1$d)? within %1$dm:; engaged in combat with me', + SmartTarget::TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SmartTarget::TARGET_FARTHEST => 'furthest engaged (%2$d)?player:unit; within %1$dm(%3$d)? and line of sight:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'vehicle accessory in (%1$d)?seat %11$s:all seats;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, gameobject; within %11$sm' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', - SAI_CAST_FLAG_TRIGGERED => 'Triggered', - SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', - SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SmartAI::CAST_FLAG_TRIGGERED => 'Triggered', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura missing', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Combat movement' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' ), - 'GOStates' => ['active', 'ready', 'active alternative'], - 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], - 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], - 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], - 'sheaths' => ['all', 'melee', 'ranged'], - 'saiUpdate' => ['out of combat', 'in combat', 'always'], - 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], - 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'GOStates' => ['active', 'ready', 'destroyed'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'hostilityModes' => ['hostile', 'non-hostile', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unknown entity[/b]', + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unknown resource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unknown HostilityMode #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unknown MotionType #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unknown entity[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php index 26196b87..03316c43 100644 --- a/localization/locale_zhcn.php +++ b/localization/locale_zhcn.php @@ -511,324 +511,365 @@ $lang = array( UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' ), 'bytes1' => array( -/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* +/*idx:0*/ array( + UNIT_STAND_STATE_STAND => 'Standing', + UNIT_STAND_STATE_SIT => 'Sitting on ground', + UNIT_STAND_STATE_SIT_CHAIR => 'Sitting on chair', + UNIT_STAND_STATE_SLEEP => 'Sleeping', + UNIT_STAND_STATE_SIT_LOW_CHAIR => 'Sitting on low chair', + UNIT_STAND_STATE_SIT_MEDIUM_CHAIR => 'Sitting on medium chair', + UNIT_STAND_STATE_SIT_HIGH_CHAIR => 'Sitting on high chair', + UNIT_STAND_STATE_DEAD => 'Dead', + UNIT_STAND_STATE_KNEEL => 'Kneeing', + UNIT_STAND_STATE_SUBMERGED => 'Submerged' + ), null, /*idx:2*/ array( - UNIT_STAND_FLAGS_UNK1 => 'UNK-1', - UNIT_STAND_FLAGS_CREEP => 'Creep', - UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', - UNIT_STAND_FLAGS_UNK4 => 'UNK-4', - UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + UNIT_VIS_FLAGS_UNK1 => 'UNK-1', + UNIT_VIS_FLAGS_CREEP => 'Creep', + UNIT_VIS_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_VIS_FLAGS_UNK4 => 'UNK-4', + UNIT_VIS_FLAGS_UNK5 => 'UNK-5' ), /*idx:3*/ array( - UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', - UNIT_BYTE1_FLAG_HOVER => 'Hovering', - UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + UNIT_BYTE1_ANIM_TIER_GROUND => 'ground animations', + UNIT_BYTE1_ANIM_TIER_SWIM => 'swimming animations', + UNIT_BYTE1_ANIM_TIER_HOVER => 'hovering animations', + UNIT_BYTE1_ANIM_TIER_FLY => 'flying animations', + UNIT_BYTE1_ANIM_TIER_SUMBERGED => 'submerged animations' ), + 'bytesIdx' => ['StandState', null, 'VisFlags', 'AnimTier'], 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' ) ), 'smartAI' => array( 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', - 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', 'events' => array( - SAI_EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], - SAI_EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], - SAI_EVENT_AGGRO => ['On Aggro', null], - SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_DEATH => ['On death', null], - SAI_EVENT_EVADE => ['When evading', null], - SAI_EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_RANGE => ['On target at %11$sm', 'Repeat every %s'], -/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_RESPAWN => ['On respawn', null], - SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %11$s%% health', 'Repeat every %s'], - SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], - SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], - SAI_EVENT_TARGET_MANA_PCT => ['On target at %11$s%% mana', 'Repeat every %s'], - SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], -/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], - SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], - SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], - SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], - SAI_EVENT_RESET => ['On reset', null], - SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], - SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], - SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], -/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], - SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], - SAI_EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], - SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], - SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], - SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], - SAI_EVENT_AI_INIT => ['AI initialized', null], - SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], - SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], -/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - null, - null, - null, - null, - null, - SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], - null, - null, - null, -/* 50*/ null, - null, - SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], - SAI_EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], - SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], - SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], - SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], -/* 60*/ SAI_EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], - SAI_EVENT_LINK => ['After Event %11$s', null], - SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], - SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], - SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], - SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], - SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', null], - SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], - SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], - SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], -/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], - SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], - SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], - SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], - SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %12$s%%', 'Repeat every %s'], - SAI_EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], - SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + SmartEvent::EVENT_UPDATE_IC => ['(%12$d)?:When in combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_UPDATE_OOC => ['(%12$d)?:When out of combat, ;(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_HEALTH_PCT => ['At %11$s%% Health', 'Repeat every %s'], + SmartEvent::EVENT_MANA_PCT => ['At %11$s%% Mana', 'Repeat every %s'], + SmartEvent::EVENT_AGGRO => ['On Aggro', ''], + SmartEvent::EVENT_KILL => ['On killing (%3$d)?a player:(%4$d)?[npc=%4$d]:any creature;;', 'Cooldown: %s'], + SmartEvent::EVENT_DEATH => ['On death', ''], + SmartEvent::EVENT_EVADE => ['When evading', ''], + SmartEvent::EVENT_SPELLHIT => ['When hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_RANGE => ['On #target# at %11$sm', 'Repeat every %s'], +/* 10*/ SmartEvent::EVENT_OOC_LOS => ['While out of combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_RESPAWN => ['On respawn(%11$s)? in %11$s:;(%12$d)? in [zone=%12$d]:;', ''], + SmartEvent::EVENT_TARGET_HEALTH_PCT => ['On #target# at %11$s%% health', 'Repeat every %s'], + SmartEvent::EVENT_VICTIM_CASTING => ['#target# is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SmartEvent::EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SmartEvent::EVENT_TARGET_MANA_PCT => ['On #target# at %11$s%% mana', 'Repeat every %s'], + SmartEvent::EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], +/* 20*/ SmartEvent::EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', 'Cooldown: %s'], + SmartEvent::EVENT_REACHED_HOME => ['Arriving at home coordinates', ''], + SmartEvent::EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SmartEvent::EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SmartEvent::EVENT_RESET => ['On reset', ''], + SmartEvent::EVENT_IC_LOS => ['While in combat,(%11$s)? %11$s:; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SmartEvent::EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SmartEvent::EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', ''], +/* 30*/ SmartEvent::EVENT_CHARMED_TARGET => ['When charming #target#', ''], + SmartEvent::EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%11$s)?%11$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SmartEvent::EVENT_DAMAGED => ['After taking %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_DAMAGED_TARGET => ['After #target# took %11$s points of damage', 'Repeat every %s'], + SmartEvent::EVENT_MOVEMENTINFORM => ['Ended (%1$d)?%11$s:movement; on point #[b]%2$d[/b]', ''], + SmartEvent::EVENT_SUMMON_DESPAWNED => ['Summoned npc(%1$d)? [npc=%1$d]:; despawned', 'Cooldown: %s'], + SmartEvent::EVENT_CORPSE_REMOVED => ['On corpse despawn', ''], + SmartEvent::EVENT_AI_INIT => ['AI initialized', ''], + SmartEvent::EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_WAYPOINT_START => ['Start pathing from (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], +/* 40*/ SmartEvent::EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TRANSPORT_ADDPLAYER => null, + SmartEvent::EVENT_TRANSPORT_ADDCREATURE => null, + SmartEvent::EVENT_TRANSPORT_REMOVE_PLAYER => null, + SmartEvent::EVENT_TRANSPORT_RELOCATE => null, + SmartEvent::EVENT_INSTANCE_PLAYER_ENTER => null, + SmartEvent::EVENT_AREATRIGGER_ONTRIGGER => ['On activation', ''], + SmartEvent::EVENT_QUEST_ACCEPTED => null, + SmartEvent::EVENT_QUEST_OBJ_COMPLETION => null, + SmartEvent::EVENT_QUEST_COMPLETION => null, +/* 50*/ SmartEvent::EVENT_QUEST_REWARDED => null, + SmartEvent::EVENT_QUEST_FAIL => null, + SmartEvent::EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', ''], + SmartEvent::EVENT_RECEIVE_HEAL => ['Received %11$s points of healing', 'Cooldown: %s'], + SmartEvent::EVENT_JUST_SUMMONED => ['On being summoned', ''], + SmartEvent::EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', ''], + SmartEvent::EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', ''], +/* 60*/ SmartEvent::EVENT_UPDATE => ['(%11$s)?After %11$s:Instantly;', 'Repeat every %s'], + SmartEvent::EVENT_LINK => ['After Event %11$s', ''], + SmartEvent::EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%11$s)?[span class=q1]%11$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', ''], + SmartEvent::EVENT_JUST_CREATED => ['On being spawned for the first time', ''], + SmartEvent::EVENT_GOSSIP_HELLO => ['Opening Gossip', '(%1$d)?onGossipHello:;(%2$d)?onReportUse:;'], + SmartEvent::EVENT_FOLLOW_COMPLETED => ['Finished following', ''], + SmartEvent::EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %11$s', ''], + SmartEvent::EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SmartEvent::EVENT_GAME_EVENT_START => ['[event=%1$d] started', ''], + SmartEvent::EVENT_GAME_EVENT_END => ['[event=%1$d] ended', ''], +/* 70*/ SmartEvent::EVENT_GO_LOOT_STATE_CHANGED => ['State changed to: %11$s', ''], + SmartEvent::EVENT_GO_EVENT_INFORM => ['Event #[b]%1$d[/b] defined in template was trigered', ''], + SmartEvent::EVENT_ACTION_DONE => ['Action #[b]%1$d[/b] requested by other script', ''], + SmartEvent::EVENT_ON_SPELLCLICK => ['SpellClick was triggered', ''], + SmartEvent::EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %11$s%%', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_CREATURE => ['[npc=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_DISTANCE_GAMEOBJECT => ['[object=%11$d](%1$d)? [small class=q0](GUID\u003A %1$d)[/small]:; is within %3$dm', 'Repeat every %s'], + SmartEvent::EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', 'Cooldown: %s'], + SmartEvent::EVENT_SCENE_START => null, + SmartEvent::EVENT_SCENE_TRIGGER => null, +/* 80*/ SmartEvent::EVENT_SCENE_CANCEL => null, + SmartEvent::EVENT_SCENE_COMPLETE => null, + SmartEvent::EVENT_SUMMONED_UNIT_DIES => ['My summoned (%1$d)?[npc=%1$d]:NPC; died', 'Cooldown: %s'], + SmartEvent::EVENT_ON_SPELL_CAST => ['On [spell=%1$d] cast success', 'Cooldown: %s'], + 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', ''], ), 'eventFlags' => array( - SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', - SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', - SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', - SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', - SAI_EVENT_FLAG_NO_RESET => 'No Reset', - SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + SmartEvent::FLAG_NO_REPEAT => 'No Repeat', + SmartEvent::FLAG_DIFFICULTY_0 => '5N Dungeon / 10N Raid', + SmartEvent::FLAG_DIFFICULTY_1 => '5H Dungeon / 25N Raid', + SmartEvent::FLAG_DIFFICULTY_2 => '10H Raid', + SmartEvent::FLAG_DIFFICULTY_3 => '25H Raid', + SmartEvent::FLAG_DEBUG_ONLY => null, // only occurs in debug build; do not output + SmartEvent::FLAG_NO_RESET => 'No Reset', + SmartEvent::FLAG_WHILE_CHARMED => 'While Charmed' ), 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', 'actions' => array( // [body, footer] null, - SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], - SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], - SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], - SAI_ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End Emote.;', null], - SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], - SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], - SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], - SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], -/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], - SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], - SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$s:;(%4$d)?, attacking invoker.:;', null], - SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], - SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], - SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], - SAI_ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', null], - SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], - SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], -/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], - SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], - SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], - SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], - SAI_ACTION_EVADE => ['#target# evades to (%1$d)?last stored:respawn; position.', null], - SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], - SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], - SAI_ACTION_COMBAT_STOP => ['End current combat.', null], - SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', 'Only own auras'], - SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle\u003A %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], -/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], - SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], - SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], - SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], - SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]%1$d[/b] to [b]%2$d[/b].', null], - null, // SMART_ACTION_SET_INST_DATA64 = 35 - SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], - SAI_ACTION_DIE => ['Die…   painfully.', null], - SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], - SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], -/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], - SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;', null], - SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become inviniable below (%2$d)?%2$d%%:%1$d; HP.', null], - SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], - SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], - SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], - SAI_ACTION_ATTACK_STOP => ['Stop attacking.', null], - SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], - SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], - SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], -/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %7$s:; at #target#.', 'Despawn linked to summoner'], - SAI_ACTION_KILL_UNIT => ['#target# dies!', null], - SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], - SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s:;', 'Repeatable'], - SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$s', null], - SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:.;(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], - SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], - SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], - SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], - SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], -/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], - SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], - SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], - SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], - SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], - SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], - SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], - SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], - SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], -/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], - SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], - SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], - SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], - SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', null], - SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', null], - SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], - SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], -/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], - SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], - SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], - SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], - SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], - SAI_ACTION_SELF_CAST => ['Self casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], - SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], - SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], - SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], -/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], - SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], - SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], - SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], - SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], - SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], - SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], -/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], - SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], - SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], - SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], - SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], - SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], - SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], - SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], - SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], - SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], -/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], - SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], - SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], - SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], - SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], - SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], - SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], - SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], - SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], - SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], -/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], - SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], - SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], - SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], - SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], - SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], - SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], - SAI_ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %7$s.', 'Forced'], - null, // SAI_ACTION_PLAY_ANIMKIT = 128, // don't use on 3.3.5a - null, // SAI_ACTION_SCENE_PLAY = 129, // don't use on 3.3.5a -/*130*/ null, // SAI_ACTION_SCENE_CANCEL = 130, // don't use on 3.3.5a - SAI_ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%7$s[/b] SpawnFlags: %8$s %9$s', 'Cooldown: %s'], // Group ID, min secs, max secs, spawnflags - SAI_ACTION_RESPAWN_BY_SPAWNID => ['Respawn %7$s [small class=q0](GUID: %2$d)[/small]', null], // spawnType, spawnId - SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], // spellID, castFlags - SAI_ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', null], // cinematic - SAI_ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%7$.2f[/b]', null], // movementType, speedInteger, speedFraction - null, // SAI_ACTION_PLAY_SPELL_VISUAL_KIT', // spellVisualKitId (RESERVED, PENDING CHERRYPICK) - SAI_ACTION_OVERRIDE_LIGHT => ['Change skybox in [zone=%1$d] to #[b]%2$d[/b].', 'Transition: %s'], // zoneId, overrideLightID, transitionMilliseconds - SAI_ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %7$s at %3$d%% intensity.', null], // zoneId, weatherId, intensity + SmartAction::ACTION_TALK => ['(%3$d)?Say:#target# says; (%%11$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to (%3$d)?#target#:invoker;%11$s', 'Duration: %s'], + SmartAction::ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%11$d]:Reset faction of #target#;.', ''], + SmartAction::ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%11$d)?Reset apperance.:Take the appearance of;(%1$d)? [npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SOUND => ['Play sound to (%2$d)?invoking player:all players in sight;:[div][sound=%1$d][/div]', 'Played by environment.'], + SmartAction::ACTION_PLAY_EMOTE => ['(%1$d)?Emote [emote=%1$d] to #target#.: End emote state.;', ''], + SmartAction::ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', ''], + SmartAction::ACTION_SET_REACT_STATE => ['#target# becomes %11$s.', ''], + SmartAction::ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', ''], +/* 10*/ SmartAction::ACTION_RANDOM_EMOTE => ['Emote %11$s to #target#.', ''], + SmartAction::ACTION_CAST => ['Cast [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %11$s:;(%4$d)?, attacking invoker.:;', '%1$s'], + SmartAction::ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %11$+d%%.', ''], + SmartAction::ACTION_THREAT_ALL_PCT => ['Modify the threat of all opponents by %11$+d%%.', ''], + SmartAction::ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for #target#.', ''], + SmartAction::ACTION_SET_INGAME_PHASE_ID => null, + SmartAction::ACTION_SET_EMOTE_STATE => ['(%1$d)?Continuously emote [emote=%1$d] to #target#.:End emote state;', ''], + SmartAction::ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], + SmartAction::ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %11$s.', ''], +/* 20*/ SmartAction::ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', ''], + SmartAction::ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', ''], + SmartAction::ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', ''], + SmartAction::ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', ''], + SmartAction::ACTION_EVADE => ['#target# evades to (%1$d)?last stored:spawn; position.', ''], + SmartAction::ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SmartAction::ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy exploration event of [quest=%1$d] for group of #target#.', ''], + SmartAction::ACTION_COMBAT_STOP => ['End current combat.', ''], + SmartAction::ACTION_REMOVEAURASFROMSPELL => ['Remove(%2$d)? %2$d charges of:;(%1$d)? all auras: [spell=%1$d]\'s aura; from #target#.', 'Only own auras'], + SmartAction::ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.(%12$d)?Exploration event of [quest=%4$d] will be satisfied.:;(%13$d)? A kill of [npc=%4$d] will be credited.:;', '(%11$d)?Follow angle\u003A %7$.2f°:;'], +/* 30*/ SmartAction::ACTION_RANDOM_PHASE => ['Pick random Event Phase from %11$s.', ''], + SmartAction::ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', ''], + SmartAction::ACTION_RESET_GOBJECT => ['Reset #target#.', ''], + SmartAction::ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to (%11$s)?%11$s:#target#;.', ''], + SmartAction::ACTION_SET_INST_DATA => ['Set instance (%3$d)?BossState:data field; #[b]%1$d[/b] to [b]%2$d[/b].', ''], + SmartAction::ACTION_SET_INST_DATA64 => ['Store GUID of #target# in instance data field #[b]%1$d[/b].', ''], + SmartAction::ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d].', 'Use level from [npc=%1$d]'], + SmartAction::ACTION_DIE => ['Die…   painfully.', ''], + SmartAction::ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', ''], + SmartAction::ACTION_CALL_FOR_HELP => ['Call for help within %1$dm.', 'Use default help emote'], +/* 40*/ SmartAction::ACTION_SET_SHEATH => ['Sheath %11$s weapons.', ''], + SmartAction::ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %11$s:;(%2$d)? and then respawn after %12$s:;', ''], + SmartAction::ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincible below (%2$d)?%2$d%%:%1$d; HP.', ''], + SmartAction::ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%11$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', ''], + SmartAction::ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %11$s.', ''], + SmartAction::ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', ''], + SmartAction::ACTION_ATTACK_STOP => ['Stop attacking.', ''], + SmartAction::ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', ''], + SmartAction::ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', ''], + SmartAction::ACTION_ATTACK_START => ['Start attacking #target#.', ''], +/* 50*/ SmartAction::ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for %11$s:; at #target#.', 'Despawn not linked to summoner'], + SmartAction::ACTION_KILL_UNIT => ['#target# dies!', ''], + SmartAction::ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%11$s[/span] to [span class=q1]%12$s[/span]', ''], + SmartAction::ACTION_WP_START => ['(%1$d)?Run:Walk; on waypoint path #[b]%2$d[/b](%4$d)? and be bound to [quest=%4$d]:;.(%5$d)? Despawn after %11$s:;', 'Repeatable(%12$s)? [DEPRECATED] React %12$s on path:;'], + SmartAction::ACTION_WP_PAUSE => ['Pause waypoint path for %11$s', ''], + SmartAction::ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %11$s:.; (%2$d)?[quest=%2$d]:quest from start action; (%3$d)?fails:is completed;.', ''], + SmartAction::ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', ''], + SmartAction::ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', ''], + SmartAction::ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %11$s.', ''], + SmartAction::ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', ''], +/* 60*/ SmartAction::ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', ''], + SmartAction::ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', ''], + SmartAction::ACTION_TELEPORT => ['#target# is teleported to [lightbox=map zone=%11$d(%12$s)? pins=%12$s:;]World Coordinates[/lightbox].', ''], + SmartAction::ACTION_SET_COUNTER => ['(%3$d)?Set:Increase; Counter #[b]%1$d[/b] of #target# (%3$d)?to:by; [b]%2$d[/b].', ''], + SmartAction::ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', ''], + SmartAction::ACTION_WP_RESUME => ['Continue on waypoint path.', ''], + SmartAction::ACTION_SET_ORIENTATION => ['Set orientation to (%11$s)?face %11$s:Home Position;.', ''], + SmartAction::ACTION_CREATE_TIMED_EVENT => ['(%6$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%11$s)? after %11$s:;.', 'Repeat every %s'], + SmartAction::ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SmartAction::ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %11$s.', ''], + SmartAction::ACTION_EQUIP => ['(%11$s)?Equip %11$s:Unequip non-standard items;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', ''], + SmartAction::ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', ''], + SmartAction::ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', ''], + SmartAction::ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI events.', ''], + SmartAction::ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI events.', ''], + SmartAction::ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', ''], + SmartAction::ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', ''], +/* 80*/ SmartAction::ACTION_CALL_TIMED_ACTIONLIST => ['Call Timed Actionlist [url=#sai-actionlist-%1$d onclick=TalTabClick(%1$d)]#%1$d[/url]. Updates %11$s.', ''], + SmartAction::ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %11$s.', ''], + SmartAction::ACTION_ADD_NPC_FLAG => ['Add %11$s npc flags to #target#.', ''], + SmartAction::ACTION_REMOVE_NPC_FLAG => ['Remove %11$s npc flags from #target#.', ''], + SmartAction::ACTION_SIMPLE_TALK => ['#target# says (%11$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] %11$s', ''], + SmartAction::ACTION_SELF_CAST => ['#target# casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_CROSS_CAST => ['%11$s casts [spell=%1$d] at #target#.', '%1$s'], + SmartAction::ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: %11$s', ''], + SmartAction::ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: %11$s', ''], + SmartAction::ACTION_RANDOM_MOVE => ['(%1$d)?Move #target# to a random point within %1$dm:#target# ends idle movement;.', ''], +/* 90*/ SmartAction::ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %11$s for #target#.', ''], + SmartAction::ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Including instant spells.:;(%3$d)? Including delayed spells.:;'], + SmartAction::ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', ''], + SmartAction::ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %11$s from #target#.', ''], + SmartAction::ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f, [i]v[/i][sub]xy[/sub]: %1$d [i]v[/i][sub]z[/sub]: %2$d[/b]', ''], + SmartAction::ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', ''], + SmartAction::ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %11$s.', ''], +/*100*/ SmartAction::ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', ''], + SmartAction::ACTION_SET_HOME_POS => ['Set Home Position to (%11$d)?current position.:fixed position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b];', ''], + SmartAction::ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', ''], + SmartAction::ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', ''], + SmartAction::ACTION_SET_GO_FLAG => ['Set GameObject Flag to %11$s on #target#.', ''], + SmartAction::ACTION_ADD_GO_FLAG => ['Add GameObject Flag %11$s to #target#.', ''], + SmartAction::ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %11$s from #target#.', ''], + SmartAction::ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%11$s)?[span class=breadcrumb-arrow] [/span]%11$s:[span class=q0][/span];', ''], + SmartAction::ACTION_SET_POWER => ['%11$s is set to [b]%2$d[/b] for #target#.', ''], + SmartAction::ACTION_ADD_POWER => ['Add [b]%2$d[/b] %11$s to #target#.', ''], +/*110*/ SmartAction::ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %11$s from #target#.', ''], + SmartAction::ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', ''], + SmartAction::ACTION_GAME_EVENT_START => ['Start [event=%1$d].', ''], + SmartAction::ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %11$s.', ''], + SmartAction::ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %12$.2f, Y: %13$.2f, Z: %14$.2f[/b]', ''], + SmartAction::ACTION_RANDOM_SOUND => ['Play a random sound to (%5$d)?invoking player:all players in sight;:%11$s', 'Played by environment.'], + SmartAction::ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %11$s.', 'Apply Looted Corpse Decay Factor'], + SmartAction::ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', ''], + SmartAction::ACTION_GO_SET_GO_STATE => ['Set gameobject state to %11$s.'. ''], + SmartAction::ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', ''], +/*120*/ SmartAction::ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%11$s[/b] from #target#.', ''], + SmartAction::ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', ''], + SmartAction::ACTION_FLEE => ['#target# flees for assistance for %11$s.', ''], + SmartAction::ACTION_ADD_THREAT => ['Modify threat level of #target# by %11$+d points.', ''], + SmartAction::ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %11$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not necessarily have an item template'], + SmartAction::ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %11$s.', ''], + SmartAction::ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', ''], + SmartAction::ACTION_PAUSE_MOVEMENT => ['Pause movement from slot #[b]%1$d[/b] for %11$s.', 'Forced'], + SmartAction::ACTION_PLAY_ANIMKIT => null, + SmartAction::ACTION_SCENE_PLAY => null, +/*130*/ SmartAction::ACTION_SCENE_CANCEL => null, + SmartAction::ACTION_SPAWN_SPAWNGROUP => ['Spawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_DESPAWN_SPAWNGROUP => ['Despawn SpawnGroup [b]%11$s[/b](%12$s)? SpawnFlags\u003A %12$s:; %13$s', 'Cooldown: %s'], + SmartAction::ACTION_RESPAWN_BY_SPAWNID => ['Respawn %11$s [small class=q0](GUID: %2$d)[/small]', ''], + SmartAction::ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.(%4$d)? (max. %4$d |4target:targets;):;', '%1$s'], + SmartAction::ACTION_PLAY_CINEMATIC => ['Play cinematic #[b]%1$d[/b] for #target#', ''], + SmartAction::ACTION_SET_MOVEMENT_SPEED => ['Set speed of MotionType #[b]%1$d[/b] to [b]%11$.2f[/b]', ''], + SmartAction::ACTION_PLAY_SPELL_VISUAL_KIT => null, + SmartAction::ACTION_OVERRIDE_LIGHT => ['(%3$d)?Change skybox in [zone=%1$d] to #[b]%3$d[/b]:Reset skybox in [zone=%1$d];.', 'Transition: %s'], + SmartAction::ACTION_OVERRIDE_WEATHER => ['Change weather in [zone=%1$d] to %11$s at %3$d%% intensity.', ''], +/*140*/ SmartAction::ACTION_SET_AI_ANIM_KIT => null, + SmartAction::ACTION_SET_HOVER => ['(%1$d)?Enable:Disable; hovering.', ''], + SmartAction::ACTION_SET_HEALTH_PCT => ['Set health percentage of #target# to %1$d%%.', ''], + SmartAction::ACTION_CREATE_CONVERSATION => null, + SmartAction::ACTION_SET_IMMUNE_PC => ['(%1$d)?Enable:Disable; #target# immunity to players.', ''], + SmartAction::ACTION_SET_IMMUNE_NPC => ['(%1$d)?Enable:Disable; #target# immunity to NPCs.', ''], + SmartAction::ACTION_SET_UNINTERACTIBLE => ['(%1$d)?Prevent:Allow; interaction with #target#.', ''], + SmartAction::ACTION_ACTIVATE_GAMEOBJECT => ['Activate Gameobject (Method: %1$d)', ''], + SmartAction::ACTION_ADD_TO_STORED_TARGET_LIST => ['Add #target# as target to list #%1$d.', ''], + SmartAction::ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER => null, +/*150*/ SmartAction::ACTION_TRIGGER_GAME_EVENT => null, + SmartAction::ACTION_DO_ACTION => null ), 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', - 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%17$.2f[/td][/tr][tr][td]Y[/td][td=header]%18$.2f[/td][/tr][tr][td]Z[/td][td=header]%19$.2f[/td][/tr][tr][td]O[/td][td=header]%20$.2f[/td][/tr][/table]', 'targets' => array( - null, - SAI_TARGET_SELF => 'self', - SAI_TARGET_VICTIM => 'current target', - SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', - SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', - SAI_TARGET_HOSTILE_RANDOM => 'random target', - SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', - SAI_TARGET_ACTION_INVOKER => 'Invoker', - SAI_TARGET_POSITION => 'world coordinates', - SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%4$d)? (max. %4$d targets):;', -/*10*/ SAI_TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; with GUID #%1$d', - SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_STORED => 'previously stored targets', - SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%4$d)? (max. %4$d targets):;', - SAI_TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; with GUID #%1$d', - SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %11$sm(%3$d)? (max. %3$d targets):;', - SAI_TARGET_INVOKER_PARTY => 'Invokers party', - SAI_TARGET_PLAYER_RANGE => 'random player within %11$sm', - SAI_TARGET_PLAYER_DISTANCE => 'random player within %11$sm', - SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %11$sm', -/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %11$sm', - SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', - SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', - SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', - SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', - SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', - SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', - SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', - SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', - SAI_TARGET_VEHICLE_PASSENGER => 'accessory in Invokers vehicle in (%1$d)?seat %11$s:all seats;', -/*30*/ SAI_TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, arbitrary gameobject; within %11$sm' + SmartTarget::TARGET_NONE => '', + SmartTarget::TARGET_SELF => 'self', + SmartTarget::TARGET_VICTIM => 'Opponent', + SmartTarget::TARGET_HOSTILE_SECOND_AGGRO => '2nd (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_LAST_AGGRO => 'last (%2$d)?player:unit;(%1$d)? within %1$dm:; in threat list(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM => 'random (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank (%2$d)?player:unit;(%1$d)? within %1$dm:;(%11$s)? using %11$s:;', + SmartTarget::TARGET_ACTION_INVOKER => 'Invoker', + SmartTarget::TARGET_POSITION => 'world coordinates', + SmartTarget::TARGET_CREATURE_RANGE => '(%1$d)?instance of [npc=%1$d]:any creature; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', +/*10*/ SmartTarget::TARGET_CREATURE_GUID => '(%11$d)?[npc=%11$d]:NPC; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_CREATURE_DISTANCE => '(%1$d)?instance of [npc=%1$d]:any creature;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_STORED => 'previously stored targets', + SmartTarget::TARGET_GAMEOBJECT_RANGE => '(%1$d)?instance of [object=%1$d]:any object; within %11$sm(%4$d)? (max. %4$d |4target:targets;):;', + SmartTarget::TARGET_GAMEOBJECT_GUID => '(%11$d)?[object=%11$d]:gameobject; [small class=q0](GUID: %1$d)[/small]', + SmartTarget::TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?instance of [object=%1$d]:any object;(%2$d)? within %2$dm:;(%3$d)? (max. %3$d |4target:targets;):;', + SmartTarget::TARGET_INVOKER_PARTY => 'Invokers party', + SmartTarget::TARGET_PLAYER_RANGE => 'all players within %11$sm', + SmartTarget::TARGET_PLAYER_DISTANCE => 'all players within %1$dm', + SmartTarget::TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:creature; within (%2$d)?%2$d:100;m', +/*20*/ SmartTarget::TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:gameobject; within (%2$d)?%2$d:100;m', + SmartTarget::TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SmartTarget::TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SmartTarget::TARGET_OWNER_OR_SUMMONER => 'owner or summoner', + SmartTarget::TARGET_THREAT_LIST => 'all units(%1$d)? within %1$dm:; engaged in combat with me', + SmartTarget::TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:unit; within %1$dm', + SmartTarget::TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SmartTarget::TARGET_FARTHEST => 'furthest engaged (%2$d)?player:unit; within %1$dm(%3$d)? and line of sight:;', + SmartTarget::TARGET_VEHICLE_PASSENGER => 'vehicle accessory in (%1$d)?seat %11$s:all seats;', +/*30*/ SmartTarget::TARGET_CLOSEST_UNSPAWNED_GO => 'closest unspawned (%1$d)?[object=%1$d]:, gameobject; within %11$sm' ), 'castFlags' => array( - SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', - SAI_CAST_FLAG_TRIGGERED => 'Triggered', - SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', - SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + SmartAI::CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SmartAI::CAST_FLAG_TRIGGERED => 'Triggered', + SmartAI::CAST_FLAG_AURA_MISSING => 'Aura missing', + SmartAI::CAST_FLAG_COMBAT_MOVE => 'Combat movement' ), 'spawnFlags' => array( - SAI_SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', - SAI_SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', - SAI_SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' + SmartAI::SPAWN_FLAG_IGNORE_RESPAWN => 'Override and reset respawn timer', + SmartAI::SPAWN_FLAG_FORCE_SPAWN => 'Force spawn if already in world', + SmartAI::SPAWN_FLAG_NOSAVE_RESPAWN => 'Remove respawn time on despawn' ), - 'GOStates' => ['active', 'ready', 'active alternative'], - 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], - 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], - 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], - 'sheaths' => ['all', 'melee', 'ranged'], - 'saiUpdate' => ['out of combat', 'in combat', 'always'], - 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], - 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'GOStates' => ['active', 'ready', 'destroyed'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + 'weatherStates' => ['Fine', 'Fog', 'Drizzle', 'Light Rain', 'Medium Rain', 'Heavy Rain', 'Light Snow', 'Medium Snow', 'Heavy Snow', 22 => 'Light Sandstorm', 41=> 'Medium Sandstorm', 42 => 'Heavy Sandstorm', 86 => 'Thunders', 90 => 'Black Rain', 106 => 'Black Snow'], + 'hostilityModes' => ['hostile', 'non-hostile', ''/*any*/], + 'motionTypes' => ['IdleMotion', 'RandomMotion', 'WaypointMotion', null, 'ConfusedMotion', 'ChaseMotion', 'HomeMotion', 'FlightMotion', 'PointMotion', 'FleeingMotion', 'DistractMotion', 'AssistanceMotion', 'AssistanceDistractMotion', 'TimedFleeingMotion', 'FollowMotion', 'RotateMotion', 'EffectMotion', 'SplineChainMotion', 'FormationMotion'], - 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', - 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', - 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', - 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', - 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', - 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', - 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', - 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', - - 'entityUNK' => '[b class=q10]unknown entity[/b]', + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + 'weatherStateUNK' => '[span class=q10]unknown weather state #[b class=q1]%d[/b][/span]', + 'powerTypeUNK' => '[span class=q10]unknown resource #[b class=q1]%d[/b][/span]', + 'hostilityModeUNK' => '[span class=q10]unknown HostilityMode #[b class=q1]%d[/b][/span]', + 'motionTypeUNK' => '[span class=q10]unknown MotionType #[b class=q1]%d[/b][/span]', + 'entityUNK' => '[b class=q10]unknown entity[/b]', 'empty' => '[span class=q0][/span]' ), diff --git a/pages/areatrigger.php b/pages/areatrigger.php index a9bf1546..a588fb0f 100644 --- a/pages/areatrigger.php +++ b/pages/areatrigger.php @@ -65,15 +65,14 @@ class AreaTriggerPage extends GenericPage $sai = null; if ($_type == AT_TYPE_SMART) { - $sai = new SmartAI(SAI_SRC_TYPE_AREATRIGGER, $this->typeId, ['name' => $this->name, 'teleportA' => $this->subject->getField('teleportA')]); + $sai = new SmartAI(SmartAI::SRC_TYPE_AREATRIGGER, $this->typeId, ['teleportTargetArea' => $this->subject->getField('areaId')]); if ($sai->prepare()) $this->extendGlobalData($sai->getJSGlobals()); } - $this->map = $map; $this->infobox = false; - $this->smartAI = $sai ? $sai->getMarkdown() : null; + $this->smartAI = $sai?->getMarkdown(); $this->redButtons = array( BUTTON_LINKS => false, BUTTON_WOWHEAD => false @@ -104,7 +103,7 @@ class AreaTriggerPage extends GenericPage } else if ($_type == AT_TYPE_TELEPORT) { - $relZone = new ZoneList(array(['id', $this->subject->getField('teleportA')])); + $relZone = new ZoneList(array(['id', $this->subject->getField('areaId')])); if (!$relZone->error) { $this->lvTabs[] = [ZoneList::$brickFile, ['data' => array_values($relZone->getListviewData())]]; diff --git a/pages/npc.php b/pages/npc.php index 3b4918ec..87547c0e 100644 --- a/pages/npc.php +++ b/pages/npc.php @@ -378,14 +378,14 @@ class NpcPage extends GenericPage $sai = null; if ($this->subject->getField('aiName') == 'SmartAI') { - $sai = new SmartAI(SAI_SRC_TYPE_CREATURE, $this->typeId, ['name' => $this->subject->getField('name', true)]); + $sai = new SmartAI(SmartAI::SRC_TYPE_CREATURE, $this->typeId); if (!$sai->prepare()) // no smartAI found .. check per guid { // at least one of many - $guids = DB::World()->selectCol('SELECT guid FROM creature WHERE id = ?d', $this->typeId); + $guids = DB::World()->selectCol('SELECT `guid` FROM creature WHERE `id` = ?d', $this->typeId); while ($_ = array_pop($guids)) { - $sai = new SmartAI(SAI_SRC_TYPE_CREATURE, -$_, ['baseEntry' => $this->typeId, 'name' => $this->subject->getField('name', true), 'title' => ' [small](for GUID: '.$_.')[/small]']); + $sai = new SmartAI(SmartAI::SRC_TYPE_CREATURE, -$_, ['baseEntry' => $this->typeId, 'title' => ' [small](for GUID: '.$_.')[/small]']); if ($sai->prepare()) break; } @@ -431,7 +431,7 @@ class NpcPage extends GenericPage if ($tplSpells) $conditions[] = ['id', $tplSpells]; - if ($smartSpells = SmartAI::getSpellCastsForOwner($this->typeId, SAI_SRC_TYPE_CREATURE)) + if ($smartSpells = SmartAI::getSpellCastsForOwner($this->typeId, SmartAI::SRC_TYPE_CREATURE)) $genSpells = $smartSpells; if ($auras = DB::World()->selectCell('SELECT auras FROM creature_template_addon WHERE entry = ?d', $this->typeId)) @@ -518,9 +518,9 @@ class NpcPage extends GenericPage // tab: summoned by [spell] $conditions = array( 'OR', - ['AND', ['effect1Id', [28, 56, 112]], ['effect1MiscValue', $this->typeId]], - ['AND', ['effect2Id', [28, 56, 112]], ['effect2MiscValue', $this->typeId]], - ['AND', ['effect3Id', [28, 56, 112]], ['effect3MiscValue', $this->typeId]] + ['AND', ['effect1Id', [SPELL_EFFECT_SUMMON, SPELL_EFFECT_SUMMON_PET, SPELL_EFFECT_SUMMON_DEMON]], ['effect1MiscValue', $this->typeId]], + ['AND', ['effect2Id', [SPELL_EFFECT_SUMMON, SPELL_EFFECT_SUMMON_PET, SPELL_EFFECT_SUMMON_DEMON]], ['effect2MiscValue', $this->typeId]], + ['AND', ['effect3Id', [SPELL_EFFECT_SUMMON, SPELL_EFFECT_SUMMON_PET, SPELL_EFFECT_SUMMON_DEMON]], ['effect3MiscValue', $this->typeId]] ); $sbSpell = new SpellList($conditions); @@ -858,7 +858,7 @@ class NpcPage extends GenericPage * Dialogue VO => creature_text * onClick VO => CreatureDisplayInfo.dbc => NPCSounds.dbc */ - $this->soundIds = array_merge($this->soundIds, SmartAI::getSoundsPlayedForOwner($this->typeId, SAI_SRC_TYPE_CREATURE)); + $this->soundIds = array_merge($this->soundIds, SmartAI::getSoundsPlayedForOwner($this->typeId, SmartAI::SRC_TYPE_CREATURE)); // up to 4 possible displayIds .. for the love of things betwixt, just use the first! $activitySounds = DB::Aowow()->selectRow('SELECT * FROM ?_creature_sounds WHERE `id` = ?d', $this->subject->getField('displayId1')); diff --git a/pages/object.php b/pages/object.php index 94e501d1..fcccdb52 100644 --- a/pages/object.php +++ b/pages/object.php @@ -247,14 +247,14 @@ class ObjectPage extends GenericPage $sai = null; if ($this->subject->getField('ScriptOrAI') == 'SmartGameObjectAI') { - $sai = new SmartAI(SAI_SRC_TYPE_OBJECT, $this->typeId, ['name' => $this->subject->getField('name', true)]); + $sai = new SmartAI(SmartAI::SRC_TYPE_OBJECT, $this->typeId); if (!$sai->prepare()) // no smartAI found .. check per guid { // at least one of many - $guids = DB::World()->selectCol('SELECT guid FROM gameobject WHERE id = ?d LIMIT 1', $this->typeId); + $guids = DB::World()->selectCol('SELECT `guid` FROM gameobject WHERE `id` = ?d', $this->typeId); while ($_ = array_pop($guids)) { - $sai = new SmartAI(SAI_SRC_TYPE_OBJECT, -$_, ['name' => $this->subject->getField('name', true), 'title' => ' [small](for GUID: '.$_.')[/small]']); + $sai = new SmartAI(SmartAI::SRC_TYPE_OBJECT, -$_, ['title' => ' [small](for GUID: '.$_.')[/small]']); if ($sai->prepare()) break; } diff --git a/setup/tools/sqlgen/areatrigger.ss.php b/setup/tools/sqlgen/areatrigger.ss.php index 6f25914d..fdddeba2 100644 --- a/setup/tools/sqlgen/areatrigger.ss.php +++ b/setup/tools/sqlgen/areatrigger.ss.php @@ -40,7 +40,7 @@ CLISetup::registerSetup('sql', new class extends SetupScript $addData = DB::World()->select( 'SELECT `ID` AS ARRAY_KEY, `Name` AS `name` FROM areatrigger_teleport UNION SELECT `entryorguid` AS ARRAY_KEY, "SAI Teleport" AS `name` FROM smart_scripts WHERE `source_type` = ?d AND `action_type` = ?d', - SAI_SRC_TYPE_AREATRIGGER, SAI_ACTION_TELEPORT + SmartAI::SRC_TYPE_AREATRIGGER, SmartAction::ACTION_TELEPORT ); foreach ($addData as $id => $ad) DB::Aowow()->query('UPDATE ?_areatrigger SET `name` = ?, `type` = ?d WHERE `id` = ?d', $ad['name'], AT_TYPE_TELEPORT, $id); diff --git a/setup/tools/sqlgen/spawns.ss.php b/setup/tools/sqlgen/spawns.ss.php index 56bc734f..90284c1e 100644 --- a/setup/tools/sqlgen/spawns.ss.php +++ b/setup/tools/sqlgen/spawns.ss.php @@ -254,7 +254,7 @@ CLISetup::registerSetup("sql", new class extends SetupScript SELECT -`entryorguid` AS `guid`, ?d AS `type`, entryorguid AS `typeId`, `action_param1` AS `map`, `target_x` AS `posX`, `target_y` AS `posY` FROM smart_scripts WHERE `source_type` = ?d AND `action_type` = ?d', - Type::AREATRIGGER, Type::AREATRIGGER, SAI_SRC_TYPE_AREATRIGGER, SAI_ACTION_TELEPORT + Type::AREATRIGGER, Type::AREATRIGGER, SmartAI::SRC_TYPE_AREATRIGGER, SmartAction::ACTION_TELEPORT ); return array_merge($base, $addData); @@ -273,6 +273,8 @@ CLISetup::registerSetup("sql", new class extends SetupScript private function waypoints() : array { + // todo (med): at least `waypoints` can contain paths that do not belong to a creature but get assigned by SmartAI (or script) during runtime + // in the future guid should be optional and additional parameters substituting guid should be passed down from NpcPage after SmartAI has been evaluated return DB::World()->select( 'SELECT c.`guid`, w.`entry` AS `creatureOrPath`, w.`pointId` AS `point`, c.`zoneId` AS `areaId`, c.`map`, w.`waittime` AS `wait`, w.`location_x` AS `posX`, w.`location_y` AS `posY` FROM creature c diff --git a/setup/tools/sqlgen/spell.ss.php b/setup/tools/sqlgen/spell.ss.php index c31b0717..5dc9667b 100644 --- a/setup/tools/sqlgen/spell.ss.php +++ b/setup/tools/sqlgen/spell.ss.php @@ -599,7 +599,7 @@ CLISetup::registerSetup("sql", new class extends SetupScript $world = DB::World()->selectCol( 'SELECT ss.`action_param1` FROM smart_scripts ss WHERE ss.`action_type` IN (?a) UNION SELECT cts.`Spell` FROM creature_template_spell cts', - [SAI_ACTION_CAST, SAI_ACTION_ADD_AURA, SAI_ACTION_SELF_CAST, SAI_ACTION_CROSS_CAST] + [SmartAction::ACTION_CAST, SmartAction::ACTION_ADD_AURA, SmartAction::ACTION_SELF_CAST, SmartAction::ACTION_CROSS_CAST] ); $auras = DB::World()->selectCol('SELECT `entry` AS ARRAY_KEY, cta.`auras` FROM creature_template_addon cta WHERE `auras` <> ""');