36#define TC_SAI_IS_BOOLEAN_VALID(e, value) \
40 TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses param {} of type Boolean with value {}, valid values are 0 or 1, skipped.", \
41 e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), STRINGIZE(value), value); \
66 TC_LOG_INFO(
"server.loading",
">> Loaded 0 SmartAI scripts. DB table `smartai_scripts` is empty.");
74 Field* fields = result->Fetch();
81 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: invalid entryorguid (0), skipped loading.");
88 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: invalid source_type ({}), skipped loading.",
uint32(source_type));
104 if (creatureInfo->
AIName !=
"SmartAI")
106 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) is not using SmartAI, skipped loading.",
uint32(temp.
entryOrGuid));
120 if (gameObjectInfo->
AIName !=
"SmartGameObjectAI")
122 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) is not using SmartGameObjectAI, skipped loading.",
uint32(temp.
entryOrGuid));
139 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: not yet implemented source_type {}", (
uint32)source_type);
152 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature guid ({}) does not exist, skipped loading.", -temp.
entryOrGuid);
159 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) guid ({}) does not exist, skipped loading.", creature->
id, -temp.
entryOrGuid);
163 if (creatureInfo->
AIName !=
"SmartAI")
165 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Creature entry ({}) guid ({}) is not using SmartAI, skipped loading.", creature->
id, -temp.
entryOrGuid);
175 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject guid ({}) does not exist, skipped loading.", -temp.
entryOrGuid);
182 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) guid ({}) does not exist, skipped loading.", gameObject->
id, -temp.
entryOrGuid);
186 if (gameObjectInfo->
AIName !=
"SmartGameObjectAI")
188 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GameObject entry ({}) guid ({}) is not using SmartGameObjectAI, skipped loading.", gameObject->
id, -temp.
entryOrGuid);
194 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: GUID-specific scripting not yet implemented for source_type {}", (
uint32)source_type);
255 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
263 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
271 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Missing Repeat flag.",
289 while (result->NextRow());
294 for (std::pair<int32 const, SmartAIEventList>& eventlistpair : eventmap)
302 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Link Event {} not found or invalid.",
303 e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
311 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr::LoadSmartAIFromDB: Entry {} SourceType {}, Event {}, Link Source Event not found or invalid. Event will never trigger.",
312 e.entryOrGuid, e.GetScriptType(), e.event_id);
332 TC_LOG_DEBUG(
"scripts.ai",
"SmartAIMgr::GetScript: Could not load Script for Entry {} ScriptType {}.", entry,
uint32(type));
339 SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
342 if (itr != list.end())
346 return SmartScriptHolderDummy;
351 SmartAIEventList::iterator itr = std::find_if(list.begin(), list.end(),
352 [link](
SmartScriptHolder& linked) { return linked.event_id == link && linked.GetEventType() == SMART_EVENT_LINK; });
354 if (itr != list.end())
358 return SmartScriptHolderDummy;
410 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has abs(`target.o` = {}) > 2*PI (orientation is expressed in radians)",
553 if (!
sObjectMgr->GetGameObjectTemplate(entry))
623 size_t paramsStructSize = [&]() ->
size_t
625 constexpr size_t NO_PARAMS = size_t(0);
711 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.",
718 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
720 for (
size_t index = paramsCount; index < rawCount; index++)
725 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused event_param{} with value {}, it should be 0.",
735 size_t paramsStructSize = [&]() ->
size_t
737 constexpr size_t NO_PARAMS = size_t(0);
872 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.",
879 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
881 for (
size_t index = paramsCount; index < rawCount; index++)
886 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused action_param{} with value {}, it should be 0.",
896 size_t paramsStructSize = [&]() ->
size_t
898 constexpr size_t NO_PARAMS = size_t(0);
933 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.",
940 size_t paramsCount = paramsStructSize /
sizeof(
uint32);
942 for (
size_t index = paramsCount; index < rawCount; index++)
947 TC_LOG_WARN(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has unused target_param{} with value {}, it should be 0.",
1060 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses hostilityMode with invalid value {} (max allowed value {}), skipped.",
1235 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE did not provide creature guid or entry, skipped.");
1241 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE provided both an entry and guid, skipped.");
1260 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT did not provide gameobject guid or entry, skipped.");
1266 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT provided both an entry and guid, skipped.");
1272 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject guid {}, skipped.", e.
event.
distance.
guid);
1278 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject entry {}, skipped.", e.
event.
distance.
entry);
1288 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Event SMART_EVENT_COUNTER_SET using invalid counter id {}, skipped.", e.
event.
counter.
id);
1436 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero emote",
1450 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero action list",
1460 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero waypoint id",
1470 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero sound",
1492 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Effect: SPELL_EFFECT_KILL_CREDIT: (SpellId: {} targetA: {} - targetB: {}) has invalid target for this Action",
1560 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} does not have any non-zero phase",
1591 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1592 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} creature summon: There is a summon spell for creature entry {} (SpellId: {}, effect: {})",
1610 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1611 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Kill Credit: There is a killcredit spell for creatureEntry {} (SpellId: {} effect: {})",
1649 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1650 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} gameobject summon: There is a summon spell for gameobject entry {} (SpellId: {}, effect: {})",
1670 for (CacheSpellContainer::const_iterator itr = sBounds.first; itr != sBounds.second; ++itr)
1671 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} Create Item: There is a create item spell for item {} (SpellId: {} effect: {})",
1690 if (!path || path->
nodes.empty())
1731 if (eventId < 1 || eventId >= events.size())
1750 if (eventId < 1 || eventId >= events.size())
1773 TC_LOG_ERROR(
"sql.sql",
"SmartScript: SMART_ACTION_EQUIP uses non-existent equipment info id {} for creature {}, skipped.", equipId, e.
entryOrGuid);
1880 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} is trying to set invalid HP percent {}, skipped.",
2000 TC_LOG_ERROR(
"sql.sql",
"SmartAIMgr: Entry {} SourceType {} Event {} Action {} has gameObjectAction parameter out of range (max allowed {}, current value {}), skipped.",
2155 KillCreditSpellStore.insert(std::make_pair(
uint32(spellEffectInfo.MiscValue), std::make_pair(i, spellEffectInfo.EffectIndex)));
2158 CreateItemSpellStore.insert(std::make_pair(
uint32(spellEffectInfo.ItemType), std::make_pair(i, spellEffectInfo.EffectIndex)));
DBCStorage< ItemEntry > sItemStore(Itemfmt)
DBCStorage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore(CreatureDisplayInfofmt)
DBCStorage< AreaTriggerEntry > sAreaTriggerStore(AreaTriggerEntryfmt)
DBCStorage< SoundEntriesEntry > sSoundEntriesStore(SoundEntriesfmt)
DBCStorage< EmotesTextEntry > sEmotesTextStore(EmotesTextEntryfmt)
DBCStorage< LightEntry > sLightStore(LightEntryfmt)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
DBCStorage< EmotesEntry > sEmotesStore(EmotesEntryfmt)
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_SPECIAL_FLAGS_EXPLORATION_OR_EVENT
@ SPELL_EFFECT_KILL_CREDIT
@ SPELL_EFFECT_KILL_CREDIT2
@ SPELL_EFFECT_SUMMON_OBJECT_WILD
@ SPELL_EFFECT_CREATE_ITEM
#define TC_SAI_IS_BOOLEAN_VALID(e, value)
@ SMART_SCRIPT_TYPE_TIMED_ACTIONLIST
@ SMART_SCRIPT_TYPE_CREATURE
@ SMART_SCRIPT_TYPE_GAMEOBJECT
@ SMART_SCRIPT_TYPE_AREATRIGGER
std::vector< SmartScriptHolder > SmartAIEventList
@ 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::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_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_INGAME_PHASE_MASK
@ 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_CALL_GROUPEVENTHAPPENS
@ SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL
@ SMART_ACTION_INVOKER_CAST
@ 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_SEND_TARGET_TO_TARGET
@ SMART_ACTION_REMOVE_POWER
@ SMART_ACTION_SET_DYNAMIC_FLAG
@ SMART_ACTION_RESUME_MOVEMENT
@ 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_CALL_SCRIPT_RESET
@ SMART_ACTION_COMBAT_STOP
@ 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_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_RECEIVE_EMOTE
@ SMART_EVENT_FRIENDLY_HEALTH_PCT
@ SMART_EVENT_ON_AURA_APPLIED
@ SMART_EVENT_RECEIVE_HEAL
@ SMART_EVENT_TIMED_EVENT_TRIGGERED
@ 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_ON_AURA_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_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_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_ON_SPELL_START
@ SMART_EVENT_TARGET_HEALTH_PCT
@ SMART_EVENT_VICTIM_CASTING
@ SMART_EVENT_DAMAGED_TARGET
@ SMART_EVENT_SUMMONED_UNIT
std::unordered_map< int32, SmartAIEventList > SmartAIEventMap
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::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 IsMinMaxValid(SmartScriptHolder const &e, uint32 min, uint32 max)
static bool EventHasInvoker(SMART_EVENT event)
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::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
TC_GAME_API WorldObject * GetWorldObject(WorldObject const &, ObjectGuid const &)
struct SmartAction::@65::@144 loadEquipment
struct SmartAction::@65::@97 invincHP
struct SmartAction::@65::@161 raw
struct SmartAction::@65::@83 combatMove
struct SmartAction::@65::@102 summonGO
struct SmartAction::@65::@70 morphOrMount
struct SmartAction::@65::@146 pauseMovement
struct SmartAction::@65::@139 closestWaypointFromList
struct SmartAction::@65::@69 faction
struct SmartAction::@65::@130 sendTargetToTarget
struct SmartAction::@65::@119 delunitByte
struct SmartAction::@65::@129 setGoLootState
struct SmartAction::@65::@85 incEventPhase
struct SmartAction::@65::@106 wpPause
uint32 wps[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@65::@111 teleport
struct SmartAction::@65::@99 setData
struct SmartAction::@65::@137 gameEventStop
struct SmartAction::@65::@157 setUninteractible
struct SmartAction::@65::@134 goState
struct SmartAction::@65::@155 setImmunePC
uint32 emotes[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@65::@92 setInstanceData64
struct SmartAction::@65::@127 moveToPos
struct SmartAction::@65::@152 setHover
struct SmartAction::@65::@118 setunitByte
struct SmartAction::@65::@126 enableTempGO
struct SmartAction::@65::@128 sendGossipMenu
struct SmartAction::@65::@141 corpseDelay
struct SmartAction::@65::@121 randTimedActionList
struct SmartAction::@65::@108 item
struct SmartAction::@65::@140 randomSound
struct SmartAction::@65::@78 crossCast
struct SmartAction::@65::@138 gameEventStart
struct SmartAction::@65::@74 questOffer
SAIBool toRespawnPosition
struct SmartAction::@65::@110 setDisableGravity
struct SmartAction::@65::@160 resumeMovement
struct SmartAction::@65::@153 evade
struct SmartAction::@65::@89 randomPhaseRange
struct SmartAction::@65::@120 timedActionList
struct SmartAction::@65::@115 movie
struct SmartAction::@65::@158 activateGameObject
struct SmartAction::@65::@81 threat
struct SmartAction::@65::@67 talk
struct SmartAction::@65::@114 timeEvent
struct SmartAction::@65::@151 overrideWeather
struct SmartAction::@65::@147 respawnData
struct SmartAction::@65::@100 moveRandom
struct SmartAction::@65::@131 setRangedMovement
uint32 actionLists[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@65::@150 overrideLight
struct SmartAction::@65::@156 setImmuneNPC
struct SmartAction::@65::@125 fleeAssist
struct SmartAction::@65::@148 cinematic
uint32 phases[SMART_ACTION_PARAM_COUNT]
struct SmartAction::@65::@104 taxi
struct SmartAction::@65::@154 setHealthPct
struct SmartAction::@65::@132 setHealthRegen
struct SmartAction::@65::@75 react
struct SmartAction::@65::@123 interruptSpellCasting
struct SmartAction::@65::@88 randomPhase
struct SmartAction::@65::@93 updateTemplate
struct SmartAction::@65::@96 forceDespawn
struct SmartAction::@65::@124 jump
struct SmartAction::@65::@136 power
struct SmartAction::@65::@86 removeAura
SAIBool disablePathfinding
struct SmartAction::@65::@98 ingamePhaseMask
struct SmartAction::@65::@91 setInstanceData
struct SmartAction::@65::@77 cast
struct SmartAction::@65::@68 simpleTalk
struct SmartAction::@65::@133 setRoot
struct SmartAction::@65::@109 setRun
struct SmartAction::@65::@142 disableEvade
struct SmartAction::@65::@113 storeTargets
struct SmartAction::@65::@76 randomEmote
struct SmartAction::@65::@82 autoAttack
struct SmartAction::@65::@87 follow
struct SmartAction::@65::@94 callHelp
struct SmartAction::@65::@105 wpStart
struct SmartAction::@65::@101 visibility
struct SmartAction::@65::@116 equip
struct SmartAction::@65::@79 summonCreature
struct SmartAction::@65::@107 wpStop
struct SmartAction::@65::@149 movementSpeed
struct SmartAction::@65::@159 addToStoredTargets
struct SmartAction::@65::@143 groupSpawn
struct SmartAction::@65::@80 threatPCT
struct SmartAction::@65::@103 active
struct SmartAction::@65::@84 setEventPhase
struct SmartAction::@65::@145 randomTimedEvent
struct SmartAction::@65::@112 setCounter
struct SmartAction::@65::@122 randRangeTimedActionList
struct SmartAction::@65::@95 setSheath
struct SmartAction::@65::@90 killedMonster
struct SmartAction::@65::@135 creatureGroup
struct SmartEvent::@29::@62 counter
struct SmartEvent::@29::@36 minMax
struct SmartEvent::@29::@56 gameEvent
struct SmartEvent::@29::@50 instancePlayerEnter
struct SmartEvent::@29::@45 movementInform
struct SmartEvent::@29::@44 charm
struct SmartEvent::@29::@52 textOver
struct SmartEvent::@29::@32 kill
struct SmartEvent::@29::@40 summoned
struct SmartEvent::@29::@54 gossipHello
struct SmartEvent::@29::@59 doAction
struct SmartEvent::@29::@37 targetCasting
struct SmartEvent::@29::@48 transportAddCreature
struct SmartEvent::@29::@43 aura
struct SmartEvent::@29::@46 dataSet
struct SmartEvent::@29::@58 eventInform
struct SmartEvent::@29::@39 missingBuff
uint32 hostilityMode
Hostility mode of the event. 0: hostile, 1: not hostile, 2: any.
struct SmartEvent::@29::@49 transportRelocate
struct SmartEvent::@29::@61 distance
struct SmartEvent::@29::@38 friendlyCC
struct SmartEvent::@29::@34 los
struct SmartEvent::@29::@63 spellCast
struct SmartEvent::@29::@35 respawn
struct SmartEvent::@29::@60 friendlyHealthPct
struct SmartEvent::@29::@57 goLootStateChanged
struct SmartEvent::@29::@33 spellHit
struct SmartEvent::@29::@53 timedEvent
struct SmartEvent::@29::@47 waypoint
struct SmartEvent::@29::@51 areatrigger
struct SmartEvent::@29::@64 raw
struct SmartEvent::@29::@55 gossip
struct SmartEvent::@29::@31 minMaxRepeat
uint32 GetScriptType() const
uint32 GetEventType() const
uint32 GetTargetType() const
SmartScriptType source_type
uint32 GetActionType() const
struct SmartTarget::@162::@180 vehicle
struct SmartTarget::@162::@170 playerRange
struct SmartTarget::@162::@166 unitRange
struct SmartTarget::@162::@179 owner
struct SmartTarget::@162::@175 unitClosest
struct SmartTarget::@162::@171 stored
struct SmartTarget::@162::@167 unitGUID
SAIBool useCharmerOrOwner
struct SmartTarget::@162::@173 goGUID
struct SmartTarget::@162::@181 threatList
struct SmartTarget::@162::@178 closestFriendly
struct SmartTarget::@162::@177 closestAttackable
struct SmartTarget::@162::@172 goRange
struct SmartTarget::@162::@168 unitDistance
struct SmartTarget::@162::@174 goDistance
struct SmartTarget::@162::@182 raw
struct SmartTarget::@162::@169 playerDistance
struct SmartTarget::@162::@165 farthest
struct SmartTarget::@162::@176 goClosest
struct SmartTarget::@162::@164 hostilRandom
std::vector< WaypointNode > nodes