41#define TC_SAI_IS_BOOLEAN_VALID(e, value) \
45 TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses param {} of type Boolean with value {}, valid values are 0 or 1, skipped.", \
46 e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), STRINGIZE(value), value); \
71 TC_LOG_INFO(
"server.loading",
">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
79 Field* fields = result->Fetch();
86 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: invalid entryorguid (0), skipped loading.");
93 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: invalid source_type ({}), skipped loading.",
uint32(source_type));
109 if (creatureInfo->
AIName !=
"SmartAI")
111 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) is not using SmartAI, skipped loading.",
uint32(temp.
entryOrGuid));
125 if (gameObjectInfo->
AIName !=
"SmartGameObjectAI")
127 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) is not using SmartGameObjectAI, skipped loading.",
uint32(temp.
entryOrGuid));
174 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry ({} IsServerSide false) does not exist, skipped loading.",
uint32(temp.
entryOrGuid));
183 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: AreaTrigger entry ({} IsCustom true) does not exist, skipped loading.",
uint32(temp.
entryOrGuid));
189 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type {}", (
uint32)source_type);
202 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature guid ({}) does not exist, skipped loading.", -temp.
entryOrGuid);
209 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) guid ({}) does not exist, skipped loading.", creature->
id, -temp.
entryOrGuid);
213 if (creatureInfo->
AIName !=
"SmartAI")
215 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) guid ({}) is not using SmartAI, skipped loading.", creature->
id, -temp.
entryOrGuid);
225 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject guid ({}) does not exist, skipped loading.", -temp.
entryOrGuid);
232 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) guid ({}) does not exist, skipped loading.", gameObject->
id, -temp.
entryOrGuid);
236 if (gameObjectInfo->
AIName !=
"SmartGameObjectAI")
238 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) guid ({}) is not using SmartGameObjectAI, skipped loading.", gameObject->
id, -temp.
entryOrGuid);
244 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GUID-specific scripting not yet implemented for source_type {}", (
uint32)source_type);
253 bool invalidDifficulties =
false;
254 for (std::string_view token :
Trinity::Tokenize(fields[4].GetStringView(),
',',
false))
256 std::optional<std::underlying_type_t<Difficulty>> tokenValue = Trinity::StringTo<std::underlying_type_t<Difficulty>>(token);
257 if (!tokenValue.has_value())
259 invalidDifficulties =
true;
260 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Invalid difficulties for entryorguid ({}) source_type ({}) id ({}), skipped loading.",
268 invalidDifficulties =
true;
269 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Invalid difficulty id ({}) for entryorguid ({}) source_type ({}) id ({}), skipped loading.",
277 if (invalidDifficulties)
336 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
345 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
353 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
371 while (result->NextRow());
376 for (std::pair<int64 const, SmartAIEventList>& eventlistpair : eventmap)
384 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Link Event {} not found or invalid.",
393 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Link Source Event not found or invalid. Event will never trigger.",
414 TC_LOG_DEBUG(
"scripts.ai",
"SmartAIMgr::GetScript: Could not load Script for Entry {} ScriptType {}.", entry,
uint32(type));
421 SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
424 if (itr != list.end())
428 return SmartScriptHolderDummy;
433 SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
434 [link](
SmartScriptHolder& linked) { return linked.event_id == link && linked.GetEventType() == SMART_EVENT_LINK; });
436 if (itr != list.end())
440 return SmartScriptHolderDummy;
502 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has abs(`target.o` = {}) > 2*PI (orientation is expressed in radians)",
671 if (!
sObjectMgr->GetGameObjectTemplate(entry))
761 size_t paramsStructSize = [&]() ->
size_t
763 constexpr size_t NO_PARAMS = size_t(0);
848 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} is using an event with no unused params specified in SmartAIMgr::CheckUnusedEventParams(), please report this.",
855 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
857 for (
size_t index = paramsCount; index < rawCount; index++)
862 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused event_param{} with value {}, it should be 0.",
872 size_t paramsStructSize = [&]() ->
size_t
874 constexpr size_t NO_PARAMS = size_t(0);
1011 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
1018 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
1020 for (
size_t index = paramsCount; index < rawCount; index++)
1025 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused action_param{} with value {}, it should be 0.",
1035 size_t paramsStructSize = [&]() ->
size_t
1037 constexpr size_t NO_PARAMS = size_t(0);
1072 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} is using a target with no unused params specified in SmartAIMgr::CheckUnusedTargetParams(), please report this.",
1079 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
1081 for (
size_t index = paramsCount; index < rawCount; index++)
1086 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused target_param{} with value {}, it should be 0.",
1203 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses hostilityMode with invalid value {} (max allowed value {}), skipped.",
1374 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE did not provide creature guid or entry, skipped.");
1380 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE provided both an entry and guid, skipped.");
1399 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT did not provide gameobject guid or entry, skipped.");
1405 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT provided both an entry and guid, skipped.");
1411 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject guid {}, skipped.", e.
event.
distance.
guid);
1417 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject entry {}, skipped.", e.
event.
distance.
entry);
1427 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_COUNTER_SET using invalid counter id {}, skipped.", e.
event.
counter.
id);
1602 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero emote",
1616 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero action list",
1626 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero waypoint id",
1636 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero sound",
1658 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Effect: SPELL_EFFECT_KILL_CREDIT: (SpellId: {} targetA: {} - targetB: {}) has invalid target for this Action",
1690 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} specifies invalid entry {} (expected {}) for CasterTargetType guid ({},{})", e.
entryOrGuid, e.
GetScriptType(), e.
event_id, e.
GetActionType(), e.
action.
crossCast.
targetParam2, data->
id,
AsUnderlyingType(spawnType), guid);
1752 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero phase",
1783 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1784 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} creature summon: There is a summon spell for creature entry {} (SpellId: {}, effect: {})",
1802 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1803 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Kill Credit: There is a killcredit spell for creatureEntry {} (SpellId: {} effect: {})",
1841 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1842 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} gameobject summon: There is a summon spell for gameobject entry {} (SpellId: {}, effect: {})",
1862 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1863 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Create Item: There is a create item spell for item {} (SpellId: {} effect: {})",
1882 if (!path || path->
Nodes.empty())
1923 if (eventId < 1 || eventId >= events.size())
1942 if (eventId < 1 || eventId >= events.size())
1965 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id {} for creature {}, skipped.", equipId, e.
entryOrGuid);
1996 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_SET_INGAME_PHASE_ID uses invalid apply value {} (Should be 0 or 1) for creature {}, skipped",
apply, e.
entryOrGuid);
2002 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_SET_INGAME_PHASE_ID uses invalid phaseid {} for creature {}, skipped", phaseId, e.
entryOrGuid);
2014 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_SET_INGAME_PHASE_GROUP uses invalid apply value {} (Should be 0 or 1) for creature {}, skipped",
apply, e.
entryOrGuid);
2020 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_SET_INGAME_PHASE_GROUP uses invalid phase group id {} for creature {}, skipped", phaseGroup, e.
entryOrGuid);
2156 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} is trying to set invalid HP percent {}, skipped.",
2286 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has gameObjectAction parameter out of range (max allowed {}, current value {}), skipped.",
2441 if (spellEffectInfo.IsEffect(SPELL_EFFECT_SUMMON))
2442 SummonCreatureSpellStore.insert(std::make_pair(uint32(spellEffectInfo.MiscValue), std::make_pair(spellInfo->Id, spellEffectInfo.EffectIndex)));
2443 else if (spellEffectInfo.IsEffect(SPELL_EFFECT_SUMMON_OBJECT_WILD))
2444 SummonGameObjectSpellStore.insert(std::make_pair(uint32(spellEffectInfo.MiscValue), std::make_pair(spellInfo->Id, spellEffectInfo.EffectIndex)));
2445 else if (spellEffectInfo.IsEffect(SPELL_EFFECT_KILL_CREDIT) || spellEffectInfo.IsEffect(SPELL_EFFECT_KILL_CREDIT2))
2446 KillCreditSpellStore.insert(std::make_pair(uint32(spellEffectInfo.MiscValue), std::make_pair(spellInfo->Id, spellEffectInfo.EffectIndex)));
2447 else if (spellEffectInfo.IsEffect(SPELL_EFFECT_CREATE_ITEM))
2448 CreateItemSpellStore.insert(std::make_pair(uint32(spellEffectInfo.ItemType), std::make_pair(spellInfo->Id, spellEffectInfo.EffectIndex)));
#define sAreaTriggerDataStore
#define sConversationDataStore
DB2Storage< LightEntry > sLightStore("Light.db2", &LightLoadInfo::Instance)
DB2Storage< PhaseEntry > sPhaseStore("Phase.db2", &PhaseLoadInfo::Instance)
DB2Storage< DifficultyEntry > sDifficultyStore("Difficulty.db2", &DifficultyLoadInfo::Instance)
DB2Storage< ItemEntry > sItemStore("Item.db2", &ItemLoadInfo::Instance)
DB2Storage< EmotesTextEntry > sEmotesTextStore("EmotesText.db2", &EmotesTextLoadInfo::Instance)
DB2Storage< MapEntry > sMapStore("Map.db2", &MapLoadInfo::Instance)
DB2Storage< AnimKitEntry > sAnimKitStore("AnimKit.db2", &AnimKitLoadInfo::Instance)
DB2Storage< SpellVisualKitEntry > sSpellVisualKitStore("SpellVisualKit.db2", &SpellVisualKitLoadInfo::Instance)
DB2Storage< AreaTriggerEntry > sAreaTriggerStore("AreaTrigger.db2", &AreaTriggerLoadInfo::Instance)
DB2Storage< EmotesEntry > sEmotesStore("Emotes.db2", &EmotesLoadInfo::Instance)
DB2Storage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", &CreatureDisplayInfoLoadInfo::Instance)
DB2Storage< FactionTemplateEntry > sFactionTemplateStore("FactionTemplate.db2", &FactionTemplateLoadInfo::Instance)
DB2Storage< SoundKitEntry > sSoundKitStore("SoundKit.db2", &SoundKitLoadInfo::Instance)
DB2Storage< AreaTableEntry > sAreaTableStore("AreaTable.db2", &AreaTableLoadInfo::Instance)
DB2Storage< TaxiPathEntry > sTaxiPathStore("TaxiPath.db2", &TaxiPathLoadInfo::Instance)
DB2Storage< CinematicSequencesEntry > sCinematicSequencesStore("CinematicSequences.db2", &CinematicSequencesLoadInfo::Instance)
std::shared_ptr< PreparedResultSet > PreparedQueryResult
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
#define TC_LOG_WARN(filterType__,...)
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
bool IsInvalidMovementGeneratorType(uint8 const type)
@ TEMPSUMMON_MANUAL_DESPAWN
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
@ QUEST_FLAGS_COMPLETION_AREA_TRIGGER
@ QUEST_FLAGS_COMPLETION_EVENT
@ SPELL_EFFECT_KILL_CREDIT
@ SPELL_EFFECT_KILL_CREDIT2
#define TC_SAI_IS_BOOLEAN_VALID(e, value)
@ SMART_SCRIPT_TYPE_TIMED_ACTIONLIST
@ SMART_SCRIPT_TYPE_CREATURE
@ SMART_SCRIPT_TYPE_AREATRIGGER_ENTITY_CUSTOM
@ SMART_SCRIPT_TYPE_GAMEOBJECT
@ SMART_SCRIPT_TYPE_AREATRIGGER
@ SMART_SCRIPT_TYPE_AREATRIGGER_ENTITY
@ SMART_SCRIPT_TYPE_EVENT
@ SMART_SCRIPT_TYPE_SCENE
@ SMART_SCRIPT_TYPE_QUEST
std::vector< SmartScriptHolder > SmartAIEventList
@ SMART_EVENT_FLAGS_DEPRECATED
@ SMART_EVENT_FLAG_NOT_REPEATABLE
@ SMART_TARGET_LOOT_RECIPIENTS
@ SMART_TARGET_CLOSEST_CREATURE
@ SMART_TARGET_CREATURE_DISTANCE
@ SMART_TARGET_HOSTILE_RANDOM_NOT_TOP
@ SMART_TARGET_INVOKER_PARTY
@ SMART_TARGET_CLOSEST_FRIENDLY
@ SMART_TARGET_CLOSEST_GAMEOBJECT
@ SMART_TARGET_VEHICLE_PASSENGER
@ SMART_TARGET_GAMEOBJECT_RANGE
@ SMART_TARGET_CREATURE_GUID
@ SMART_TARGET_PLAYER_RANGE
@ SMART_TARGET_CLOSEST_UNSPAWNED_GAMEOBJECT
@ SMART_TARGET_GAMEOBJECT_DISTANCE
@ SMART_TARGET_CREATURE_RANGE
@ SMART_TARGET_CLOSEST_PLAYER
@ SMART_TARGET_HOSTILE_RANDOM
@ SMART_TARGET_GAMEOBJECT_GUID
@ SMART_TARGET_HOSTILE_SECOND_AGGRO
@ SMART_TARGET_OWNER_OR_SUMMONER
@ SMART_TARGET_ACTION_INVOKER
@ SMART_TARGET_HOSTILE_LAST_AGGRO
@ SMART_TARGET_ACTION_INVOKER_VEHICLE
@ SMART_TARGET_THREAT_LIST
@ SMART_TARGET_CLOSEST_ENEMY
@ SMART_TARGET_PLAYER_DISTANCE
std::unordered_map< int64, SmartAIEventList > SmartAIEventMap
std::vector< WorldObject * > ObjectVector
const uint32 SmartAIEventMask[SMART_EVENT_END][2]
@ SMART_SCRIPT_RESPAWN_CONDITION_AREA
@ SMART_SCRIPT_RESPAWN_CONDITION_MAP
@ SMART_ACTION_REMOVE_TIMED_EVENT
@ SMART_ACTION_SET_GO_FLAG
@ SMART_ACTION_UPDATE_TEMPLATE
@ SMART_ACTION_STORE_TARGET_LIST
@ SMART_ACTION_SET_HEALTH_REGEN
@ SMART_ACTION_ACTIVATE_GOBJECT
@ SMART_ACTION_FORCE_DESPAWN
@ SMART_ACTION_GAME_EVENT_START
@ SMART_ACTION_CREATE_CONVERSATION
@ SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST
@ SMART_ACTION_REMOVE_UNIT_FIELD_BYTES_1
@ SMART_ACTION_SET_DISABLE_GRAVITY
@ SMART_ACTION_SET_INST_DATA64
@ SMART_ACTION_SET_FACTION
@ SMART_ACTION_THREAT_SINGLE_PCT
@ SMART_ACTION_OFFER_QUEST
@ SMART_ACTION_OVERRIDE_LIGHT
@ SMART_ACTION_REMOVE_ALL_GAMEOBJECTS
@ SMART_ACTION_SET_UNIT_FIELD_BYTES_1
@ SMART_ACTION_CLOSE_GOSSIP
@ SMART_ACTION_DISABLE_EVADE
@ SMART_ACTION_ADD_GO_FLAG
@ SMART_ACTION_ADD_DYNAMIC_FLAG
@ SMART_ACTION_LOAD_EQUIPMENT
@ SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS
@ SMART_ACTION_ATTACK_START
@ SMART_ACTION_SET_UNIT_FLAG
@ SMART_ACTION_BECOME_PERSONAL_CLONE_FOR_PLAYER
@ SMART_ACTION_CALL_GROUPEVENTHAPPENS
@ SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
@ SMART_ACTION_INVOKER_CAST
@ SMART_ACTION_SCENE_PLAY
@ SMART_ACTION_JUMP_TO_POS
@ SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST
@ SMART_ACTION_SEND_GOSSIP_MENU
@ SMART_ACTION_SET_COUNTER
@ SMART_ACTION_FLEE_FOR_ASSIST
@ SMART_ACTION_ATTACK_STOP
@ SMART_ACTION_SIMPLE_TALK
@ SMART_ACTION_REMOVE_AURAS_BY_TYPE
@ SMART_ACTION_SPAWN_SPAWNGROUP
@ SMART_ACTION_ALLOW_COMBAT_MOVEMENT
@ SMART_ACTION_THREAT_ALL_PCT
@ SMART_ACTION_SET_MOVEMENT_SPEED
@ SMART_ACTION_PLAY_CINEMATIC
@ SMART_ACTION_ADD_NPC_FLAG
@ SMART_ACTION_FAIL_QUEST
@ SMART_ACTION_INTERRUPT_SPELL
@ SMART_ACTION_REMOVE_DYNAMIC_FLAG
@ SMART_ACTION_RANDOM_SOUND
@ SMART_ACTION_SET_IMMUNE_PC
@ SMART_ACTION_SCENE_CANCEL
@ SMART_ACTION_SET_AI_ANIM_KIT
@ SMART_ACTION_SEND_TARGET_TO_TARGET
@ SMART_ACTION_SET_INGAME_PHASE_ID
@ SMART_ACTION_REMOVE_POWER
@ SMART_ACTION_SET_DYNAMIC_FLAG
@ SMART_ACTION_GO_SET_GO_STATE
@ SMART_ACTION_MOVE_OFFSET
@ SMART_ACTION_REMOVE_ITEM
@ SMART_ACTION_SEND_GO_CUSTOM_ANIM
@ SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL
@ SMART_ACTION_REMOVE_UNIT_FLAG
@ SMART_ACTION_RANDOM_PHASE
@ SMART_ACTION_SET_EMOTE_STATE
@ SMART_ACTION_CROSS_CAST
@ SMART_ACTION_GAME_EVENT_STOP
@ SMART_ACTION_CALL_KILLEDMONSTER
@ SMART_ACTION_TRIGGER_GAME_EVENT
@ SMART_ACTION_CALL_SCRIPT_RESET
@ SMART_ACTION_PLAY_SPELL_VISUAL_KIT
@ SMART_ACTION_COMBAT_STOP
@ SMART_ACTION_SET_INGAME_PHASE_GROUP
@ SMART_ACTION_ACTIVATE_GAMEOBJECT
@ SMART_ACTION_ADD_TO_STORED_TARGET_LIST
@ SMART_ACTION_SET_HEALTH_PCT
@ SMART_ACTION_AUTO_ATTACK
@ SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
@ SMART_ACTION_SET_VISIBILITY
@ SMART_ACTION_RANDOM_PHASE_RANGE
@ SMART_ACTION_GO_SET_LOOT_STATE
@ SMART_ACTION_SET_SIGHT_DIST
@ SMART_ACTION_SET_INST_DATA
@ SMART_ACTION_PLAY_ANIMKIT
@ SMART_ACTION_REMOVE_GO_FLAG
@ SMART_ACTION_CALL_FOR_HELP
@ SMART_ACTION_SET_UNINTERACTIBLE
@ SMART_ACTION_OVERRIDE_WEATHER
@ SMART_ACTION_ADD_THREAT
@ SMART_ACTION_TRIGGER_RANDOM_TIMED_EVENT
@ SMART_ACTION_PLAY_EMOTE
@ SMART_ACTION_SET_EVENT_PHASE
@ SMART_ACTION_DESPAWN_SPAWNGROUP
@ SMART_ACTION_SET_CORPSE_DELAY
@ SMART_ACTION_SET_SHEATH
@ SMART_ACTION_SET_ORIENTATION
@ SMART_ACTION_RESPAWN_BY_SPAWNID
@ SMART_ACTION_SET_NPC_FLAG
@ SMART_ACTION_MOVE_TO_POS
@ SMART_ACTION_RANDOM_EMOTE
@ SMART_ACTION_INC_EVENT_PHASE
@ SMART_ACTION_ENABLE_TEMP_GOBJ
@ SMART_ACTION_CREATE_TIMED_EVENT
@ SMART_ACTION_RESET_SCRIPT_BASE_OBJECT
@ SMART_ACTION_REMOVE_NPC_FLAG
@ SMART_ACTION_INSTALL_AI_TEMPLATE
@ SMART_ACTION_SUMMON_CREATURE
@ SMART_ACTION_RESET_GOBJECT
@ SMART_ACTION_CALL_TIMED_ACTIONLIST
@ SMART_ACTION_SET_IN_COMBAT_WITH_ZONE
@ SMART_ACTION_SET_CAN_FLY
@ SMART_ACTION_SET_HOME_POS
@ SMART_ACTION_SET_ACTIVE
@ SMART_ACTION_SET_RANGED_MOVEMENT
@ SMART_ACTION_ACTIVATE_TAXI
@ SMART_ACTION_START_CLOSEST_WAYPOINT
@ SMART_ACTION_SUMMON_CREATURE_GROUP
@ SMART_ACTION_SET_REACT_STATE
@ SMART_ACTION_RANDOM_MOVE
@ SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT
@ SMART_ACTION_SET_IMMUNE_NPC
@ SMART_ACTION_TRIGGER_TIMED_EVENT
@ SMART_ACTION_REMOVEAURASFROMSPELL
@ SMART_ACTION_PAUSE_MOVEMENT
@ SMART_EVENT_ACTION_DONE
@ SMART_EVENT_SUMMON_DESPAWNED
@ SMART_EVENT_SCENE_START
@ SMART_EVENT_RECEIVE_EMOTE
@ SMART_EVENT_FRIENDLY_HEALTH_PCT
@ SMART_EVENT_RECEIVE_HEAL
@ SMART_EVENT_TIMED_EVENT_TRIGGERED
@ SMART_EVENT_SCENE_COMPLETE
@ SMART_EVENT_CHARMED_TARGET
@ SMART_EVENT_TARGET_MANA_PCT
@ SMART_EVENT_QUEST_COMPLETION
@ SMART_EVENT_JUST_CREATED
@ SMART_EVENT_EVENT_PHASE_CHANGE
@ SMART_EVENT_AREATRIGGER_ONTRIGGER
@ SMART_EVENT_DISTANCE_GAMEOBJECT
@ SMART_EVENT_ON_SPELLCLICK
@ SMART_EVENT_MOVEMENTINFORM
@ SMART_EVENT_PASSENGER_REMOVED
@ SMART_EVENT_INSTANCE_PLAYER_ENTER
@ SMART_EVENT_WAYPOINT_PAUSED
@ SMART_EVENT_REACHED_HOME
@ SMART_EVENT_TRANSPORT_ADDCREATURE
@ SMART_EVENT_REWARD_QUEST
@ SMART_EVENT_GO_EVENT_INFORM
@ SMART_EVENT_GO_LOOT_STATE_CHANGED
@ SMART_EVENT_SCENE_CANCEL
@ SMART_EVENT_JUST_SUMMONED
@ SMART_EVENT_WAYPOINT_START
@ SMART_EVENT_ON_SPELL_CAST
@ SMART_EVENT_SPELLHIT_TARGET
@ SMART_EVENT_GAME_EVENT_START
@ SMART_EVENT_TRANSPORT_REMOVE_PLAYER
@ SMART_EVENT_GOSSIP_HELLO
@ SMART_EVENT_GOSSIP_SELECT
@ SMART_EVENT_CORPSE_REMOVED
@ SMART_EVENT_PASSENGER_BOARDED
@ SMART_EVENT_SCENE_TRIGGER
@ SMART_EVENT_TRANSPORT_ADDPLAYER
@ SMART_EVENT_WAYPOINT_ENDED
@ SMART_EVENT_IS_BEHIND_TARGET
@ SMART_EVENT_ACCEPTED_QUEST
@ SMART_EVENT_COUNTER_SET
@ SMART_EVENT_FRIENDLY_MISSING_BUFF
@ SMART_EVENT_WAYPOINT_RESUMED
@ SMART_EVENT_ON_SPELL_FAILED
@ SMART_EVENT_WAYPOINT_REACHED
@ SMART_EVENT_TARGET_BUFFED
@ SMART_EVENT_QUEST_ACCEPTED
@ SMART_EVENT_FRIENDLY_HEALTH
@ SMART_EVENT_QUEST_REWARDED
@ SMART_EVENT_TRANSPORT_RELOCATE
@ SMART_EVENT_GAME_EVENT_END
@ SMART_EVENT_FOLLOW_COMPLETED
@ SMART_EVENT_QUEST_OBJ_COMPLETION
@ SMART_EVENT_DISTANCE_CREATURE
@ SMART_EVENT_WAYPOINT_STOPPED
@ SMART_EVENT_SUMMONED_UNIT_DIES
@ SMART_EVENT_FRIENDLY_IS_CC
@ SMART_EVENT_SEND_EVENT_TRIGGER
@ SMART_EVENT_ON_SPELL_START
@ SMART_EVENT_TARGET_HEALTH_PCT
@ SMART_EVENT_VICTIM_CASTING
@ SMART_EVENT_DAMAGED_TARGET
@ SMART_EVENT_SUMMONED_UNIT
const uint32 SmartAITypeMask[SMART_SCRIPT_TYPE_MAX][2]
std::pair< CacheSpellContainer::const_iterator, CacheSpellContainer::const_iterator > CacheSpellContainerBounds
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
@ WORLD_SEL_SMART_SCRIPTS
Class used to access individual fields of database query result.
std::string GetString() const
std::vector< GameEventData > GameEventDataMap
ObjectVector _objectVector
void UpdateObjects(WorldObject const &ref) const
ObjectGuidVector(ObjectVector const &objectVector)
SmartAIEventMap mEventMap[SMART_SCRIPT_TYPE_MAX]
CacheSpellContainer SummonCreatureSpellStore
void UnLoadHelperStores()
CacheSpellContainerBounds GetSummonCreatureSpellContainerBounds(uint32 creatureEntry) const
SmartAIEventList GetScript(int32 entry, SmartScriptType type)
static bool IsTextEmoteValid(SmartScriptHolder const &e, uint32 entry)
bool IsTargetValid(SmartScriptHolder const &e)
static bool NotNULL(SmartScriptHolder const &e, uint32 data)
CacheSpellContainer CreateItemSpellStore
static bool IsSoundValid(SmartScriptHolder const &e, uint32 entry)
static SmartScriptHolder & FindLinkedEvent(SmartAIEventList &list, uint32 link)
bool IsEventValid(SmartScriptHolder &e)
static bool IsGameObjectValid(SmartScriptHolder const &e, uint32 entry)
static bool CheckUnusedTargetParams(SmartScriptHolder const &e)
static bool IsAnimKitValid(SmartScriptHolder const &e, uint32 entry)
bool IsMinMaxValid(SmartScriptHolder const &e, uint32 min, uint32 max)
static bool EventHasInvoker(SMART_EVENT event)
static bool IsSpellVisualKitValid(SmartScriptHolder const &e, uint32 entry)
CacheSpellContainerBounds GetCreateItemSpellContainerBounds(uint32 itemId) const
CacheSpellContainer SummonGameObjectSpellStore
static bool IsQuestValid(SmartScriptHolder const &e, uint32 entry)
static bool IsCreatureValid(SmartScriptHolder const &e, uint32 entry)
static bool IsAreaTriggerValid(SmartScriptHolder const &e, uint32 entry)
static bool IsTextValid(SmartScriptHolder const &e, uint32 id)
CacheSpellContainerBounds GetSummonGameObjectSpellContainerBounds(uint32 gameObjectEntry) const
static bool CheckUnusedEventParams(SmartScriptHolder const &e)
static SmartAIMgr * instance()
CacheSpellContainerBounds GetKillCreditSpellContainerBounds(uint32 killCredit) const
static bool CheckUnusedActionParams(SmartScriptHolder const &e)
static bool IsItemValid(SmartScriptHolder const &e, uint32 entry)
CacheSpellContainer KillCreditSpellStore
static SmartScriptHolder & FindLinkedSourceEvent(SmartAIEventList &list, uint32 eventId)
static bool IsEmoteValid(SmartScriptHolder const &e, uint32 entry)
static bool IsSpellValid(SmartScriptHolder const &e, uint32 entry)
std::vector< SpellEffectInfo > const & GetEffects() const
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
TC_COMMON_API std::vector< std::string_view > Tokenize(std::string_view str, char sep, bool keepEmpty)
EnumFlag< AreaFlags > GetFlags() const
struct SmartAction::@66::@135 setRoot
struct SmartAction::@66::@166 addToStoredTargets
struct SmartAction::@66::@143 randomSound
struct SmartAction::@66::@79 crossCast
struct SmartAction::@66::@95 callHelp
struct SmartAction::@66::@128 enableTempGO
struct SmartAction::@66::@85 setEventPhase
struct SmartAction::@66::@161 conversation
struct SmartAction::@66::@144 corpseDelay
struct SmartAction::@66::@160 setHealthPct
struct SmartAction::@66::@121 delunitByte
struct SmartAction::@66::@108 wpPause
struct SmartAction::@66::@92 setInstanceData
struct SmartAction::@66::@131 setGoLootState
struct SmartAction::@66::@130 sendGossipMenu
struct SmartAction::@66::@105 active
struct SmartAction::@66::@115 storeTargets
uint32 wps[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@66::@91 killedMonster
struct SmartAction::@66::@111 setRun
struct SmartAction::@66::@107 wpStart
struct SmartAction::@66::@137 creatureGroup
struct SmartAction::@66::@102 moveRandom
struct SmartAction::@66::@120 setunitByte
struct SmartAction::@66::@142 moveOffset
struct SmartAction::@66::@104 summonGO
uint32 emotes[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@66::@106 taxi
struct SmartAction::@66::@146 groupSpawn
struct SmartAction::@66::@162 setImmunePC
struct SmartAction::@66::@81 threatPCT
struct SmartAction::@66::@118 equip
struct SmartAction::@66::@148 randomTimedEvent
struct SmartAction::@66::@134 setHealthRegen
struct SmartAction::@66::@96 setSheath
SAIBool toRespawnPosition
struct SmartAction::@66::@70 faction
struct SmartAction::@66::@129 moveToPos
struct SmartAction::@66::@69 simpleTalk
struct SmartAction::@66::@88 follow
struct SmartAction::@66::@97 forceDespawn
struct SmartAction::@66::@155 spellVisualKit
struct SmartAction::@66::@77 randomEmote
struct SmartAction::@66::@117 movie
struct SmartAction::@66::@140 gameEventStart
struct SmartAction::@66::@80 summonCreature
struct SmartAction::@66::@167 becomePersonalClone
struct SmartAction::@66::@109 wpStop
struct SmartAction::@66::@75 questOffer
struct SmartAction::@66::@138 power
struct SmartAction::@66::@123 randTimedActionList
struct SmartAction::@66::@165 activateGameObject
struct SmartAction::@66::@122 timedActionList
struct SmartAction::@66::@101 setData
struct SmartAction::@66::@94 updateTemplate
struct SmartAction::@66::@141 closestWaypointFromList
struct SmartAction::@66::@103 visibility
struct SmartAction::@66::@152 scene
struct SmartAction::@66::@158 setHover
struct SmartAction::@66::@154 movementSpeed
struct SmartAction::@66::@159 evade
uint32 actionLists[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@66::@86 incEventPhase
struct SmartAction::@66::@125 interruptSpellCasting
struct SmartAction::@66::@93 setInstanceData64
uint32 phases[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@66::@83 autoAttack
struct SmartAction::@66::@99 ingamePhaseId
struct SmartAction::@66::@113 teleport
struct SmartAction::@66::@153 cinematic
struct SmartAction::@66::@112 setDisableGravity
struct SmartAction::@66::@87 removeAura
struct SmartAction::@66::@145 disableEvade
struct SmartAction::@66::@98 invincHP
struct SmartAction::@66::@100 ingamePhaseGroup
struct SmartAction::@66::@124 randRangeTimedActionList
struct SmartAction::@66::@116 timeEvent
SAIBool disablePathfinding
struct SmartAction::@66::@139 gameEventStop
struct SmartAction::@66::@156 overrideLight
struct SmartAction::@66::@168 triggerGameEvent
struct SmartAction::@66::@136 goState
SAIBool useSaiTargetAsGameEventSource
struct SmartAction::@66::@126 jump
struct SmartAction::@66::@133 setRangedMovement
struct SmartAction::@66::@164 setUninteractible
struct SmartAction::@66::@163 setImmuneNPC
struct SmartAction::@66::@76 react
struct SmartAction::@66::@78 cast
struct SmartAction::@66::@127 fleeAssist
struct SmartAction::@66::@84 combatMove
struct SmartAction::@66::@110 item
struct SmartAction::@66::@169 doAction
struct SmartAction::@66::@89 randomPhase
struct SmartAction::@66::@132 sendTargetToTarget
struct SmartAction::@66::@68 talk
struct SmartAction::@66::@149 pauseMovement
struct SmartAction::@66::@150 respawnData
struct SmartAction::@66::@157 overrideWeather
struct SmartAction::@66::@170 raw
struct SmartAction::@66::@82 threat
struct SmartAction::@66::@71 morphOrMount
struct SmartAction::@66::@90 randomPhaseRange
struct SmartAction::@66::@147 loadEquipment
struct SmartAction::@66::@114 setCounter
struct SmartEvent::@29::@36 minMax
struct SmartEvent::@29::@65 raw
struct SmartEvent::@29::@47 dataSet
struct SmartEvent::@29::@46 movementInform
struct SmartEvent::@29::@32 kill
struct SmartEvent::@29::@48 waypoint
struct SmartEvent::@29::@40 summoned
struct SmartEvent::@29::@58 goLootStateChanged
struct SmartEvent::@29::@55 gossipHello
struct SmartEvent::@29::@37 targetCasting
struct SmartEvent::@29::@62 distance
struct SmartEvent::@29::@60 doAction
struct SmartEvent::@29::@59 eventInform
struct SmartEvent::@29::@39 missingBuff
uint32 hostilityMode
Hostility mode of the event. 0: hostile, 1: not hostile, 2: any
struct SmartEvent::@29::@63 counter
struct SmartEvent::@29::@38 friendlyCC
struct SmartEvent::@29::@34 los
struct SmartEvent::@29::@35 respawn
struct SmartEvent::@29::@56 gossip
struct SmartEvent::@29::@61 friendlyHealthPct
struct SmartEvent::@29::@45 charm
struct SmartEvent::@29::@52 areatrigger
struct SmartEvent::@29::@33 spellHit
struct SmartEvent::@29::@42 questObjective
struct SmartEvent::@29::@50 transportRelocate
struct SmartEvent::@29::@54 timedEvent
struct SmartEvent::@29::@64 spellCast
struct SmartEvent::@29::@49 transportAddCreature
struct SmartEvent::@29::@51 instancePlayerEnter
struct SmartEvent::@29::@57 gameEvent
struct SmartEvent::@29::@44 aura
struct SmartEvent::@29::@31 minMaxRepeat
struct SmartEvent::@29::@53 textOver
uint32 GetScriptType() const
uint32 GetEventType() const
uint32 GetTargetType() const
std::vector< Difficulty > Difficulties
SmartScriptType source_type
uint32 GetActionType() const
struct SmartTarget::@171::@178 playerDistance
struct SmartTarget::@171::@175 unitRange
struct SmartTarget::@171::@185 goClosest
struct SmartTarget::@171::@187 closestFriendly
SAIBool useCharmerOrOwner
struct SmartTarget::@171::@184 unitClosest
struct SmartTarget::@171::@182 goGUID
struct SmartTarget::@171::@190 threatList
struct SmartTarget::@171::@183 goDistance
struct SmartTarget::@171::@191 raw
struct SmartTarget::@171::@186 closestAttackable
struct SmartTarget::@171::@189 vehicle
struct SmartTarget::@171::@177 unitDistance
struct SmartTarget::@171::@181 goRange
struct SmartTarget::@171::@173 hostilRandom
struct SmartTarget::@171::@176 unitGUID
struct SmartTarget::@171::@188 owner
struct SmartTarget::@171::@174 farthest
struct SmartTarget::@171::@179 playerRange
struct SmartTarget::@171::@180 stored
std::vector< WaypointNode > Nodes