summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/smart_scripts.md33
1 files changed, 31 insertions, 2 deletions
diff --git a/docs/smart_scripts.md b/docs/smart_scripts.md
index 2606754..c9910ea 100644
--- a/docs/smart_scripts.md
+++ b/docs/smart_scripts.md
@@ -231,7 +231,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
| SMART_ACTION_SET_REACT_STATE | 8 | ReactState | | | | | | React State. Can be Passive (0), Defensive (1), Aggressive (2). |
| SMART_ACTION_ACTIVATE_GOBJECT | 9 | | | | | | | Activate Object |
| SMART_ACTION_RANDOM_EMOTE | 10 | EmoteId1 | EmoteId2 | EmoteId3 | EmoteId4 | EmoteId5 | EmoteId6 | Play Random Emote |
-| SMART_ACTION_CAST | 11 | SpellId | castFlags | limitTargets (0 = all targets) | | | | Cast Spell ID at Target(s) |
+| SMART_ACTION_CAST | 11 | SpellId | [castFlags](#cast-flags) | [triggeredFlags](#triggered-flags) | limitTargets (0 = all) | | | Cast Spell ID at Target(s) |
| SMART_ACTION_SUMMON_CREATURE | 12 | creature_template.entry | Summon type | duration in ms | attackInvoker (0/1/2) | attackScriptOwner (0/1) | | Summon Unit; attackInvoker 1: attack target; attackInvoker 2: attack actual invoker |
| SMART_ACTION_THREAT_SINGLE_PCT | 13 | Threat% inc | Threat% dec | | | | | Change Threat Percentage for Single Target |
| SMART_ACTION_THREAT_ALL_PCT | 14 | Threat% inc | Threat% dec | | | | | Change Threat Percentage for All Enemies |
@@ -305,7 +305,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
| SMART_ACTION_ADD_NPC_FLAG | 82 | creature_template.npcflag | | | | | | |
| SMART_ACTION_REMOVE_NPC_FLAG | 83 | creature_template.npcflag | | | | | | |
| SMART_ACTION_SIMPLE_TALK | 84 | creature_text.GroupID | | | | | | Makes a player say text. SMART_EVENT_TEXT_OVER is not triggered and whispers can not be used. |
-| SMART_ACTION_INVOKER_CAST | 85 | SpellID | castFlags | triggeredFlags | | | | if avaliable, last used invoker will cast spellId with castFlags on targets (warning: TC 3.3.5 uses another action here: SMART_ACTION_SELF_CAST) |
+| SMART_ACTION_SELF_CAST | 85 | SpellId | [castFlags](#cast-flags) | [triggeredFlags](#triggered-flags) | limitTargets (0 = all) | | | Makes the target cast spell on self. |
| SMART_ACTION_CROSS_CAST | 86 | SpellID | castFlags | CasterTargetType (caster is selected here, use it as target_type) | CasterTarget (target_param1) | CasterTarget (target_param2) | CasterTarget (target_param3) | This action is used to make selected caster (in CasterTargetType) to cast spell. Actual target is entered in target_type as normally. |
| SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST | 87 | EntryOrGuid 1 (entryorguid * 100 + n) | EntryOrGuid 2 (entryorguid * 100 + n) | EntryOrGuid 3 (entryorguid * 100 + n) | EntryOrGuid 4 (entryorguid * 100 + n) | EntryOrGuid 5 (entryorguid * 100 + n) | EntryOrGuid 6 (entryorguid * 100 + n) | Will select one entry from the ones provided. 0 is ignored. |
| SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST | 88 | EntryOrGuid 1 (entryorguid * 100 + n) | EntryOrGuid 2 (entryorguid * 100 + n) | | | | | 0 is ignored. |
@@ -344,6 +344,7 @@ This is the probability of the event to occur as a percentage from 0-100. So, if
| SMART_ACTION_ADD_THREAT | 123 | +threat | -threat | | | | | |
| SMART_ACTION_LOAD_EQUIPMENT | 124 | Id | force | | | | | |
| SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT | 125 | id min range | id max range | | | | | |
+| SMART_ACTION_INVOKER_CAST | 134 | SpellId | [castFlags](#cast-flags) | [triggeredFlags](#triggered-flags) | limitTargets (0 = all) | | | Last used invoker will cast the spell. |
| SMART_ACTION_PLAY_CINEMATIC | 135 | entry | | | | | | |
| SMART_ACTION_SET_MOVEMENT_SPEED | 136 | movementType | speedInteger | speedFraction | | | | MOVE_WALK = 0, MOVE_RUN = 1, MOVE_RUN_BACK = 2, MOVE_SWIM = 3, MOVE_SWIM_BACK= 4, MOVE_TURN_RATE= 5, MOVE_FLIGHT = 6, MOVE_FLIGHT_BACK = 7, MOVE_PITCH_RATE = 8 |
| SMART_ACTION_SET_HEALTH_PCT | 142 | percent | | | | | | |
@@ -458,6 +459,34 @@ INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (y, 'SmartTrigg
| CAST\_AURA\_NOT\_PRESENT | 32 | 0x20 | Only casts the spell if the target does not have an aura from the spell |
| SMARTCAST\_COMBAT\_MOVE | 64 | 0x40 | Prevent combat movement on cast, allow on fail range, mana, LOS |
+### Triggered Flags
+
+| Name | Flag | Hex | Comment |
+| --------------------------------------------- | ---------- | ---------- | -------------------------------------------------------------------------------------- |
+| TRIGGERED_NONE | 0 | 0x00000000 | Not triggered |
+| TRIGGERED_IGNORE_GCD | 1 | 0x00000001 | Will ignore GCD |
+| TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD | 2 | 0x00000002 | Will ignore Spell and Category cooldowns |
+| TRIGGERED_IGNORE_POWER_AND_REAGENT_COST | 4 | 0x00000004 | Will ignore power and reagent cost |
+| TRIGGERED_IGNORE_CAST_ITEM | 8 | 0x00000008 | Will not take away cast item or update related achievement criteria |
+| RIGGERED_IGNORE_AURA_SCALING | 16 | 0x00000010 | Will ignore aura scaling |
+| TRIGGERED_IGNORE_CAST_IN_PROGRESS | 32 | 0x00000020 | Will not check if a current cast is in progress |
+| TRIGGERED_IGNORE_COMBO_POINTS | 64 | 0x00000040 | Will ignore combo point requirement |
+| TRIGGERED_CAST_DIRECTLY | 128 | 0x00000080 | In Spell::prepare, will be cast directly without setting containers for executed spell |
+| TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS | 256 | 0x00000100 | Will ignore interruptible aura's at cast |
+| TRIGGERED_IGNORE_SET_FACING | 512 | 0x00000200 | Will not adjust facing to target (if any) |
+| TRIGGERED_IGNORE_SHAPESHIFT | 1024 | 0x00000400 | Will ignore shapeshift checks |
+| TRIGGERED_IGNORE_CASTER_AURASTATE | 2048 | 0x00000800 | Will ignore caster aura states including combat requirements and death state |
+| TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE | 8192 | 0x00002000 | Will ignore mounted/on vehicle restrictions |
+| TRIGGERED_IGNORE_CASTER_AURAS | 65536 | 0x00010000 | Will ignore caster aura restrictions or requirements |
+| TRIGGERED_DISALLOW_PROC_EVENTS | 131072 | 0x00020000 | Disallows proc events from triggered spell (default) |
+| TRIGGERED_DONT_REPORT_CAST_ERROR | 262144 | 0x00040000 | Will return SPELL_FAILED_DONT_REPORT in CheckCast functions |
+| TRIGGERED_FULL_MASK | 524287 | 0x0007FFFF | All triggered flags |
+| TRIGGERED_IGNORE_EQUIPPED_ITEM_REQUIREMENT | 524288 | 0x00080000 | Will ignore equipped item requirements |
+| TRIGGERED_NO_PERIODIC_RESET | 1048576 | 0x00100000 | Periodic aura tick wont be reset on override |
+| TRIGGERED_FULL_DEBUG_MASK | 4294967295 | 0xFFFFFFFF | |
+
+**NOTICE:** If triggeredFlags = 0, cast will trigger with TRIGGERED_FULL_MASK = 524287.
+
### React States
| Name | Value | Comment |