OregonCore  revision fb2a440-git
Your Favourite TBC server
SmartScriptMgr.h File Reference
#include "Common.h"
#include "Creature.h"
#include "CreatureAI.h"
#include "Unit.h"
#include "Spell.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"

Go to the source code of this file.

Classes

struct  WayPoint
 
struct  SmartEvent
 
struct  SmartAction
 
struct  SmartTarget
 
struct  SmartScriptHolder
 
class  ObjectGuidList
 
class  SmartWaypointMgr
 
class  SmartAIMgr
 

Macros

#define sSmartScriptMgr   SmartAIMgr::instance()
 
#define sSmartWaypointMgr   SmartWaypointMgr::instance()
 

Typedefs

typedef UNORDERED_MAP< uint32, WayPoint * > WPPath
 
typedef std::list< WorldObject * > ObjectList
 
typedef UNORDERED_MAP< uint32, ObjectGuidList * > ObjectListMap
 
typedef std::vector< SmartScriptHolderSmartAIEventList
 
typedef UNORDERED_MAP< int32, SmartAIEventListSmartAIEventMap
 
typedef std::map< uint32, std::pair< uint32, SpellEffIndex > > CacheSpellContainer
 
typedef std::pair< CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator > CacheSpellContainerBounds
 

Enumerations

enum  SMART_EVENT_PHASE {
  SMART_EVENT_PHASE_ALWAYS = 0, SMART_EVENT_PHASE_1 = 1, SMART_EVENT_PHASE_2 = 2, SMART_EVENT_PHASE_3 = 3,
  SMART_EVENT_PHASE_4 = 4, SMART_EVENT_PHASE_5 = 5, SMART_EVENT_PHASE_6 = 6, SMART_EVENT_PHASE_7 = 7,
  SMART_EVENT_PHASE_8 = 8, SMART_EVENT_PHASE_9 = 9, SMART_EVENT_PHASE_MAX = 10, SMART_EVENT_PHASE_COUNT = 9
}
 
enum  SMART_EVENT_PHASE_BITS {
  SMART_EVENT_PHASE_ALWAYS_BIT = 0, SMART_EVENT_PHASE_1_BIT = 1, SMART_EVENT_PHASE_2_BIT = 2, SMART_EVENT_PHASE_3_BIT = 4,
  SMART_EVENT_PHASE_4_BIT = 8, SMART_EVENT_PHASE_5_BIT = 16, SMART_EVENT_PHASE_6_BIT = 32, SMART_EVENT_PHASE_7_BIT = 64,
  SMART_EVENT_PHASE_8_BIT = 128, SMART_EVENT_PHASE_9_BIT = 256, SMART_EVENT_PHASE_ALL = SMART_EVENT_PHASE_1_BIT + SMART_EVENT_PHASE_2_BIT + SMART_EVENT_PHASE_3_BIT + SMART_EVENT_PHASE_4_BIT + SMART_EVENT_PHASE_5_BIT + SMART_EVENT_PHASE_6_BIT + SMART_EVENT_PHASE_7_BIT + SMART_EVENT_PHASE_8_BIT + SMART_EVENT_PHASE_9_BIT
}
 
enum  SMART_EVENT {
  SMART_EVENT_UPDATE_IC = 0, SMART_EVENT_UPDATE_OOC = 1, SMART_EVENT_HEALT_PCT = 2, SMART_EVENT_MANA_PCT = 3,
  SMART_EVENT_AGGRO = 4, SMART_EVENT_KILL = 5, SMART_EVENT_DEATH = 6, SMART_EVENT_EVADE = 7,
  SMART_EVENT_SPELLHIT = 8, SMART_EVENT_RANGE = 9, SMART_EVENT_OOC_LOS = 10, SMART_EVENT_RESPAWN = 11,
  SMART_EVENT_TARGET_HEALTH_PCT = 12, SMART_EVENT_VICTIM_CASTING = 13, SMART_EVENT_FRIENDLY_HEALTH = 14, SMART_EVENT_FRIENDLY_IS_CC = 15,
  SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, SMART_EVENT_SUMMONED_UNIT = 17, SMART_EVENT_TARGET_MANA_PCT = 18, SMART_EVENT_ACCEPTED_QUEST = 19,
  SMART_EVENT_REWARD_QUEST = 20, SMART_EVENT_REACHED_HOME = 21, SMART_EVENT_RECEIVE_EMOTE = 22, SMART_EVENT_HAS_AURA = 23,
  SMART_EVENT_TARGET_BUFFED = 24, SMART_EVENT_RESET = 25, SMART_EVENT_IC_LOS = 26, SMART_EVENT_PASSENGER_BOARDED = 27,
  SMART_EVENT_PASSENGER_REMOVED = 28, SMART_EVENT_CHARMED = 29, SMART_EVENT_CHARMED_TARGET = 30, SMART_EVENT_SPELLHIT_TARGET = 31,
  SMART_EVENT_DAMAGED = 32, SMART_EVENT_DAMAGED_TARGET = 33, SMART_EVENT_MOVEMENTINFORM = 34, SMART_EVENT_SUMMON_DESPAWNED = 35,
  SMART_EVENT_CORPSE_REMOVED = 36, SMART_EVENT_AI_INIT = 37, SMART_EVENT_DATA_SET = 38, SMART_EVENT_WAYPOINT_START = 39,
  SMART_EVENT_WAYPOINT_REACHED = 40, SMART_EVENT_TRANSPORT_ADDPLAYER = 41, SMART_EVENT_TRANSPORT_ADDCREATURE = 42, SMART_EVENT_TRANSPORT_REMOVE_PLAYER = 43,
  SMART_EVENT_TRANSPORT_RELOCATE = 44, SMART_EVENT_INSTANCE_PLAYER_ENTER = 45, SMART_EVENT_AREATRIGGER_ONTRIGGER = 46, SMART_EVENT_QUEST_ACCEPTED = 47,
  SMART_EVENT_QUEST_OBJ_COPLETETION = 48, SMART_EVENT_QUEST_COMPLETION = 49, SMART_EVENT_QUEST_REWARDED = 50, SMART_EVENT_QUEST_FAIL = 51,
  SMART_EVENT_TEXT_OVER = 52, SMART_EVENT_RECEIVE_HEAL = 53, SMART_EVENT_JUST_SUMMONED = 54, SMART_EVENT_WAYPOINT_PAUSED = 55,
  SMART_EVENT_WAYPOINT_RESUMED = 56, SMART_EVENT_WAYPOINT_STOPPED = 57, SMART_EVENT_WAYPOINT_ENDED = 58, SMART_EVENT_TIMED_EVENT_TRIGGERED = 59,
  SMART_EVENT_UPDATE = 60, SMART_EVENT_LINK = 61, SMART_EVENT_GOSSIP_SELECT = 62, SMART_EVENT_JUST_CREATED = 63,
  SMART_EVENT_GOSSIP_HELLO = 64, SMART_EVENT_FOLLOW_COMPLETED = 65, SMART_EVENT_DUMMY_EFFECT = 66, SMART_EVENT_IS_BEHIND_TARGET = 67,
  SMART_EVENT_GAME_EVENT_START = 68, SMART_EVENT_GAME_EVENT_END = 69, SMART_EVENT_GO_STATE_CHANGED = 70, SMART_EVENT_GO_EVENT_INFORM = 71,
  SMART_EVENT_ACTION_DONE = 72, SMART_EVENT_ON_SPELLCLICK = 73, SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, SMART_EVENT_DISTANCE_CREATURE = 75,
  SMART_EVENT_DISTANCE_GAMEOBJECT = 76, SMART_EVENT_COUNTER_SET = 77, SMART_EVENT_END = 78
}
 
enum  SMART_SCRIPT_RESPAWN_CONDITION { SMART_SCRIPT_RESPAWN_CONDITION_NONE = 0, SMART_SCRIPT_RESPAWN_CONDITION_MAP = 1, SMART_SCRIPT_RESPAWN_CONDITION_AREA = 2, SMART_SCRIPT_RESPAWN_CONDITION_END = 3 }
 
enum  SMART_ACTION {
  SMART_ACTION_NONE = 0, SMART_ACTION_TALK = 1, SMART_ACTION_SET_FACTION = 2, SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3,
  SMART_ACTION_SOUND = 4, SMART_ACTION_PLAY_EMOTE = 5, SMART_ACTION_FAIL_QUEST = 6, SMART_ACTION_ADD_QUEST = 7,
  SMART_ACTION_SET_REACT_STATE = 8, SMART_ACTION_ACTIVATE_GOBJECT = 9, SMART_ACTION_RANDOM_EMOTE = 10, SMART_ACTION_CAST = 11,
  SMART_ACTION_SUMMON_CREATURE = 12, SMART_ACTION_THREAT_SINGLE_PCT = 13, SMART_ACTION_THREAT_ALL_PCT = 14, SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS = 15,
  SMART_ACTION_UNUSED_16 = 16, SMART_ACTION_SET_EMOTE_STATE = 17, SMART_ACTION_SET_UNIT_FLAG = 18, SMART_ACTION_REMOVE_UNIT_FLAG = 19,
  SMART_ACTION_AUTO_ATTACK = 20, SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, SMART_ACTION_SET_EVENT_PHASE = 22, SMART_ACTION_INC_EVENT_PHASE = 23,
  SMART_ACTION_EVADE = 24, SMART_ACTION_FLEE_FOR_ASSIST = 25, SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, SMART_ACTION_COMBAT_STOP = 27,
  SMART_ACTION_REMOVEAURASFROMSPELL = 28, SMART_ACTION_FOLLOW = 29, SMART_ACTION_RANDOM_PHASE = 30, SMART_ACTION_RANDOM_PHASE_RANGE = 31,
  SMART_ACTION_RESET_GOBJECT = 32, SMART_ACTION_CALL_KILLEDMONSTER = 33, SMART_ACTION_SET_INST_DATA = 34, SMART_ACTION_SET_INST_DATA64 = 35,
  SMART_ACTION_UPDATE_TEMPLATE = 36, SMART_ACTION_DIE = 37, SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38, SMART_ACTION_CALL_FOR_HELP = 39,
  SMART_ACTION_SET_SHEATH = 40, SMART_ACTION_FORCE_DESPAWN = 41, SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43,
  SMART_ACTION_SET_INGAME_PHASE_MASK = 44, SMART_ACTION_SET_DATA = 45, SMART_ACTION_MOVE_FORWARD = 46, SMART_ACTION_SET_VISIBILITY = 47,
  SMART_ACTION_SET_ACTIVE = 48, SMART_ACTION_ATTACK_START = 49, SMART_ACTION_SUMMON_GO = 50, SMART_ACTION_KILL_UNIT = 51,
  SMART_ACTION_ACTIVATE_TAXI = 52, SMART_ACTION_WP_START = 53, SMART_ACTION_WP_PAUSE = 54, SMART_ACTION_WP_STOP = 55,
  SMART_ACTION_ADD_ITEM = 56, SMART_ACTION_REMOVE_ITEM = 57, SMART_ACTION_INSTALL_AI_TEMPLATE = 58, SMART_ACTION_SET_RUN = 59,
  SMART_ACTION_SET_FLY = 60, SMART_ACTION_SET_SWIM = 61, SMART_ACTION_TELEPORT = 62, SMART_ACTION_SET_COUNTER = 63,
  SMART_ACTION_STORE_TARGET_LIST = 64, SMART_ACTION_WP_RESUME = 65, SMART_ACTION_SET_ORIENTATION = 66, SMART_ACTION_CREATE_TIMED_EVENT = 67,
  SMART_ACTION_PLAYMOVIE = 68, SMART_ACTION_MOVE_TO_POS = 69, SMART_ACTION_RESPAWN_TARGET = 70, SMART_ACTION_EQUIP = 71,
  SMART_ACTION_CLOSE_GOSSIP = 72, SMART_ACTION_TRIGGER_TIMED_EVENT = 73, SMART_ACTION_REMOVE_TIMED_EVENT = 74, SMART_ACTION_ADD_AURA = 75,
  SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, SMART_ACTION_RESET_SCRIPT_BASE_OBJECT = 77, SMART_ACTION_CALL_SCRIPT_RESET = 78, SMART_ACTION_SET_RANGED_MOVEMENT = 79,
  SMART_ACTION_CALL_TIMED_ACTIONLIST = 80, SMART_ACTION_SET_NPC_FLAG = 81, SMART_ACTION_ADD_NPC_FLAG = 82, SMART_ACTION_REMOVE_NPC_FLAG = 83,
  SMART_ACTION_SIMPLE_TALK = 84, SMART_ACTION_INVOKER_CAST = 85, SMART_ACTION_CROSS_CAST = 86, SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST = 87,
  SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST = 88, SMART_ACTION_RANDOM_MOVE = 89, SMART_ACTION_SET_UNIT_FIELD_BYTES_1 = 90, SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 = 91,
  SMART_ACTION_INTERRUPT_SPELL = 92, SMART_ACTION_SEND_GO_CUSTOM_ANIM = 93, SMART_ACTION_SET_DYNAMIC_FLAG = 94, SMART_ACTION_ADD_DYNAMIC_FLAG = 95,
  SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, SMART_ACTION_JUMP_TO_POS = 97, SMART_ACTION_SEND_GOSSIP_MENU = 98, SMART_ACTION_GO_SET_LOOT_STATE = 99,
  SMART_ACTION_SEND_TARGET_TO_TARGET = 100, SMART_ACTION_SET_HOME_POS = 101, SMART_ACTION_SET_HEALTH_REGEN = 102, SMART_ACTION_SET_ROOT = 103,
  SMART_ACTION_SET_GO_FLAG = 104, SMART_ACTION_ADD_GO_FLAG = 105, SMART_ACTION_REMOVE_GO_FLAG = 106, SMART_ACTION_SUMMON_CREATURE_GROUP = 107,
  SMART_ACTION_SET_POWER = 108, SMART_ACTION_ADD_POWER = 109, SMART_ACTION_REMOVE_POWER = 110, SMART_ACTION_GAME_EVENT_STOP = 111,
  SMART_ACTION_GAME_EVENT_START = 112, SMART_ACTION_START_CLOSEST_WAYPOINT = 113, SMART_ACTION_MOVE_OFFSET = 114, SMART_ACTION_RANDOM_SOUND = 115,
  SMART_ACTION_END = 116
}
 
enum  SMARTAI_TEMPLATE {
  SMARTAI_TEMPLATE_BASIC = 0, SMARTAI_TEMPLATE_CASTER = 1, SMARTAI_TEMPLATE_TURRET = 2, SMARTAI_TEMPLATE_PASSIVE = 3,
  SMARTAI_TEMPLATE_CAGED_GO_PART = 4, SMARTAI_TEMPLATE_CAGED_NPC_PART = 5, SMARTAI_TEMPLATE_END = 6
}
 
enum  SMARTAI_TARGETS {
  SMART_TARGET_NONE = 0, SMART_TARGET_SELF = 1, SMART_TARGET_VICTIM = 2, SMART_TARGET_HOSTILE_SECOND_AGGRO = 3,
  SMART_TARGET_HOSTILE_LAST_AGGRO = 4, SMART_TARGET_HOSTILE_RANDOM = 5, SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, SMART_TARGET_ACTION_INVOKER = 7,
  SMART_TARGET_POSITION = 8, SMART_TARGET_CREATURE_RANGE = 9, SMART_TARGET_CREATURE_GUID = 10, SMART_TARGET_CREATURE_DISTANCE = 11,
  SMART_TARGET_STORED = 12, SMART_TARGET_GAMEOBJECT_RANGE = 13, SMART_TARGET_GAMEOBJECT_GUID = 14, SMART_TARGET_GAMEOBJECT_DISTANCE = 15,
  SMART_TARGET_INVOKER_PARTY = 16, SMART_TARGET_PLAYER_RANGE = 17, SMART_TARGET_PLAYER_DISTANCE = 18, SMART_TARGET_CLOSEST_CREATURE = 19,
  SMART_TARGET_CLOSEST_GAMEOBJECT = 20, SMART_TARGET_CLOSEST_PLAYER = 21, SMART_TARGET_ACTION_INVOKER_VEHICLE = 22, SMART_TARGET_OWNER_OR_SUMMONER = 23,
  SMART_TARGET_THREAT_LIST = 24, SMART_TARGET_CLOSEST_ENEMY = 25, SMART_TARGET_CLOSEST_FRIENDLY = 26, SMART_TARGET_END = 27
}
 
enum  eSmartAI {
  SMART_EVENT_PARAM_COUNT = 4, SMART_ACTION_PARAM_COUNT = 6, SMART_SUMMON_COUNTER = 0xFFFFFF, SMART_ESCORT_LAST_OOC_POINT = 0xFFFFFF,
  SMART_RANDOM_POINT = 0xFFFFFE, SMART_ESCORT_TARGETS = 0xFFFFFF
}
 
enum  SmartScriptType {
  SMART_SCRIPT_TYPE_CREATURE = 0, SMART_SCRIPT_TYPE_GAMEOBJECT = 1, SMART_SCRIPT_TYPE_AREATRIGGER = 2, SMART_SCRIPT_TYPE_EVENT = 3,
  SMART_SCRIPT_TYPE_GOSSIP = 4, SMART_SCRIPT_TYPE_QUEST = 5, SMART_SCRIPT_TYPE_SPELL = 6, SMART_SCRIPT_TYPE_TRANSPORT = 7,
  SMART_SCRIPT_TYPE_INSTANCE = 8, SMART_SCRIPT_TYPE_TIMED_ACTIONLIST = 9, SMART_SCRIPT_TYPE_MAX = 10
}
 
enum  SmartAITypeMaskId {
  SMART_SCRIPT_TYPE_MASK_CREATURE = 1, SMART_SCRIPT_TYPE_MASK_GAMEOBJECT = 2, SMART_SCRIPT_TYPE_MASK_AREATRIGGER = 4, SMART_SCRIPT_TYPE_MASK_EVENT = 8,
  SMART_SCRIPT_TYPE_MASK_GOSSIP = 16, SMART_SCRIPT_TYPE_MASK_QUEST = 32, SMART_SCRIPT_TYPE_MASK_SPELL = 64, SMART_SCRIPT_TYPE_MASK_TRANSPORT = 128,
  SMART_SCRIPT_TYPE_MASK_INSTANCE = 256, SMART_SCRIPT_TYPE_MASK_TIMED_ACTIONLIST = 512
}
 
enum  SmartEventFlags {
  SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008,
  SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, SMART_EVENT_FLAG_RESERVED_5 = 0x020, SMART_EVENT_FLAG_RESERVED_6 = 0x040, SMART_EVENT_FLAG_DEBUG_ONLY = 0x080,
  SMART_EVENT_FLAG_DONT_RESET = 0x100, SMART_EVENT_FLAG_DIFFICULTY_ALL = (SMART_EVENT_FLAG_DIFFICULTY_0|SMART_EVENT_FLAG_DIFFICULTY_1|SMART_EVENT_FLAG_DIFFICULTY_2|SMART_EVENT_FLAG_DIFFICULTY_3), SMART_EVENT_FLAGS_ALL = (SMART_EVENT_FLAG_NOT_REPEATABLE|SMART_EVENT_FLAG_DIFFICULTY_ALL|SMART_EVENT_FLAG_RESERVED_5|SMART_EVENT_FLAG_RESERVED_6|SMART_EVENT_FLAG_DEBUG_ONLY|SMART_EVENT_FLAG_DONT_RESET)
}
 
enum  SmartCastFlags { SMARTCAST_INTERRUPT_PREVIOUS = 0x01, SMARTCAST_TRIGGERED = 0x02, SMARTCAST_AURA_NOT_PRESENT = 0x20, SMARTCAST_COMBAT_MOVE = 0x40 }
 

Variables

const uint32 SmartPhaseMask [SMART_EVENT_PHASE_COUNT][2]
 
const uint32 SmartAITypeMask [SMART_SCRIPT_TYPE_MAX][2]
 
const uint32 SmartAIEventMask [SMART_EVENT_END][2]
 

Macro Definition Documentation

#define sSmartScriptMgr   SmartAIMgr::instance()

Typedef Documentation

typedef std::map<uint32 , std::pair<uint32 , SpellEffIndex > > CacheSpellContainer

Definition at line 1473 of file SmartScriptMgr.h.

typedef std::pair<CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator> CacheSpellContainerBounds

Definition at line 1474 of file SmartScriptMgr.h.

typedef std::list<WorldObject*> ObjectList

Definition at line 1386 of file SmartScriptMgr.h.

Definition at line 1438 of file SmartScriptMgr.h.

typedef std::vector<SmartScriptHolder> SmartAIEventList

Definition at line 1467 of file SmartScriptMgr.h.

Definition at line 1384 of file SmartScriptMgr.h.

Enumeration Type Documentation

enum eSmartAI
Enumerator
SMART_EVENT_PARAM_COUNT 
SMART_ACTION_PARAM_COUNT 
SMART_SUMMON_COUNTER 
SMART_ESCORT_LAST_OOC_POINT 
SMART_RANDOM_POINT 
SMART_ESCORT_TARGETS 

Definition at line 1193 of file SmartScriptMgr.h.

Enumerator
SMART_ACTION_NONE 
SMART_ACTION_TALK 
SMART_ACTION_SET_FACTION 
SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL 
SMART_ACTION_SOUND 
SMART_ACTION_PLAY_EMOTE 
SMART_ACTION_FAIL_QUEST 
SMART_ACTION_ADD_QUEST 
SMART_ACTION_SET_REACT_STATE 
SMART_ACTION_ACTIVATE_GOBJECT 
SMART_ACTION_RANDOM_EMOTE 
SMART_ACTION_CAST 
SMART_ACTION_SUMMON_CREATURE 
SMART_ACTION_THREAT_SINGLE_PCT 
SMART_ACTION_THREAT_ALL_PCT 
SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS 
SMART_ACTION_UNUSED_16 
SMART_ACTION_SET_EMOTE_STATE 
SMART_ACTION_SET_UNIT_FLAG 
SMART_ACTION_REMOVE_UNIT_FLAG 
SMART_ACTION_AUTO_ATTACK 
SMART_ACTION_ALLOW_COMBAT_MOVEMENT 
SMART_ACTION_SET_EVENT_PHASE 
SMART_ACTION_INC_EVENT_PHASE 
SMART_ACTION_EVADE 
SMART_ACTION_FLEE_FOR_ASSIST 
SMART_ACTION_CALL_GROUPEVENTHAPPENS 
SMART_ACTION_COMBAT_STOP 
SMART_ACTION_REMOVEAURASFROMSPELL 
SMART_ACTION_FOLLOW 
SMART_ACTION_RANDOM_PHASE 
SMART_ACTION_RANDOM_PHASE_RANGE 
SMART_ACTION_RESET_GOBJECT 
SMART_ACTION_CALL_KILLEDMONSTER 
SMART_ACTION_SET_INST_DATA 
SMART_ACTION_SET_INST_DATA64 
SMART_ACTION_UPDATE_TEMPLATE 
SMART_ACTION_DIE 
SMART_ACTION_SET_IN_COMBAT_WITH_ZONE 
SMART_ACTION_CALL_FOR_HELP 
SMART_ACTION_SET_SHEATH 
SMART_ACTION_FORCE_DESPAWN 
SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL 
SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL 
SMART_ACTION_SET_INGAME_PHASE_MASK 
SMART_ACTION_SET_DATA 
SMART_ACTION_MOVE_FORWARD 
SMART_ACTION_SET_VISIBILITY 
SMART_ACTION_SET_ACTIVE 
SMART_ACTION_ATTACK_START 
SMART_ACTION_SUMMON_GO 
SMART_ACTION_KILL_UNIT 
SMART_ACTION_ACTIVATE_TAXI 
SMART_ACTION_WP_START 
SMART_ACTION_WP_PAUSE 
SMART_ACTION_WP_STOP 
SMART_ACTION_ADD_ITEM 
SMART_ACTION_REMOVE_ITEM 
SMART_ACTION_INSTALL_AI_TEMPLATE 
SMART_ACTION_SET_RUN 
SMART_ACTION_SET_FLY 
SMART_ACTION_SET_SWIM 
SMART_ACTION_TELEPORT 
SMART_ACTION_SET_COUNTER 
SMART_ACTION_STORE_TARGET_LIST 
SMART_ACTION_WP_RESUME 
SMART_ACTION_SET_ORIENTATION 
SMART_ACTION_CREATE_TIMED_EVENT 
SMART_ACTION_PLAYMOVIE 
SMART_ACTION_MOVE_TO_POS 
SMART_ACTION_RESPAWN_TARGET 
SMART_ACTION_EQUIP 
SMART_ACTION_CLOSE_GOSSIP 
SMART_ACTION_TRIGGER_TIMED_EVENT 
SMART_ACTION_REMOVE_TIMED_EVENT 
SMART_ACTION_ADD_AURA 
SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT 
SMART_ACTION_RESET_SCRIPT_BASE_OBJECT 
SMART_ACTION_CALL_SCRIPT_RESET 
SMART_ACTION_SET_RANGED_MOVEMENT 
SMART_ACTION_CALL_TIMED_ACTIONLIST 
SMART_ACTION_SET_NPC_FLAG 
SMART_ACTION_ADD_NPC_FLAG 
SMART_ACTION_REMOVE_NPC_FLAG 
SMART_ACTION_SIMPLE_TALK 
SMART_ACTION_INVOKER_CAST 
SMART_ACTION_CROSS_CAST 
SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST 
SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST 
SMART_ACTION_RANDOM_MOVE 
SMART_ACTION_SET_UNIT_FIELD_BYTES_1 
SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 
SMART_ACTION_INTERRUPT_SPELL 
SMART_ACTION_SEND_GO_CUSTOM_ANIM 
SMART_ACTION_SET_DYNAMIC_FLAG 
SMART_ACTION_ADD_DYNAMIC_FLAG 
SMART_ACTION_REMOVE_DYNAMIC_FLAG 
SMART_ACTION_JUMP_TO_POS 
SMART_ACTION_SEND_GOSSIP_MENU 
SMART_ACTION_GO_SET_LOOT_STATE 
SMART_ACTION_SEND_TARGET_TO_TARGET 
SMART_ACTION_SET_HOME_POS 
SMART_ACTION_SET_HEALTH_REGEN 
SMART_ACTION_SET_ROOT 
SMART_ACTION_SET_GO_FLAG 
SMART_ACTION_ADD_GO_FLAG 
SMART_ACTION_REMOVE_GO_FLAG 
SMART_ACTION_SUMMON_CREATURE_GROUP 
SMART_ACTION_SET_POWER 
SMART_ACTION_ADD_POWER 
SMART_ACTION_REMOVE_POWER 
SMART_ACTION_GAME_EVENT_STOP 
SMART_ACTION_GAME_EVENT_START 
SMART_ACTION_START_CLOSEST_WAYPOINT 
SMART_ACTION_MOVE_OFFSET 
SMART_ACTION_RANDOM_SOUND 
SMART_ACTION_END 

Definition at line 428 of file SmartScriptMgr.h.

429 {
430  SMART_ACTION_NONE = 0, // No action
431  SMART_ACTION_TALK = 1, // groupID from creature_text, duration to wait before TEXT_OVER event is triggered, useTalkTarget (0/1) - use target as talk target
432  SMART_ACTION_SET_FACTION = 2, // FactionId (or 0 for default)
433  SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph)
434  SMART_ACTION_SOUND = 4, // SoundId, onlySelf
435  SMART_ACTION_PLAY_EMOTE = 5, // EmoteId
436  SMART_ACTION_FAIL_QUEST = 6, // QuestID
437  SMART_ACTION_ADD_QUEST = 7, // QuestID
438  SMART_ACTION_SET_REACT_STATE = 8, // state
440  SMART_ACTION_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3...
441  SMART_ACTION_CAST = 11, // SpellId, CastFlags
442  SMART_ACTION_SUMMON_CREATURE = 12, // CreatureID, summonType, duration in ms, attackInvoker
443  SMART_ACTION_THREAT_SINGLE_PCT = 13, // Threat%
444  SMART_ACTION_THREAT_ALL_PCT = 14, // Threat%
446  SMART_ACTION_UNUSED_16 = 16, // UNUSED
447  SMART_ACTION_SET_EMOTE_STATE = 17, // emoteID
448  SMART_ACTION_SET_UNIT_FLAG = 18, // Flags (may be more than one field OR'd together), Target
449  SMART_ACTION_REMOVE_UNIT_FLAG = 19, // Flags (may be more than one field OR'd together), Target
450  SMART_ACTION_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking)
451  SMART_ACTION_ALLOW_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking)
452  SMART_ACTION_SET_EVENT_PHASE = 22, // Phase
453  SMART_ACTION_INC_EVENT_PHASE = 23, // Value (may be negative to decrement phase, should not be 0)
454  SMART_ACTION_EVADE = 24, // No Params
455  SMART_ACTION_FLEE_FOR_ASSIST = 25, // With Emote
456  SMART_ACTION_CALL_GROUPEVENTHAPPENS = 26, // QuestID
457  SMART_ACTION_COMBAT_STOP = 27, //
458  SMART_ACTION_REMOVEAURASFROMSPELL = 28, // Spellid (0 removes all auras), charges (0 removes aura)
459  SMART_ACTION_FOLLOW = 29, // Distance (0 = default), Angle (0 = default), EndCreatureEntry, credit, creditType (0monsterkill, 1event)
460  SMART_ACTION_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3...
461  SMART_ACTION_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax
463  SMART_ACTION_CALL_KILLEDMONSTER = 33, // CreatureId,
464  SMART_ACTION_SET_INST_DATA = 34, // Field, Data
465  SMART_ACTION_SET_INST_DATA64 = 35, // Field,
466  SMART_ACTION_UPDATE_TEMPLATE = 36, // Entry
467  SMART_ACTION_DIE = 37, // No Params
468  SMART_ACTION_SET_IN_COMBAT_WITH_ZONE = 38, // No Params
469  SMART_ACTION_CALL_FOR_HELP = 39, // Radius, With Emote
470  SMART_ACTION_SET_SHEATH = 40, // Sheath (0-unarmed, 1-melee, 2-ranged)
471  SMART_ACTION_FORCE_DESPAWN = 41, // timer
472  SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL = 42, // MinHpValue(+pct, -flat)
473  SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL = 43, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to dismount)
475  SMART_ACTION_SET_DATA = 45, // Field, Data (only creature @todo)
476  SMART_ACTION_MOVE_FORWARD = 46, // distance
477  SMART_ACTION_SET_VISIBILITY = 47, // on/off
478  SMART_ACTION_SET_ACTIVE = 48, // on/off
480  SMART_ACTION_SUMMON_GO = 50, // GameObjectID, DespawnTime in s
481  SMART_ACTION_KILL_UNIT = 51, //
482  SMART_ACTION_ACTIVATE_TAXI = 52, // TaxiID
483  SMART_ACTION_WP_START = 53, // run/walk, pathID, canRepeat, quest, despawntime, reactState
484  SMART_ACTION_WP_PAUSE = 54, // time
485  SMART_ACTION_WP_STOP = 55, // despawnTime, quest, fail?
486  SMART_ACTION_ADD_ITEM = 56, // itemID, count
487  SMART_ACTION_REMOVE_ITEM = 57, // itemID, count
488  SMART_ACTION_INSTALL_AI_TEMPLATE = 58, // AITemplateID
489  SMART_ACTION_SET_RUN = 59, // 0/1
490  SMART_ACTION_SET_FLY = 60, // 0/1
491  SMART_ACTION_SET_SWIM = 61, // 0/1
492  SMART_ACTION_TELEPORT = 62, // mapID,
493  SMART_ACTION_SET_COUNTER = 63, // id, value, reset (0/1)
494  SMART_ACTION_STORE_TARGET_LIST = 64, // varID,
495  SMART_ACTION_WP_RESUME = 65, // none
497  SMART_ACTION_CREATE_TIMED_EVENT = 67, // id, InitialMin, InitialMax, RepeatMin(only if it repeats), RepeatMax(only if it repeats), chance
498  SMART_ACTION_PLAYMOVIE = 68, // entry
499  SMART_ACTION_MOVE_TO_POS = 69, // PointId, xyz
501  SMART_ACTION_EQUIP = 71, // 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
502  SMART_ACTION_CLOSE_GOSSIP = 72, // none
503  SMART_ACTION_TRIGGER_TIMED_EVENT = 73, // id(>1)
504  SMART_ACTION_REMOVE_TIMED_EVENT = 74, // id(>1)
505  SMART_ACTION_ADD_AURA = 75, // spellid, targets
506  SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT = 76, // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing
508  SMART_ACTION_CALL_SCRIPT_RESET = 78, // none
509  SMART_ACTION_SET_RANGED_MOVEMENT = 79, // Distance, angle
510  SMART_ACTION_CALL_TIMED_ACTIONLIST = 80, // ID (overwrites already running actionlist), stop after combat?(0/1), timer update type(0-OOC, 1-IC, 2-ALWAYS)
511  SMART_ACTION_SET_NPC_FLAG = 81, // Flags
512  SMART_ACTION_ADD_NPC_FLAG = 82, // Flags
513  SMART_ACTION_REMOVE_NPC_FLAG = 83, // Flags
514  SMART_ACTION_SIMPLE_TALK = 84, // 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)
515  SMART_ACTION_INVOKER_CAST = 85, // spellID, castFlags, if avaliable, last used invoker will cast spellId with castFlags on targets
516  SMART_ACTION_CROSS_CAST = 86, // 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)
517  SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST = 87, // script9 ids 1-9
518  SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST = 88, // script9 id min, max
519  SMART_ACTION_RANDOM_MOVE = 89, // maxDist
520  SMART_ACTION_SET_UNIT_FIELD_BYTES_1 = 90, // bytes, target
521  SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1 = 91, // bytes, target
523  SMART_ACTION_SEND_GO_CUSTOM_ANIM = 93, // anim id
524  SMART_ACTION_SET_DYNAMIC_FLAG = 94, // Flags
525  SMART_ACTION_ADD_DYNAMIC_FLAG = 95, // Flags
526  SMART_ACTION_REMOVE_DYNAMIC_FLAG = 96, // Flags
527  SMART_ACTION_JUMP_TO_POS = 97, // speedXY, speedZ, targetX, targetY, targetZ
528  SMART_ACTION_SEND_GOSSIP_MENU = 98, // menuId, optionId
529  SMART_ACTION_GO_SET_LOOT_STATE = 99, // state
531  SMART_ACTION_SET_HOME_POS = 101, // none
532  SMART_ACTION_SET_HEALTH_REGEN = 102, // 0/1
533  SMART_ACTION_SET_ROOT = 103, // off/on
534  SMART_ACTION_SET_GO_FLAG = 104, // Flags
535  SMART_ACTION_ADD_GO_FLAG = 105, // Flags
536  SMART_ACTION_REMOVE_GO_FLAG = 106, // Flags
537  SMART_ACTION_SUMMON_CREATURE_GROUP = 107, // Group, attackInvoker
538  SMART_ACTION_SET_POWER = 108, // PowerType, newPower
539  SMART_ACTION_ADD_POWER = 109, // PowerType, newPower
540  SMART_ACTION_REMOVE_POWER = 110, // PowerType, newPower
541  SMART_ACTION_GAME_EVENT_STOP = 111, // GameEventId
542  SMART_ACTION_GAME_EVENT_START = 112, // GameEventId
543  SMART_ACTION_START_CLOSEST_WAYPOINT = 113, // wp1, wp2, wp3, wp4, wp5, wp6, wp7
545  SMART_ACTION_RANDOM_SOUND = 115, // SoundId1, SoundId2, SoundId3, SoundId4, SoundId5, onlySelf
546 
547  SMART_ACTION_END = 116
548 };
Enumerator
SMART_EVENT_UPDATE_IC 
SMART_EVENT_UPDATE_OOC 
SMART_EVENT_HEALT_PCT 
SMART_EVENT_MANA_PCT 
SMART_EVENT_AGGRO 
SMART_EVENT_KILL 
SMART_EVENT_DEATH 
SMART_EVENT_EVADE 
SMART_EVENT_SPELLHIT 
SMART_EVENT_RANGE 
SMART_EVENT_OOC_LOS 
SMART_EVENT_RESPAWN 
SMART_EVENT_TARGET_HEALTH_PCT 
SMART_EVENT_VICTIM_CASTING 
SMART_EVENT_FRIENDLY_HEALTH 
SMART_EVENT_FRIENDLY_IS_CC 
SMART_EVENT_FRIENDLY_MISSING_BUFF 
SMART_EVENT_SUMMONED_UNIT 
SMART_EVENT_TARGET_MANA_PCT 
SMART_EVENT_ACCEPTED_QUEST 
SMART_EVENT_REWARD_QUEST 
SMART_EVENT_REACHED_HOME 
SMART_EVENT_RECEIVE_EMOTE 
SMART_EVENT_HAS_AURA 
SMART_EVENT_TARGET_BUFFED 
SMART_EVENT_RESET 
SMART_EVENT_IC_LOS 
SMART_EVENT_PASSENGER_BOARDED 
SMART_EVENT_PASSENGER_REMOVED 
SMART_EVENT_CHARMED 
SMART_EVENT_CHARMED_TARGET 
SMART_EVENT_SPELLHIT_TARGET 
SMART_EVENT_DAMAGED 
SMART_EVENT_DAMAGED_TARGET 
SMART_EVENT_MOVEMENTINFORM 
SMART_EVENT_SUMMON_DESPAWNED 
SMART_EVENT_CORPSE_REMOVED 
SMART_EVENT_AI_INIT 
SMART_EVENT_DATA_SET 
SMART_EVENT_WAYPOINT_START 
SMART_EVENT_WAYPOINT_REACHED 
SMART_EVENT_TRANSPORT_ADDPLAYER 
SMART_EVENT_TRANSPORT_ADDCREATURE 
SMART_EVENT_TRANSPORT_REMOVE_PLAYER 
SMART_EVENT_TRANSPORT_RELOCATE 
SMART_EVENT_INSTANCE_PLAYER_ENTER 
SMART_EVENT_AREATRIGGER_ONTRIGGER 
SMART_EVENT_QUEST_ACCEPTED 
SMART_EVENT_QUEST_OBJ_COPLETETION 
SMART_EVENT_QUEST_COMPLETION 
SMART_EVENT_QUEST_REWARDED 
SMART_EVENT_QUEST_FAIL 
SMART_EVENT_TEXT_OVER 
SMART_EVENT_RECEIVE_HEAL 
SMART_EVENT_JUST_SUMMONED 
SMART_EVENT_WAYPOINT_PAUSED 
SMART_EVENT_WAYPOINT_RESUMED 
SMART_EVENT_WAYPOINT_STOPPED 
SMART_EVENT_WAYPOINT_ENDED 
SMART_EVENT_TIMED_EVENT_TRIGGERED 
SMART_EVENT_UPDATE 
SMART_EVENT_LINK 
SMART_EVENT_GOSSIP_SELECT 
SMART_EVENT_JUST_CREATED 
SMART_EVENT_GOSSIP_HELLO 
SMART_EVENT_FOLLOW_COMPLETED 
SMART_EVENT_DUMMY_EFFECT 
SMART_EVENT_IS_BEHIND_TARGET 
SMART_EVENT_GAME_EVENT_START 
SMART_EVENT_GAME_EVENT_END 
SMART_EVENT_GO_STATE_CHANGED 
SMART_EVENT_GO_EVENT_INFORM 
SMART_EVENT_ACTION_DONE 
SMART_EVENT_ON_SPELLCLICK 
SMART_EVENT_FRIENDLY_HEALTH_PCT 
SMART_EVENT_DISTANCE_CREATURE 
SMART_EVENT_DISTANCE_GAMEOBJECT 
SMART_EVENT_COUNTER_SET 
SMART_EVENT_END 

Definition at line 93 of file SmartScriptMgr.h.

94 {
95  SMART_EVENT_UPDATE_IC = 0, // InitialMin, InitialMax, RepeatMin, RepeatMax
96  SMART_EVENT_UPDATE_OOC = 1, // InitialMin, InitialMax, RepeatMin, RepeatMax
97  SMART_EVENT_HEALT_PCT = 2, // HPMin%, HPMax%, RepeatMin, RepeatMax
98  SMART_EVENT_MANA_PCT = 3, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
99  SMART_EVENT_AGGRO = 4, // NONE
100  SMART_EVENT_KILL = 5, // CooldownMin0, CooldownMax1, playerOnly2, else creature entry3
101  SMART_EVENT_DEATH = 6, // NONE
102  SMART_EVENT_EVADE = 7, // NONE
103  SMART_EVENT_SPELLHIT = 8, // SpellID, School, CooldownMin, CooldownMax
104  SMART_EVENT_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax
105  SMART_EVENT_OOC_LOS = 10, // NoHostile, MaxRnage, CooldownMin, CooldownMax
106  SMART_EVENT_RESPAWN = 11, // type, MapId, ZoneId
107  SMART_EVENT_TARGET_HEALTH_PCT = 12, // HPMin%, HPMax%, RepeatMin, RepeatMax
108  SMART_EVENT_VICTIM_CASTING = 13, // RepeatMin, RepeatMax, spellid
109  SMART_EVENT_FRIENDLY_HEALTH = 14, // HPDeficit, Radius, RepeatMin, RepeatMax
110  SMART_EVENT_FRIENDLY_IS_CC = 15, // Radius, RepeatMin, RepeatMax
111  SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
112  SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax
113  SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
114  SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID(0any)
115  SMART_EVENT_REWARD_QUEST = 20, // QuestID(0any)
116  SMART_EVENT_REACHED_HOME = 21, // NONE
117  SMART_EVENT_RECEIVE_EMOTE = 22, // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3
118  SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
119  SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
120  SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
121  SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax
122  SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
123  SMART_EVENT_PASSENGER_REMOVED = 28, // CooldownMin, CooldownMax
124  SMART_EVENT_CHARMED = 29, // NONE
125  SMART_EVENT_CHARMED_TARGET = 30, // NONE
126  SMART_EVENT_SPELLHIT_TARGET = 31, // SpellID, School, CooldownMin, CooldownMax
127  SMART_EVENT_DAMAGED = 32, // MinDmg, MaxDmg, CooldownMin, CooldownMax
128  SMART_EVENT_DAMAGED_TARGET = 33, // MinDmg, MaxDmg, CooldownMin, CooldownMax
129  SMART_EVENT_MOVEMENTINFORM = 34, // MovementType(any), PointID
130  SMART_EVENT_SUMMON_DESPAWNED = 35, // Entry, CooldownMin, CooldownMax
131  SMART_EVENT_CORPSE_REMOVED = 36, // NONE
132  SMART_EVENT_AI_INIT = 37, // NONE
133  SMART_EVENT_DATA_SET = 38, // Id, Value, CooldownMin, CooldownMax
134  SMART_EVENT_WAYPOINT_START = 39, // PointId(0any), pathID(0any)
135  SMART_EVENT_WAYPOINT_REACHED = 40, // PointId(0any), pathID(0any)
136  SMART_EVENT_TRANSPORT_ADDPLAYER = 41, // NONE
137  SMART_EVENT_TRANSPORT_ADDCREATURE = 42, // Entry (0 any)
139  SMART_EVENT_TRANSPORT_RELOCATE = 44, // PointId
140  SMART_EVENT_INSTANCE_PLAYER_ENTER = 45, // Team (0 any), CooldownMin, CooldownMax
141  SMART_EVENT_AREATRIGGER_ONTRIGGER = 46, // TriggerId(0 any)
142  SMART_EVENT_QUEST_ACCEPTED = 47, // none
144  SMART_EVENT_QUEST_COMPLETION = 49, // none
145  SMART_EVENT_QUEST_REWARDED = 50, // none
146  SMART_EVENT_QUEST_FAIL = 51, // none
147  SMART_EVENT_TEXT_OVER = 52, // GroupId from creature_text, creature entry who talks (0 any)
148  SMART_EVENT_RECEIVE_HEAL = 53, // MinHeal, MaxHeal, CooldownMin, CooldownMax
149  SMART_EVENT_JUST_SUMMONED = 54, // none
150  SMART_EVENT_WAYPOINT_PAUSED = 55, // PointId(0any), pathID(0any)
151  SMART_EVENT_WAYPOINT_RESUMED = 56, // PointId(0any), pathID(0any)
152  SMART_EVENT_WAYPOINT_STOPPED = 57, // PointId(0any), pathID(0any)
153  SMART_EVENT_WAYPOINT_ENDED = 58, // PointId(0any), pathID(0any)
155  SMART_EVENT_UPDATE = 60, // InitialMin, InitialMax, RepeatMin, RepeatMax
156  SMART_EVENT_LINK = 61, // INTERNAL USAGE, no params, used to link together multiple events, does not use any extra resources to iterate event lists needlessly
157  SMART_EVENT_GOSSIP_SELECT = 62, // menuID, actionID
158  SMART_EVENT_JUST_CREATED = 63, // none
159  SMART_EVENT_GOSSIP_HELLO = 64, // none
160  SMART_EVENT_FOLLOW_COMPLETED = 65, // none
161  SMART_EVENT_DUMMY_EFFECT = 66, // spellId, effectIndex
162  SMART_EVENT_IS_BEHIND_TARGET = 67, // cooldownMin, CooldownMax
163  SMART_EVENT_GAME_EVENT_START = 68, // game_event.Entry
164  SMART_EVENT_GAME_EVENT_END = 69, // game_event.Entry
165  SMART_EVENT_GO_STATE_CHANGED = 70, // go state
166  SMART_EVENT_GO_EVENT_INFORM = 71, // eventId
167  SMART_EVENT_ACTION_DONE = 72, // eventId (SharedDefines.EventId)
168  SMART_EVENT_ON_SPELLCLICK = 73, // clicker (unit)
169  SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
170  SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat
171  SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat
172  SMART_EVENT_COUNTER_SET = 77, // id, value, cooldownMin, cooldownMax
173 
174  SMART_EVENT_END = 78
175 };
Enumerator
SMART_EVENT_PHASE_ALWAYS 
SMART_EVENT_PHASE_1 
SMART_EVENT_PHASE_2 
SMART_EVENT_PHASE_3 
SMART_EVENT_PHASE_4 
SMART_EVENT_PHASE_5 
SMART_EVENT_PHASE_6 
SMART_EVENT_PHASE_7 
SMART_EVENT_PHASE_8 
SMART_EVENT_PHASE_9 
SMART_EVENT_PHASE_MAX 
SMART_EVENT_PHASE_COUNT 

Definition at line 48 of file SmartScriptMgr.h.

Enumerator
SMART_EVENT_PHASE_ALWAYS_BIT 
SMART_EVENT_PHASE_1_BIT 
SMART_EVENT_PHASE_2_BIT 
SMART_EVENT_PHASE_3_BIT 
SMART_EVENT_PHASE_4_BIT 
SMART_EVENT_PHASE_5_BIT 
SMART_EVENT_PHASE_6_BIT 
SMART_EVENT_PHASE_7_BIT 
SMART_EVENT_PHASE_8_BIT 
SMART_EVENT_PHASE_9_BIT 
SMART_EVENT_PHASE_ALL 

Definition at line 65 of file SmartScriptMgr.h.

Enumerator
SMART_SCRIPT_RESPAWN_CONDITION_NONE 
SMART_SCRIPT_RESPAWN_CONDITION_MAP 
SMART_SCRIPT_RESPAWN_CONDITION_AREA 
SMART_SCRIPT_RESPAWN_CONDITION_END 

Definition at line 420 of file SmartScriptMgr.h.

Enumerator
SMART_TARGET_NONE 
SMART_TARGET_SELF 
SMART_TARGET_VICTIM 
SMART_TARGET_HOSTILE_SECOND_AGGRO 
SMART_TARGET_HOSTILE_LAST_AGGRO 
SMART_TARGET_HOSTILE_RANDOM 
SMART_TARGET_HOSTILE_RANDOM_NOT_TOP 
SMART_TARGET_ACTION_INVOKER 
SMART_TARGET_POSITION 
SMART_TARGET_CREATURE_RANGE 
SMART_TARGET_CREATURE_GUID 
SMART_TARGET_CREATURE_DISTANCE 
SMART_TARGET_STORED 
SMART_TARGET_GAMEOBJECT_RANGE 
SMART_TARGET_GAMEOBJECT_GUID 
SMART_TARGET_GAMEOBJECT_DISTANCE 
SMART_TARGET_INVOKER_PARTY 
SMART_TARGET_PLAYER_RANGE 
SMART_TARGET_PLAYER_DISTANCE 
SMART_TARGET_CLOSEST_CREATURE 
SMART_TARGET_CLOSEST_GAMEOBJECT 
SMART_TARGET_CLOSEST_PLAYER 
SMART_TARGET_ACTION_INVOKER_VEHICLE 
SMART_TARGET_OWNER_OR_SUMMONER 
SMART_TARGET_THREAT_LIST 
SMART_TARGET_CLOSEST_ENEMY 
SMART_TARGET_CLOSEST_FRIENDLY 
SMART_TARGET_END 

Definition at line 1056 of file SmartScriptMgr.h.

1057 {
1058  SMART_TARGET_NONE = 0, // NONE, defaulting to invoket
1059  SMART_TARGET_SELF = 1, // Self cast
1060  SMART_TARGET_VICTIM = 2, // Our current target (ie: highest aggro)
1061  SMART_TARGET_HOSTILE_SECOND_AGGRO = 3, // Second highest aggro
1062  SMART_TARGET_HOSTILE_LAST_AGGRO = 4, // Dead last on aggro
1063  SMART_TARGET_HOSTILE_RANDOM = 5, // Just any random target on our threat list
1064  SMART_TARGET_HOSTILE_RANDOM_NOT_TOP = 6, // Any random target except top threat
1065  SMART_TARGET_ACTION_INVOKER = 7, // Unit who caused this Event to occur
1066  SMART_TARGET_POSITION = 8, // use xyz from event params
1067  SMART_TARGET_CREATURE_RANGE = 9, // CreatureEntry(0any), minDist, maxDist
1068  SMART_TARGET_CREATURE_GUID = 10, // guid, entry
1069  SMART_TARGET_CREATURE_DISTANCE = 11, // CreatureEntry(0any), maxDist
1070  SMART_TARGET_STORED = 12, // id, uses pre-stored target(list)
1071  SMART_TARGET_GAMEOBJECT_RANGE = 13, // entry(0any), min, max
1072  SMART_TARGET_GAMEOBJECT_GUID = 14, // guid, entry
1073  SMART_TARGET_GAMEOBJECT_DISTANCE = 15, // entry(0any), maxDist
1074  SMART_TARGET_INVOKER_PARTY = 16, // invoker's party members
1075  SMART_TARGET_PLAYER_RANGE = 17, // min, max
1076  SMART_TARGET_PLAYER_DISTANCE = 18, // maxDist
1077  SMART_TARGET_CLOSEST_CREATURE = 19, // CreatureEntry(0any), maxDist, dead?
1078  SMART_TARGET_CLOSEST_GAMEOBJECT = 20, // entry(0any), maxDist
1079  SMART_TARGET_CLOSEST_PLAYER = 21, // maxDist
1080  SMART_TARGET_ACTION_INVOKER_VEHICLE = 22, // Unit's vehicle who caused this Event to occur
1081  SMART_TARGET_OWNER_OR_SUMMONER = 23, // Unit's owner or summoner
1082  SMART_TARGET_THREAT_LIST = 24, // All units on creature's threat list
1083  SMART_TARGET_CLOSEST_ENEMY = 25, // maxDist, playerOnly
1084  SMART_TARGET_CLOSEST_FRIENDLY = 26, // maxDist, playerOnly
1085 
1086  SMART_TARGET_END = 27
1087 };
Enumerator
SMARTAI_TEMPLATE_BASIC 
SMARTAI_TEMPLATE_CASTER 
SMARTAI_TEMPLATE_TURRET 
SMARTAI_TEMPLATE_PASSIVE 
SMARTAI_TEMPLATE_CAGED_GO_PART 
SMARTAI_TEMPLATE_CAGED_NPC_PART 
SMARTAI_TEMPLATE_END 

Definition at line 1045 of file SmartScriptMgr.h.

1046 {
1047  SMARTAI_TEMPLATE_BASIC = 0, //nothing is preset
1048  SMARTAI_TEMPLATE_CASTER = 1, //spellid, repeatMin, repeatMax, range, manaPCT +JOIN: target_param1 as castFlag
1049  SMARTAI_TEMPLATE_TURRET = 2, //spellid, repeatMin, repeatMax +JOIN: target_param1 as castFlag
1051  SMARTAI_TEMPLATE_CAGED_GO_PART = 4, //creatureID, give credit at point end?,
1052  SMARTAI_TEMPLATE_CAGED_NPC_PART = 5, //gameObjectID, despawntime, run?, dist, TextGroupID
1054 };
Enumerator
SMART_SCRIPT_TYPE_MASK_CREATURE 
SMART_SCRIPT_TYPE_MASK_GAMEOBJECT 
SMART_SCRIPT_TYPE_MASK_AREATRIGGER 
SMART_SCRIPT_TYPE_MASK_EVENT 
SMART_SCRIPT_TYPE_MASK_GOSSIP 
SMART_SCRIPT_TYPE_MASK_QUEST 
SMART_SCRIPT_TYPE_MASK_SPELL 
SMART_SCRIPT_TYPE_MASK_TRANSPORT 
SMART_SCRIPT_TYPE_MASK_INSTANCE 
SMART_SCRIPT_TYPE_MASK_TIMED_ACTIONLIST 

Definition at line 1218 of file SmartScriptMgr.h.

Enumerator
SMARTCAST_INTERRUPT_PREVIOUS 
SMARTCAST_TRIGGERED 
SMARTCAST_AURA_NOT_PRESENT 
SMARTCAST_COMBAT_MOVE 

Definition at line 1344 of file SmartScriptMgr.h.

1345 {
1346  SMARTCAST_INTERRUPT_PREVIOUS = 0x01, //Interrupt any spell casting
1347  SMARTCAST_TRIGGERED = 0x02, //Triggered (this makes spell cost zero mana and have no cast time)
1348  //SMARTCAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
1349  //SMARTCAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
1350  //SMARTCAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
1351  SMARTCAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
1352  SMARTCAST_COMBAT_MOVE = 0x40 //Prevents combat movement if cast successful. Allows movement on range, OOM, LOS
1353 };
Enumerator
SMART_EVENT_FLAG_NOT_REPEATABLE 
SMART_EVENT_FLAG_DIFFICULTY_0 
SMART_EVENT_FLAG_DIFFICULTY_1 
SMART_EVENT_FLAG_DIFFICULTY_2 
SMART_EVENT_FLAG_DIFFICULTY_3 
SMART_EVENT_FLAG_RESERVED_5 
SMART_EVENT_FLAG_RESERVED_6 
SMART_EVENT_FLAG_DEBUG_ONLY 
SMART_EVENT_FLAG_DONT_RESET 
SMART_EVENT_FLAG_DIFFICULTY_ALL 
SMART_EVENT_FLAGS_ALL 

Definition at line 1328 of file SmartScriptMgr.h.

1329 {
1330  SMART_EVENT_FLAG_NOT_REPEATABLE = 0x001, //Event can not repeat
1331  SMART_EVENT_FLAG_DIFFICULTY_0 = 0x002, //Event only occurs in instance difficulty 0
1332  SMART_EVENT_FLAG_DIFFICULTY_1 = 0x004, //Event only occurs in instance difficulty 1
1333  SMART_EVENT_FLAG_DIFFICULTY_2 = 0x008, //Event only occurs in instance difficulty 2
1334  SMART_EVENT_FLAG_DIFFICULTY_3 = 0x010, //Event only occurs in instance difficulty 3
1337  SMART_EVENT_FLAG_DEBUG_ONLY = 0x080, //Event only occurs in debug build
1338  SMART_EVENT_FLAG_DONT_RESET = 0x100, //Event will not reset in SmartScript::OnReset()
1339 
1342 };
Enumerator
SMART_SCRIPT_TYPE_CREATURE 
SMART_SCRIPT_TYPE_GAMEOBJECT 
SMART_SCRIPT_TYPE_AREATRIGGER 
SMART_SCRIPT_TYPE_EVENT 
SMART_SCRIPT_TYPE_GOSSIP 
SMART_SCRIPT_TYPE_QUEST 
SMART_SCRIPT_TYPE_SPELL 
SMART_SCRIPT_TYPE_TRANSPORT 
SMART_SCRIPT_TYPE_INSTANCE 
SMART_SCRIPT_TYPE_TIMED_ACTIONLIST 
SMART_SCRIPT_TYPE_MAX 

Definition at line 1203 of file SmartScriptMgr.h.

Variable Documentation

const uint32 SmartAIEventMask[SMART_EVENT_END][2]

Definition at line 1246 of file SmartScriptMgr.h.

Referenced by SmartAIMgr::IsEventValid().

const uint32 SmartAITypeMask[SMART_SCRIPT_TYPE_MAX][2]
Initial value:
=
{
}

Definition at line 1232 of file SmartScriptMgr.h.

Referenced by SmartAIMgr::IsEventValid().

const uint32 SmartPhaseMask[SMART_EVENT_PHASE_COUNT][2]