Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SmartAIMgr Class Reference

#include <SmartScriptMgr.h>

Public Member Functions

SmartAIEventList GetScript (int32 entry, SmartScriptType type)
void LoadSmartAIFromDB ()
 ~SmartAIMgr ()

Private Member Functions

CacheSpellContainerBounds GetKillCreditSpellContainerBounds (uint32 killCredit) const
CacheSpellContainerBounds GetSummonCreatureSpellContainerBounds (uint32 creatureEntry) const
CacheSpellContainerBounds GetSummonGameObjectSpellContainerBounds (uint32 gameObjectEntry) const
bool IsAreaTriggerValid (SmartScriptHolder const &e, uint32 entry)
bool IsCreatureValid (SmartScriptHolder const &e, uint32 entry)
bool IsEmoteValid (SmartScriptHolder const &e, uint32 entry)
bool IsEventValid (SmartScriptHolder &e)
bool IsGameObjectValid (SmartScriptHolder const &e, uint32 entry)
bool IsItemValid (SmartScriptHolder const &e, uint32 entry)
bool IsMinMaxValid (SmartScriptHolder const &e, uint32 min, uint32 max)
bool IsQuestValid (SmartScriptHolder const &e, uint32 entry)
bool IsSoundValid (SmartScriptHolder const &e, uint32 entry)
bool IsSpellValid (SmartScriptHolder const &e, uint32 entry)
bool IsTargetValid (SmartScriptHolder const &e)
bool IsTextEmoteValid (SmartScriptHolder const &e, uint32 entry)
void LoadHelperStores ()
bool NotNULL (SmartScriptHolder const &e, uint32 data)
 SmartAIMgr ()
void UnLoadHelperStores ()

Private Attributes

CacheSpellContainer KillCreditSpellStore
SmartAIEventMap mEventMap [SMART_SCRIPT_TYPE_MAX]
CacheSpellContainer SummonCreatureSpellStore
CacheSpellContainer SummonGameObjectSpellStore

Friends

class Skyfire::Singleton< SmartAIMgr, Skyfire::NullMutex >

Detailed Description

Definition at line 1371 of file SmartScriptMgr.h.

Constructor & Destructor Documentation

◆ SmartAIMgr()

SmartAIMgr::SmartAIMgr ( )
inlineprivate

Definition at line 1374 of file SmartScriptMgr.h.

References SmartAIMgr().

Referenced by SmartAIMgr().

◆ ~SmartAIMgr()

SmartAIMgr::~SmartAIMgr ( )
inline

Definition at line 1376 of file SmartScriptMgr.h.

Member Function Documentation

◆ GetKillCreditSpellContainerBounds()

CacheSpellContainerBounds SmartAIMgr::GetKillCreditSpellContainerBounds ( uint32 killCredit) const
private

Definition at line 1087 of file SmartScriptMgr.cpp.

References KillCreditSpellStore.

Referenced by IsEventValid().

◆ GetScript()

SmartAIEventList SmartAIMgr::GetScript ( int32 entry,
SmartScriptType type )
inline

Definition at line 1380 of file SmartScriptMgr.h.

References mEventMap, and SF_LOG_DEBUG.

◆ GetSummonCreatureSpellContainerBounds()

CacheSpellContainerBounds SmartAIMgr::GetSummonCreatureSpellContainerBounds ( uint32 creatureEntry) const
private

Definition at line 1079 of file SmartScriptMgr.cpp.

References SummonCreatureSpellStore.

Referenced by IsEventValid().

◆ GetSummonGameObjectSpellContainerBounds()

CacheSpellContainerBounds SmartAIMgr::GetSummonGameObjectSpellContainerBounds ( uint32 gameObjectEntry) const
private

Definition at line 1083 of file SmartScriptMgr.cpp.

References SummonGameObjectSpellStore.

Referenced by IsEventValid().

◆ IsAreaTriggerValid()

bool SmartAIMgr::IsAreaTriggerValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsCreatureValid()

bool SmartAIMgr::IsCreatureValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsEmoteValid()

bool SmartAIMgr::IsEmoteValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsEventValid()

bool SmartAIMgr::IsEventValid ( SmartScriptHolder & e)
private

Definition at line 305 of file SmartScriptMgr.cpp.

References SmartScriptHolder::action, SmartEvent::area, SmartEvent::areatrigger, SmartEvent::aura, SmartEvent::behindTarget, SmartAction::cast, SmartEvent::cooldownMax, SmartEvent::cooldownMin, SmartAction::count, SmartAction::creature, SmartEvent::creature, SmartEvent::dataSet, SmartAction::dec, SmartEvent::doAction, SmartEvent::dummy, EFFECT_2, SmartEvent::effIndex, SmartAction::emote, SmartEvent::emote, SmartAction::emote1, SmartAction::emote2, SmartAction::emote3, SmartAction::emote4, SmartAction::emote5, SmartAction::emote6, SmartAction::entry, SmartScriptHolder::entryOrGuid, SmartScriptHolder::event, EVENT_CHARGE, SmartEvent::event_flags, SmartScriptHolder::event_id, SmartEvent::event_phase_mask, SmartEvent::eventId, SmartAction::faction, SmartAction::factionID, SmartEvent::friendlyCC, SmartEvent::friendlyHealth, SmartEvent::friendlyHealthPct, SmartEvent::gameEvent, SmartEvent::gameEventId, SmartAction::gameEventStart, SmartAction::gameEventStop, SmartScriptHolder::GetActionType(), GetAreaEntryByAreaID(), SmartScriptHolder::GetEventType(), GetKillCreditSpellContainerBounds(), SmartScriptHolder::GetScriptType(), GetSummonCreatureSpellContainerBounds(), GetSummonGameObjectSpellContainerBounds(), SmartScriptHolder::GetTargetType(), SmartAction::id, SmartEvent::id, SmartAction::inc, SmartAction::incEventPhase, SmartAction::installTtemplate, IsAreaTriggerValid(), IsCreatureValid(), IsEmoteValid(), IsGameObjectValid(), IsItemValid(), IsMinMaxValid(), IsQuestValid(), IsSoundValid(), IsSpellValid(), IsTextEmoteValid(), GameEventData::isValid(), SmartAction::item, SmartEvent::kill, SmartAction::killedMonster, SmartScriptHolder::link, SmartEvent::los, SmartEvent::map, SmartAction::mapID, SmartAction::max, SmartEvent::max, MAX_POWERS, MAX_SHEATH_STATE, SmartEvent::maxHpPct, SmartAction::min, SmartEvent::min, SmartEvent::minHpPct, SmartEvent::minMax, SmartEvent::minMaxRepeat, SmartEvent::missingBuff, SmartAction::model, SmartAction::morphOrMount, SmartEvent::movementInform, NotNULL(), NULL_MOTION_TYPE, SmartAction::pathID, SmartAction::phase, SmartAction::phase1, SmartAction::phase2, SmartAction::phase3, SmartAction::phase4, SmartAction::phase5, SmartAction::phase6, SmartAction::phaseMax, SmartAction::phaseMin, SmartAction::power, SmartAction::powerType, SmartAction::quest, SmartEvent::quest, QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT, SmartEvent::radius, SmartAction::randomEmote, SmartAction::randomPhase, SmartAction::randomPhaseRange, SmartAction::randomSound, SmartAction::react, REACT_AGGRESSIVE, SmartAction::reactState, SmartAction::removeAura, SmartAction::repeatMax, SmartEvent::repeatMax, SmartAction::repeatMin, SmartEvent::repeatMin, SmartEvent::respawn, SmartEvent::school, SpellInfo::SchoolMask, sCreatureDisplayInfoStore, SmartAction::setEventPhase, SmartAction::setSheath, SF_LOG_ERROR, sFactionTemplateStore, sGameEventMgr, SmartAction::sheath, sMapStore, SMART_ACTION_ACTIVATE_GOBJECT, SMART_ACTION_ACTIVATE_TAXI, SMART_ACTION_ADD_AURA, SMART_ACTION_ADD_DYNAMIC_FLAG, SMART_ACTION_ADD_GO_FLAG, SMART_ACTION_ADD_ITEM, SMART_ACTION_ADD_NPC_FLAG, SMART_ACTION_ADD_POWER, SMART_ACTION_ADD_QUEST, SMART_ACTION_ALLOW_COMBAT_MOVEMENT, SMART_ACTION_ATTACK_START, SMART_ACTION_AUTO_ATTACK, SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS, SMART_ACTION_CALL_FOR_HELP, SMART_ACTION_CALL_GROUPEVENTHAPPENS, SMART_ACTION_CALL_KILLEDMONSTER, SMART_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST, SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST, SMART_ACTION_CALL_SCRIPT_RESET, SMART_ACTION_CALL_TIMED_ACTIONLIST, SMART_ACTION_CAST, SMART_ACTION_CLOSE_GOSSIP, SMART_ACTION_COMBAT_STOP, SMART_ACTION_CREATE_TIMED_EVENT, SMART_ACTION_CROSS_CAST, SMART_ACTION_DIE, SMART_ACTION_END, SMART_ACTION_EQUIP, SMART_ACTION_EVADE, SMART_ACTION_FAIL_QUEST, SMART_ACTION_FLEE_FOR_ASSIST, SMART_ACTION_FOLLOW, SMART_ACTION_FORCE_DESPAWN, SMART_ACTION_GAME_EVENT_START, SMART_ACTION_GAME_EVENT_STOP, SMART_ACTION_GO_SET_LOOT_STATE, SMART_ACTION_INC_EVENT_PHASE, SMART_ACTION_INSTALL_AI_TEMPLATE, SMART_ACTION_INTERRUPT_SPELL, SMART_ACTION_INVOKER_CAST, SMART_ACTION_JUMP_TO_POS, SMART_ACTION_KILL_UNIT, SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL, SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL, SMART_ACTION_MOVE_FORWARD, SMART_ACTION_MOVE_TO_POS, SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT, SMART_ACTION_PLAY_EMOTE, SMART_ACTION_PLAYMOVIE, SMART_ACTION_RANDOM_EMOTE, SMART_ACTION_RANDOM_MOVE, SMART_ACTION_RANDOM_PHASE, SMART_ACTION_RANDOM_PHASE_RANGE, SMART_ACTION_RANDOM_SOUND, SMART_ACTION_REMOVE_DYNAMIC_FLAG, SMART_ACTION_REMOVE_GO_FLAG, SMART_ACTION_REMOVE_ITEM, SMART_ACTION_REMOVE_NPC_FLAG, SMART_ACTION_REMOVE_POWER, SMART_ACTION_REMOVE_TIMED_EVENT, SMART_ACTION_REMOVE_UNIT_FIELD_ANIM_TIER, SMART_ACTION_REMOVE_UNIT_FLAG, SMART_ACTION_REMOVEAURASFROMSPELL, SMART_ACTION_RESET_GOBJECT, SMART_ACTION_RESET_SCRIPT_BASE_OBJECT, SMART_ACTION_RESPAWN_TARGET, SMART_ACTION_SEND_GO_CUSTOM_ANIM, SMART_ACTION_SEND_GOSSIP_MENU, SMART_ACTION_SEND_TARGET_TO_TARGET, SMART_ACTION_SET_ACTIVE, SMART_ACTION_SET_DATA, SMART_ACTION_SET_DYNAMIC_FLAG, SMART_ACTION_SET_EMOTE_STATE, SMART_ACTION_SET_EVENT_PHASE, SMART_ACTION_SET_FACTION, SMART_ACTION_SET_FLY, SMART_ACTION_SET_GO_FLAG, SMART_ACTION_SET_HEALTH, SMART_ACTION_SET_HEALTH_REGEN, SMART_ACTION_SET_HOME_POS, SMART_ACTION_SET_IN_COMBAT_WITH_ZONE, SMART_ACTION_SET_INGAME_PHASE_MASK, SMART_ACTION_SET_INST_DATA, SMART_ACTION_SET_INST_DATA64, SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL, SMART_ACTION_SET_NPC_FLAG, SMART_ACTION_SET_ORIENTATION, SMART_ACTION_SET_POWER, SMART_ACTION_SET_RANGED_MOVEMENT, SMART_ACTION_SET_REACT_STATE, SMART_ACTION_SET_ROOT, SMART_ACTION_SET_RUN, SMART_ACTION_SET_SHEATH, SMART_ACTION_SET_SWIM, SMART_ACTION_SET_UNIT_FIELD_ANIM_TIER, SMART_ACTION_SET_UNIT_FLAG, SMART_ACTION_SET_VISIBILITY, SMART_ACTION_SIMPLE_TALK, SMART_ACTION_SOUND, SMART_ACTION_STORE_TARGET_LIST, SMART_ACTION_STORE_VARIABLE_DECIMAL, SMART_ACTION_SUMMON_CREATURE, SMART_ACTION_SUMMON_CREATURE_GROUP, SMART_ACTION_SUMMON_GO, SMART_ACTION_TALK, SMART_ACTION_TELEPORT, SMART_ACTION_THREAT_ALL_PCT, SMART_ACTION_THREAT_SINGLE_PCT, SMART_ACTION_TRIGGER_TIMED_EVENT, SMART_ACTION_UPDATE_TEMPLATE, SMART_ACTION_WP_PAUSE, SMART_ACTION_WP_RESUME, SMART_ACTION_WP_START, SMART_ACTION_WP_STOP, SMART_EVENT_ACCEPTED_QUEST, SMART_EVENT_ACTION_DONE, SMART_EVENT_AGGRO, SMART_EVENT_AI_INIT, SMART_EVENT_AREATRIGGER_ONTRIGGER, SMART_EVENT_CHARMED, SMART_EVENT_CHARMED_TARGET, SMART_EVENT_CORPSE_REMOVED, SMART_EVENT_DAMAGED, SMART_EVENT_DAMAGED_TARGET, SMART_EVENT_DATA_SET, SMART_EVENT_DEATH, SMART_EVENT_DUMMY_EFFECT, SMART_EVENT_END, SMART_EVENT_EVADE, SMART_EVENT_FLAGS_ALL, SMART_EVENT_FOLLOW_COMPLETED, SMART_EVENT_FRIENDLY_HEALTH, SMART_EVENT_FRIENDLY_HEALTH_PCT, SMART_EVENT_FRIENDLY_IS_CC, SMART_EVENT_FRIENDLY_MISSING_BUFF, SMART_EVENT_GAME_EVENT_END, SMART_EVENT_GAME_EVENT_START, SMART_EVENT_GO_EVENT_INFORM, SMART_EVENT_GO_STATE_CHANGED, SMART_EVENT_GOSSIP_HELLO, SMART_EVENT_GOSSIP_SELECT, SMART_EVENT_HAS_AURA, SMART_EVENT_HEALT_PCT, SMART_EVENT_IC_LOS, SMART_EVENT_INSTANCE_PLAYER_ENTER, SMART_EVENT_IS_BEHIND_TARGET, SMART_EVENT_JUST_CREATED, SMART_EVENT_JUST_SUMMONED, SMART_EVENT_KILL, SMART_EVENT_LINK, SMART_EVENT_MANA_PCT, SMART_EVENT_MOVEMENTINFORM, SMART_EVENT_ON_SPELLCLICK, SMART_EVENT_OOC_LOS, SMART_EVENT_PASSENGER_BOARDED, SMART_EVENT_PASSENGER_REMOVED, SMART_EVENT_PHASE_ALL, SMART_EVENT_PHASE_MAX, SMART_EVENT_QUEST_ACCEPTED, SMART_EVENT_QUEST_COMPLETION, SMART_EVENT_QUEST_FAIL, SMART_EVENT_QUEST_OBJ_COPLETETION, SMART_EVENT_QUEST_REWARDED, SMART_EVENT_RANGE, SMART_EVENT_REACHED_HOME, SMART_EVENT_RECEIVE_EMOTE, SMART_EVENT_RECEIVE_HEAL, SMART_EVENT_RESET, SMART_EVENT_RESPAWN, SMART_EVENT_REWARD_QUEST, SMART_EVENT_SPELLHIT, SMART_EVENT_SPELLHIT_TARGET, SMART_EVENT_SUMMON_DESPAWNED, SMART_EVENT_SUMMONED_UNIT, SMART_EVENT_TARGET_BUFFED, SMART_EVENT_TARGET_HEALTH_PCT, SMART_EVENT_TARGET_MANA_PCT, SMART_EVENT_TEXT_OVER, SMART_EVENT_TIMED_EVENT_TRIGGERED, SMART_EVENT_TRANSPORT_ADDCREATURE, SMART_EVENT_TRANSPORT_ADDPLAYER, SMART_EVENT_TRANSPORT_RELOCATE, SMART_EVENT_TRANSPORT_REMOVE_PLAYER, SMART_EVENT_UPDATE, SMART_EVENT_UPDATE_IC, SMART_EVENT_UPDATE_OOC, SMART_EVENT_VICTIM_CASTING, SMART_EVENT_WAYPOINT_ENDED, SMART_EVENT_WAYPOINT_PAUSED, SMART_EVENT_WAYPOINT_REACHED, SMART_EVENT_WAYPOINT_RESUMED, SMART_EVENT_WAYPOINT_START, SMART_EVENT_WAYPOINT_STOPPED, SMART_SCRIPT_RESPAWN_CONDITION_AREA, SMART_SCRIPT_RESPAWN_CONDITION_MAP, SMART_SCRIPT_TYPE_TIMED_ACTIONLIST, SMART_TARGET_CLOSEST_CREATURE, SMART_TARGET_CLOSEST_PLAYER, SMART_TARGET_CREATURE_DISTANCE, SMART_TARGET_CREATURE_GUID, SMART_TARGET_CREATURE_RANGE, SMART_TARGET_PLAYER_DISTANCE, SMART_TARGET_PLAYER_RANGE, SMART_TARGET_POSITION, SMARTAI_TEMPLATE_END, SmartAIEventMask, SmartAITypeMask, sObjectMgr, SmartAction::sound, SmartAction::sound1, SmartAction::sound2, SmartAction::sound3, SmartAction::sound4, SmartAction::sound5, SmartAction::spell, SmartEvent::spell, SmartEvent::spellHit, SmartEvent::spellId, sSmartWaypointMgr, sSpellMgr, SmartAction::state, sTaxiPathStore, SmartAction::summonCreature, SmartEvent::summoned, SmartAction::summonGO, SmartEvent::targetCasting, SmartAction::taxi, SmartAction::teleport, TEMPSUMMON_MANUAL_DESPAWN, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, SmartAction::timeEvent, SmartEvent::transportAddCreature, SmartAction::type, SmartEvent::type, SmartAction::updateTemplate, SmartAction::wpStart, and SmartAction::wpStop.

Referenced by LoadSmartAIFromDB().

◆ IsGameObjectValid()

bool SmartAIMgr::IsGameObjectValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsItemValid()

bool SmartAIMgr::IsItemValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsMinMaxValid()

bool SmartAIMgr::IsMinMaxValid ( SmartScriptHolder const & e,
uint32 min,
uint32 max )
inlineprivate

◆ IsQuestValid()

bool SmartAIMgr::IsQuestValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsSoundValid()

bool SmartAIMgr::IsSoundValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsSpellValid()

bool SmartAIMgr::IsSpellValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ IsTargetValid()

◆ IsTextEmoteValid()

bool SmartAIMgr::IsTextEmoteValid ( SmartScriptHolder const & e,
uint32 entry )
inlineprivate

◆ LoadHelperStores()

◆ LoadSmartAIFromDB()

◆ NotNULL()

bool SmartAIMgr::NotNULL ( SmartScriptHolder const & e,
uint32 data )
inlineprivate

◆ UnLoadHelperStores()

void SmartAIMgr::UnLoadHelperStores ( )
private

◆ Skyfire::Singleton< SmartAIMgr, Skyfire::NullMutex >

Definition at line 1358 of file SmartScriptMgr.h.

References UNORDERED_MAP.

Member Data Documentation

◆ KillCreditSpellStore

CacheSpellContainer SmartAIMgr::KillCreditSpellStore
private

◆ mEventMap

SmartAIEventMap SmartAIMgr::mEventMap[SMART_SCRIPT_TYPE_MAX]
private

Definition at line 1395 of file SmartScriptMgr.h.

Referenced by GetScript(), and LoadSmartAIFromDB().

◆ SummonCreatureSpellStore

CacheSpellContainer SmartAIMgr::SummonCreatureSpellStore
private

◆ SummonGameObjectSpellStore

CacheSpellContainer SmartAIMgr::SummonGameObjectSpellStore
private

The documentation for this class was generated from the following files: