TrinityCore
ObjectMgr.h File Reference
#include "Common.h"
#include "ConditionMgr.h"
#include "CreatureData.h"
#include "DatabaseEnvFwd.h"
#include "GameObjectData.h"
#include "ItemTemplate.h"
#include "IteratorPair.h"
#include "MovementDefines.h"
#include "NPCHandler.h"
#include "ObjectDefines.h"
#include "ObjectGuid.h"
#include "Position.h"
#include "QuestDef.h"
#include "RaceMask.h"
#include "SceneDefines.h"
#include "SharedDefines.h"
#include "Trainer.h"
#include "VehicleDefines.h"
#include <iterator>
#include <map>
#include <unordered_map>
+ Include dependency graph for ObjectMgr.h:

Go to the source code of this file.

Classes

struct  PageText
 
struct  TempSummonGroupKey
 Key for storing temp summon data in TempSummonDataContainer. More...
 
struct  TempSummonData
 Stores data for temp summons. More...
 
struct  InstanceTemplate
 
struct  GameTele
 
struct  ScriptInfo
 
struct  InstanceSpawnGroupInfo
 
struct  SpellClickInfo
 
struct  AreaTriggerStruct
 
struct  AccessRequirement
 
struct  CellObjectGuids
 
struct  TrinityString
 
struct  GossipMenuItemsLocale
 
struct  PointOfInterestLocale
 
struct  PlayerChoiceResponseLocale
 
struct  PlayerChoiceLocale
 
struct  QuestRelationResult
 
struct  QuestRelationResult::Iterator
 
struct  PlayerCreateInfoItem
 
struct  PlayerLevelInfo
 
struct  PlayerCreateInfoAction
 
struct  PlayerInfo
 
struct  PlayerInfo::CreatePosition
 
struct  PetLevelInfo
 
struct  MailLevelReward
 
struct  RepRewardRate
 
struct  ReputationOnKillEntry
 
struct  RepSpilloverTemplate
 
struct  PointOfInterest
 
struct  GossipMenuItems
 
struct  GossipMenus
 
struct  QuestPOIBlobPoint
 
struct  QuestPOIBlobData
 
struct  QuestPOIData
 
struct  WorldSafeLocsEntry
 
struct  GraveyardData
 
struct  SceneTemplate
 
struct  PlayerChoiceResponseRewardItem
 
struct  PlayerChoiceResponseRewardEntry
 
struct  PlayerChoiceResponseReward
 
struct  PlayerChoiceResponseMawPower
 
struct  PlayerChoiceResponse
 
struct  PlayerChoice
 
struct  SkillTiersEntry
 
struct  ExtendedPlayerName
 
struct  DungeonEncounter
 
struct  TerrainSwapInfo
 
struct  PhaseInfoStruct
 
struct  PhaseAreaInfo
 
struct  ClassAvailability
 
struct  RaceClassAvailability
 
struct  RaceUnlockRequirement
 
class  ObjectMgr
 
class  ObjectMgr::ScriptNameContainer
 
struct  ObjectMgr::ScriptNameContainer::Entry
 

Macros

#define MAX_SKILL_STEP   16
 
#define MAX_PLAYER_NAME   12
 
#define MAX_INTERNAL_PLAYER_NAME   15
 
#define MAX_PET_NAME   12
 
#define MAX_CHARTER_NAME   24
 
#define SPAWNGROUP_MAP_UNSET   0xFFFFFFFF
 
#define sObjectMgr   ObjectMgr::instance()
 

Typedefs

typedef std::map< uint32, PageTextPageTextContainer
 
typedef std::unordered_map< uint16, InstanceTemplateInstanceTemplateContainer
 
typedef std::unordered_map< uint32, GameTeleGameTeleContainer
 
typedef std::multimap< uint32, ScriptInfoScriptMap
 
typedef std::map< uint32, ScriptMapScriptMapMap
 
typedef std::multimap< uint32, std::pair< uint32, bool > > SpellScriptsContainer
 
typedef std::pair< SpellScriptsContainer::iterator, SpellScriptsContainer::iterator > SpellScriptsBounds
 
typedef std::multimap< uint32, SpellClickInfoSpellClickInfoContainer
 
typedef std::set< ObjectGuid::LowTypeCellGuidSet
 
typedef std::unordered_map< uint32, CellObjectGuidsCellObjectGuidsMap
 
typedef std::unordered_map< std::pair< uint32, Difficulty >, CellObjectGuidsMapMapObjectGuids
 
typedef std::map< std::tuple< uint32, Difficulty, uint32 >, CellObjectGuidsMapMapPersonalObjectGuids
 
typedef std::map< ObjectGuid, ObjectGuidLinkedRespawnContainer
 
typedef std::unordered_map< uint32, CreatureTemplateCreatureTemplateContainer
 
typedef std::unordered_map< uint32, CreatureAddonCreatureTemplateAddonContainer
 
typedef std::unordered_map< ObjectGuid::LowType, CreatureDataCreatureDataContainer
 
typedef std::unordered_map< ObjectGuid::LowType, CreatureAddonCreatureAddonContainer
 
typedef std::unordered_map< uint16, CreatureBaseStatsCreatureBaseStatsContainer
 
typedef std::unordered_map< uint8, EquipmentInfoEquipmentInfoContainerInternal
 
typedef std::unordered_map< uint32, EquipmentInfoContainerInternalEquipmentInfoContainer
 
typedef std::unordered_map< uint32, CreatureModelInfoCreatureModelContainer
 
typedef std::unordered_map< uint32, std::vector< uint32 > > CreatureQuestItemMap
 
typedef std::unordered_map< uint32, GameObjectTemplateGameObjectTemplateContainer
 
typedef std::unordered_map< uint32, GameObjectTemplateAddonGameObjectTemplateAddonContainer
 
typedef std::unordered_map< ObjectGuid::LowType, GameObjectOverrideGameObjectOverrideContainer
 
typedef std::unordered_map< ObjectGuid::LowType, GameObjectDataGameObjectDataContainer
 
typedef std::unordered_map< ObjectGuid::LowType, GameObjectAddonGameObjectAddonContainer
 
typedef std::unordered_map< uint32, std::vector< uint32 > > GameObjectQuestItemMap
 
typedef std::unordered_map< uint32, SpawnGroupTemplateDataSpawnGroupDataContainer
 
typedef std::multimap< uint32, SpawnMetadata const * > SpawnGroupLinkContainer
 
typedef std::unordered_map< uint16, std::vector< InstanceSpawnGroupInfo > > InstanceSpawnGroupContainer
 
typedef std::map< TempSummonGroupKey, std::vector< TempSummonData > > TempSummonDataContainer
 
typedef std::unordered_map< uint32, CreatureLocaleCreatureLocaleContainer
 
typedef std::unordered_map< uint32, GameObjectLocaleGameObjectLocaleContainer
 
typedef std::unordered_map< uint32, ItemTemplateItemTemplateContainer
 
typedef std::unordered_map< uint32, QuestTemplateLocaleQuestTemplateLocaleContainer
 
typedef std::unordered_map< uint32, QuestObjectivesLocaleQuestObjectivesLocaleContainer
 
typedef std::unordered_map< uint32, QuestOfferRewardLocaleQuestOfferRewardLocaleContainer
 
typedef std::unordered_map< uint32, QuestRequestItemsLocaleQuestRequestItemsLocaleContainer
 
typedef std::unordered_map< uint32, PageTextLocalePageTextLocaleContainer
 
typedef std::unordered_map< uint32, VehicleSeatAddonVehicleSeatAddonContainer
 
typedef std::unordered_map< std::pair< uint32, uint32 >, GossipMenuItemsLocaleGossipMenuItemsLocaleContainer
 
typedef std::unordered_map< uint32, PointOfInterestLocalePointOfInterestLocaleContainer
 
typedef std::unordered_map< uint32, TrinityStringTrinityStringContainer
 
typedef std::multimap< uint32, uint32QuestRelations
 
typedef std::multimap< uint32, uint32QuestRelationsReverse
 
typedef std::multimap< int32, uint32ExclusiveQuestGroups
 
typedef std::pair< ExclusiveQuestGroups::const_iterator, ExclusiveQuestGroups::const_iterator > ExclusiveQuestGroupsBounds
 
typedef std::vector< PlayerCreateInfoItemPlayerCreateInfoItems
 
typedef std::vector< uint32PlayerCreateInfoSpells
 
typedef std::vector< PlayerCreateInfoActionPlayerCreateInfoActions
 
typedef std::vector< SkillRaceClassInfoEntry const * > PlayerCreateInfoSkills
 
typedef std::list< MailLevelRewardMailLevelRewardList
 
typedef std::unordered_map< uint8, MailLevelRewardListMailLevelRewardContainer
 
typedef std::multimap< uint32, GossipMenusGossipMenusContainer
 
typedef std::pair< GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator > GossipMenusMapBounds
 
typedef std::pair< GossipMenusContainer::iterator, GossipMenusContainer::iterator > GossipMenusMapBoundsNonConst
 
typedef std::multimap< uint32, GossipMenuItemsGossipMenuItemsContainer
 
typedef std::pair< GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator > GossipMenuItemsMapBounds
 
typedef std::pair< GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator > GossipMenuItemsMapBoundsNonConst
 
typedef std::unordered_map< uint32, QuestPOIDataQuestPOIContainer
 
typedef std::array< std::unordered_map< uint32, QuestGreeting >, 2 > QuestGreetingContainer
 
typedef std::array< std::unordered_map< uint32, QuestGreetingLocale >, 2 > QuestGreetingLocaleContainer
 
typedef std::multimap< uint32, GraveyardDataGraveyardContainer
 
typedef std::pair< GraveyardContainer::const_iterator, GraveyardContainer::const_iterator > GraveyardMapBounds
 
typedef std::pair< GraveyardContainer::iterator, GraveyardContainer::iterator > GraveyardMapBoundsNonConst
 
typedef std::unordered_map< uint32, VendorItemDataCacheVendorItemContainer
 
typedef std::unordered_map< uint32, std::string > RealmNameContainer
 
typedef std::unordered_map< uint32, SceneTemplateSceneTemplateContainer
 
typedef std::unordered_map< uint32, std::string > PhaseNameContainer
 
typedef std::vector< DungeonEncounterDungeonEncounterList
 
typedef std::unordered_map< uint64, DungeonEncounterListDungeonEncounterContainer
 

Enumerations

enum  SummonerType { SUMMONER_TYPE_CREATURE = 0, SUMMONER_TYPE_GAMEOBJECT = 1, SUMMONER_TYPE_MAP = 2 }
 
enum  ScriptCommands {
  SCRIPT_COMMAND_TALK = 0, SCRIPT_COMMAND_EMOTE = 1, SCRIPT_COMMAND_FIELD_SET_DEPRECATED = 2, SCRIPT_COMMAND_MOVE_TO = 3,
  SCRIPT_COMMAND_FLAG_SET_DEPRECATED = 4, SCRIPT_COMMAND_FLAG_REMOVE_DEPRECATED = 5, SCRIPT_COMMAND_TELEPORT_TO = 6, SCRIPT_COMMAND_QUEST_EXPLORED = 7,
  SCRIPT_COMMAND_KILL_CREDIT = 8, SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, SCRIPT_COMMAND_OPEN_DOOR = 11,
  SCRIPT_COMMAND_CLOSE_DOOR = 12, SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, SCRIPT_COMMAND_REMOVE_AURA = 14, SCRIPT_COMMAND_CAST_SPELL = 15,
  SCRIPT_COMMAND_PLAY_SOUND = 16, SCRIPT_COMMAND_CREATE_ITEM = 17, SCRIPT_COMMAND_DESPAWN_SELF = 18, SCRIPT_COMMAND_LOAD_PATH = 20,
  SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, SCRIPT_COMMAND_KILL = 22, SCRIPT_COMMAND_ORIENTATION = 30, SCRIPT_COMMAND_EQUIP = 31,
  SCRIPT_COMMAND_MODEL = 32, SCRIPT_COMMAND_CLOSE_GOSSIP = 33, SCRIPT_COMMAND_PLAYMOVIE = 34, SCRIPT_COMMAND_MOVEMENT = 35,
  SCRIPT_COMMAND_PLAY_ANIMKIT = 36
}
 
enum  ChatType {
  CHAT_TYPE_SAY = 0, CHAT_TYPE_YELL = 1, CHAT_TYPE_TEXT_EMOTE = 2, CHAT_TYPE_BOSS_EMOTE = 3,
  CHAT_TYPE_WHISPER = 4, CHAT_TYPE_BOSS_WHISPER = 5, CHAT_TYPE_ZONE_YELL = 6, CHAT_TYPE_END = 255
}
 
enum  ScriptsType {
  SCRIPTS_FIRST = 1, SCRIPTS_SPELL = SCRIPTS_FIRST, SCRIPTS_EVENT, SCRIPTS_WAYPOINT,
  SCRIPTS_LAST
}
 
enum  eScriptFlags {
  SF_TALK_USE_PLAYER = 0x1, SF_EMOTE_USE_STATE = 0x1, SF_TELEPORT_USE_CREATURE = 0x1, SF_KILLCREDIT_REWARD_GROUP = 0x1,
  SF_REMOVEAURA_REVERSE = 0x1, SF_CASTSPELL_SOURCE_TO_TARGET = 0, SF_CASTSPELL_SOURCE_TO_SOURCE = 1, SF_CASTSPELL_TARGET_TO_TARGET = 2,
  SF_CASTSPELL_TARGET_TO_SOURCE = 3, SF_CASTSPELL_SEARCH_CREATURE = 4, SF_CASTSPELL_TRIGGERED = 0x1, SF_PLAYSOUND_TARGET_PLAYER = 0x1,
  SF_PLAYSOUND_DISTANCE_SOUND = 0x2, SF_ORIENTATION_FACE_TARGET = 0x1
}
 
enum  PlayerCreateMode : int8 { PlayerCreateMode::Normal = 0, PlayerCreateMode::NPE = 1, PlayerCreateMode::Max }
 
enum  SkillRangeType {
  SKILL_RANGE_LANGUAGE, SKILL_RANGE_LEVEL, SKILL_RANGE_MONO, SKILL_RANGE_RANK,
  SKILL_RANGE_NONE
}
 
enum  EncounterCreditType : uint8 { ENCOUNTER_CREDIT_KILL_CREATURE = 0, ENCOUNTER_CREDIT_CAST_SPELL = 1 }
 
enum  QueryDataGroup {
  QUERY_DATA_CREATURES = 0x01, QUERY_DATA_GAMEOBJECTS = 0x02, QUERY_DATA_ITEMS = 0x04, QUERY_DATA_QUESTS = 0x08,
  QUERY_DATA_POIS = 0x10, QUERY_DATA_ALL = 0xFF
}
 

Functions

std::string GetScriptsTableNameByType (ScriptsType type)
 
ScriptMapMapGetScriptsMapByType (ScriptsType type)
 
std::string GetScriptCommandName (ScriptCommands command)
 
SkillRangeType GetSkillRangeType (SkillRaceClassInfoEntry const *rcEntry)
 
TC_GAME_API bool normalizePlayerName (std::string &name)
 
ExtendedPlayerName ExtractExtendedPlayerName (std::string const &name)
 

Variables

TC_GAME_API ScriptMapMap sSpellScripts
 
TC_GAME_API ScriptMapMap sEventScripts
 
TC_GAME_API ScriptMapMap sWaypointScripts
 

Macro Definition Documentation

◆ MAX_CHARTER_NAME

#define MAX_CHARTER_NAME   24

◆ MAX_INTERNAL_PLAYER_NAME

#define MAX_INTERNAL_PLAYER_NAME   15

◆ MAX_PET_NAME

#define MAX_PET_NAME   12

◆ MAX_PLAYER_NAME

#define MAX_PLAYER_NAME   12

◆ MAX_SKILL_STEP

#define MAX_SKILL_STEP   16

◆ sObjectMgr

#define sObjectMgr   ObjectMgr::instance()

◆ SPAWNGROUP_MAP_UNSET

#define SPAWNGROUP_MAP_UNSET   0xFFFFFFFF

Typedef Documentation

◆ CacheVendorItemContainer

typedef std::unordered_map<uint32, VendorItemData> CacheVendorItemContainer

◆ CellGuidSet

typedef std::set<ObjectGuid::LowType> CellGuidSet

◆ CellObjectGuidsMap

typedef std::unordered_map<uint32, CellObjectGuids> CellObjectGuidsMap

◆ CreatureAddonContainer

◆ CreatureBaseStatsContainer

typedef std::unordered_map<uint16, CreatureBaseStats> CreatureBaseStatsContainer

◆ CreatureDataContainer

◆ CreatureLocaleContainer

typedef std::unordered_map<uint32, CreatureLocale> CreatureLocaleContainer

◆ CreatureModelContainer

typedef std::unordered_map<uint32, CreatureModelInfo> CreatureModelContainer

◆ CreatureQuestItemMap

typedef std::unordered_map<uint32, std::vector<uint32> > CreatureQuestItemMap

◆ CreatureTemplateAddonContainer

typedef std::unordered_map<uint32, CreatureAddon> CreatureTemplateAddonContainer

◆ CreatureTemplateContainer

typedef std::unordered_map<uint32, CreatureTemplate> CreatureTemplateContainer

◆ DungeonEncounterContainer

◆ DungeonEncounterList

typedef std::vector<DungeonEncounter> DungeonEncounterList

◆ EquipmentInfoContainer

◆ EquipmentInfoContainerInternal

typedef std::unordered_map<uint8, EquipmentInfo> EquipmentInfoContainerInternal

◆ ExclusiveQuestGroups

typedef std::multimap<int32, uint32> ExclusiveQuestGroups

◆ ExclusiveQuestGroupsBounds

typedef std::pair<ExclusiveQuestGroups::const_iterator, ExclusiveQuestGroups::const_iterator> ExclusiveQuestGroupsBounds

◆ GameObjectAddonContainer

◆ GameObjectDataContainer

◆ GameObjectLocaleContainer

typedef std::unordered_map<uint32, GameObjectLocale> GameObjectLocaleContainer

◆ GameObjectOverrideContainer

◆ GameObjectQuestItemMap

typedef std::unordered_map<uint32, std::vector<uint32> > GameObjectQuestItemMap

◆ GameObjectTemplateAddonContainer

◆ GameObjectTemplateContainer

◆ GameTeleContainer

typedef std::unordered_map<uint32, GameTele> GameTeleContainer

◆ GossipMenuItemsContainer

◆ GossipMenuItemsLocaleContainer

typedef std::unordered_map<std::pair<uint32, uint32>, GossipMenuItemsLocale> GossipMenuItemsLocaleContainer

◆ GossipMenuItemsMapBounds

typedef std::pair<GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator> GossipMenuItemsMapBounds

◆ GossipMenuItemsMapBoundsNonConst

typedef std::pair<GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator> GossipMenuItemsMapBoundsNonConst

◆ GossipMenusContainer

typedef std::multimap<uint32, GossipMenus> GossipMenusContainer

◆ GossipMenusMapBounds

typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator> GossipMenusMapBounds

◆ GossipMenusMapBoundsNonConst

typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst

◆ GraveyardContainer

typedef std::multimap<uint32, GraveyardData> GraveyardContainer

◆ GraveyardMapBounds

typedef std::pair<GraveyardContainer::const_iterator, GraveyardContainer::const_iterator> GraveyardMapBounds

◆ GraveyardMapBoundsNonConst

typedef std::pair<GraveyardContainer::iterator, GraveyardContainer::iterator> GraveyardMapBoundsNonConst

◆ InstanceSpawnGroupContainer

typedef std::unordered_map<uint16, std::vector<InstanceSpawnGroupInfo> > InstanceSpawnGroupContainer

◆ InstanceTemplateContainer

typedef std::unordered_map<uint16, InstanceTemplate> InstanceTemplateContainer

◆ ItemTemplateContainer

typedef std::unordered_map<uint32, ItemTemplate> ItemTemplateContainer

◆ LinkedRespawnContainer

◆ MailLevelRewardContainer

typedef std::unordered_map<uint8, MailLevelRewardList> MailLevelRewardContainer

◆ MailLevelRewardList

◆ MapObjectGuids

typedef std::unordered_map<std::pair<uint32 , Difficulty>, CellObjectGuidsMap> MapObjectGuids

◆ MapPersonalObjectGuids

◆ PageTextContainer

typedef std::map<uint32, PageText> PageTextContainer

◆ PageTextLocaleContainer

typedef std::unordered_map<uint32, PageTextLocale> PageTextLocaleContainer

◆ PhaseNameContainer

typedef std::unordered_map<uint32, std::string> PhaseNameContainer

◆ PlayerCreateInfoActions

◆ PlayerCreateInfoItems

◆ PlayerCreateInfoSkills

typedef std::vector<SkillRaceClassInfoEntry const*> PlayerCreateInfoSkills

◆ PlayerCreateInfoSpells

typedef std::vector<uint32> PlayerCreateInfoSpells

◆ PointOfInterestLocaleContainer

◆ QuestGreetingContainer

typedef std::array<std::unordered_map<uint32, QuestGreeting>, 2> QuestGreetingContainer

◆ QuestGreetingLocaleContainer

typedef std::array<std::unordered_map<uint32, QuestGreetingLocale>, 2> QuestGreetingLocaleContainer

◆ QuestObjectivesLocaleContainer

◆ QuestOfferRewardLocaleContainer

◆ QuestPOIContainer

typedef std::unordered_map<uint32, QuestPOIData> QuestPOIContainer

◆ QuestRelations

typedef std::multimap<uint32, uint32> QuestRelations

◆ QuestRelationsReverse

typedef std::multimap<uint32, uint32> QuestRelationsReverse

◆ QuestRequestItemsLocaleContainer

◆ QuestTemplateLocaleContainer

◆ RealmNameContainer

typedef std::unordered_map<uint32, std::string> RealmNameContainer

◆ SceneTemplateContainer

typedef std::unordered_map<uint32, SceneTemplate> SceneTemplateContainer

◆ ScriptMap

typedef std::multimap<uint32, ScriptInfo> ScriptMap

◆ ScriptMapMap

typedef std::map<uint32, ScriptMap> ScriptMapMap

◆ SpawnGroupDataContainer

◆ SpawnGroupLinkContainer

typedef std::multimap<uint32, SpawnMetadata const*> SpawnGroupLinkContainer

◆ SpellClickInfoContainer

◆ SpellScriptsBounds

typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds

◆ SpellScriptsContainer

typedef std::multimap<uint32 , std::pair<uint32 , bool > > SpellScriptsContainer

◆ TempSummonDataContainer

typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer

◆ TrinityStringContainer

typedef std::unordered_map<uint32, TrinityString> TrinityStringContainer

◆ VehicleSeatAddonContainer

typedef std::unordered_map<uint32, VehicleSeatAddon> VehicleSeatAddonContainer

Enumeration Type Documentation

◆ ChatType

enum ChatType
Enumerator
CHAT_TYPE_SAY 
CHAT_TYPE_YELL 
CHAT_TYPE_TEXT_EMOTE 
CHAT_TYPE_BOSS_EMOTE 
CHAT_TYPE_WHISPER 
CHAT_TYPE_BOSS_WHISPER 
CHAT_TYPE_ZONE_YELL 
CHAT_TYPE_END 
143 {
144  CHAT_TYPE_SAY = 0,
145  CHAT_TYPE_YELL = 1,
148  CHAT_TYPE_WHISPER = 4,
151  CHAT_TYPE_END = 255
152 };
Definition: ObjectMgr.h:148
Definition: ObjectMgr.h:145
Definition: ObjectMgr.h:146
Definition: ObjectMgr.h:149
Definition: ObjectMgr.h:144
Definition: ObjectMgr.h:147
Definition: ObjectMgr.h:151
Definition: ObjectMgr.h:150

◆ EncounterCreditType

Enumerator
ENCOUNTER_CREDIT_KILL_CREATURE 
ENCOUNTER_CREDIT_CAST_SPELL 
990  : uint8
991 {
994 };
Definition: ObjectMgr.h:992
Definition: ObjectMgr.h:993
uint8_t uint8
Definition: Define.h:145

◆ eScriptFlags

Enumerator
SF_TALK_USE_PLAYER 
SF_EMOTE_USE_STATE 
SF_TELEPORT_USE_CREATURE 
SF_KILLCREDIT_REWARD_GROUP 
SF_REMOVEAURA_REVERSE 
SF_CASTSPELL_SOURCE_TO_TARGET 
SF_CASTSPELL_SOURCE_TO_SOURCE 
SF_CASTSPELL_TARGET_TO_TARGET 
SF_CASTSPELL_TARGET_TO_SOURCE 
SF_CASTSPELL_SEARCH_CREATURE 
SF_CASTSPELL_TRIGGERED 
SF_PLAYSOUND_TARGET_PLAYER 
SF_PLAYSOUND_DISTANCE_SOUND 
SF_ORIENTATION_FACE_TARGET 
189 {
190  // Talk Flags
191  SF_TALK_USE_PLAYER = 0x1,
192 
193  // Emote flags
194  SF_EMOTE_USE_STATE = 0x1,
195 
196  // TeleportTo flags
198 
199  // KillCredit flags
201 
202  // RemoveAura flags
203  SF_REMOVEAURA_REVERSE = 0x1,
204 
205  // CastSpell flags
212 
213  // PlaySound flags
216 
217  // Orientation flags
219 };
Definition: ObjectMgr.h:200
Definition: ObjectMgr.h:209
Definition: ObjectMgr.h:206
Definition: ObjectMgr.h:214
Definition: ObjectMgr.h:208
Definition: ObjectMgr.h:191
Definition: ObjectMgr.h:215
Definition: ObjectMgr.h:211
Definition: ObjectMgr.h:203
Definition: ObjectMgr.h:210
Definition: ObjectMgr.h:194
Definition: ObjectMgr.h:218
Definition: ObjectMgr.h:197
Definition: ObjectMgr.h:207

◆ PlayerCreateMode

enum PlayerCreateMode : int8
strong
Enumerator
Normal 
NPE 
Max 
615  : int8
616 {
617  Normal = 0,
618  NPE = 1,
619 
620  Max
621 };
int8_t int8
Definition: Define.h:141

◆ QueryDataGroup

Enumerator
QUERY_DATA_CREATURES 
QUERY_DATA_GAMEOBJECTS 
QUERY_DATA_ITEMS 
QUERY_DATA_QUESTS 
QUERY_DATA_POIS 
QUERY_DATA_ALL 
1053 {
1054  QUERY_DATA_CREATURES = 0x01,
1055  QUERY_DATA_GAMEOBJECTS = 0x02,
1056  QUERY_DATA_ITEMS = 0x04,
1057  QUERY_DATA_QUESTS = 0x08,
1058  QUERY_DATA_POIS = 0x10,
1059 
1060  QUERY_DATA_ALL = 0xFF
1061 };
Definition: ObjectMgr.h:1054
Definition: ObjectMgr.h:1056
Definition: ObjectMgr.h:1058
Definition: ObjectMgr.h:1055
Definition: ObjectMgr.h:1057
Definition: ObjectMgr.h:1060

◆ ScriptCommands

Enumerator
SCRIPT_COMMAND_TALK 
SCRIPT_COMMAND_EMOTE 
SCRIPT_COMMAND_FIELD_SET_DEPRECATED 
SCRIPT_COMMAND_MOVE_TO 
SCRIPT_COMMAND_FLAG_SET_DEPRECATED 
SCRIPT_COMMAND_FLAG_REMOVE_DEPRECATED 
SCRIPT_COMMAND_TELEPORT_TO 
SCRIPT_COMMAND_QUEST_EXPLORED 
SCRIPT_COMMAND_KILL_CREDIT 
SCRIPT_COMMAND_RESPAWN_GAMEOBJECT 
SCRIPT_COMMAND_TEMP_SUMMON_CREATURE 
SCRIPT_COMMAND_OPEN_DOOR 
SCRIPT_COMMAND_CLOSE_DOOR 
SCRIPT_COMMAND_ACTIVATE_OBJECT 
SCRIPT_COMMAND_REMOVE_AURA 
SCRIPT_COMMAND_CAST_SPELL 
SCRIPT_COMMAND_PLAY_SOUND 
SCRIPT_COMMAND_CREATE_ITEM 
SCRIPT_COMMAND_DESPAWN_SELF 
SCRIPT_COMMAND_LOAD_PATH 
SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT 
SCRIPT_COMMAND_KILL 
SCRIPT_COMMAND_ORIENTATION 
SCRIPT_COMMAND_EQUIP 
SCRIPT_COMMAND_MODEL 
SCRIPT_COMMAND_CLOSE_GOSSIP 
SCRIPT_COMMAND_PLAYMOVIE 
SCRIPT_COMMAND_MOVEMENT 
SCRIPT_COMMAND_PLAY_ANIMKIT 
107 {
108  SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (see ChatType enum), datalong2 & 1 = player talk (instead of creature), dataint = string_id
109  SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state
111  SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination
114  SCRIPT_COMMAND_TELEPORT_TO = 6, // source/target = Creature/Player (see datalong2), datalong = map_id, datalong2 = 0: Player; 1: Creature, x/y/z = destination, o = orientation
115  SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0
116  SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit
117  SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay
118  SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation
119  SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
120  SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
121  SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO
122  SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id
123  SCRIPT_COMMAND_CAST_SPELL = 15, // source and/or target = Unit, datalong2 = cast direction (0: s->t 1: s->s 2: t->t 3: t->s 4: s->creature with dataint entry), dataint & 1 = triggered flag
124  SCRIPT_COMMAND_PLAY_SOUND = 16, // source = WorldObject, target = none/Player, datalong = sound id, datalong2 (bitmask: 0/1=anyone/player, 0/2=without/with distance dependency, so 1|2 = 3 is target with distance dependency)
125  SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount
126  SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay
127 
128  SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable
129  SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, // source = WorldObject (if present used as a search center), datalong = script id, datalong2 = unit lowguid, dataint = script table to use (see ScriptsType)
130  SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute
131 
132  // TrinityCore only
133  SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation
134  SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id
135  SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id
136  SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player
137  SCRIPT_COMMAND_PLAYMOVIE = 34, // source = Player, datalong = movie id
138  SCRIPT_COMMAND_MOVEMENT = 35, // source = Creature, datalong = MovementType, datalong2 = MovementDistance (wander_distance f.ex.), dataint = pathid
139  SCRIPT_COMMAND_PLAY_ANIMKIT = 36 // source = Creature, datalong = AnimKit id
140 };
Definition: ObjectMgr.h:137
Definition: ObjectMgr.h:119
Definition: ObjectMgr.h:130
Definition: ObjectMgr.h:118
Definition: ObjectMgr.h:117
Definition: ObjectMgr.h:116
Definition: ObjectMgr.h:138
Definition: ObjectMgr.h:111
Definition: ObjectMgr.h:125
Definition: ObjectMgr.h:128
Definition: ObjectMgr.h:123
Definition: ObjectMgr.h:135
Definition: ObjectMgr.h:109
Definition: ObjectMgr.h:129
Definition: ObjectMgr.h:108
Definition: ObjectMgr.h:124
Definition: ObjectMgr.h:114
Definition: ObjectMgr.h:112
Definition: ObjectMgr.h:134
Definition: ObjectMgr.h:122
Definition: ObjectMgr.h:113
Definition: ObjectMgr.h:120
Definition: ObjectMgr.h:139
Definition: ObjectMgr.h:121
Definition: ObjectMgr.h:110
Definition: ObjectMgr.h:126
Definition: ObjectMgr.h:115
Definition: ObjectMgr.h:136
Definition: ObjectMgr.h:133

◆ ScriptsType

Enumerator
SCRIPTS_FIRST 
SCRIPTS_SPELL 
SCRIPTS_EVENT 
SCRIPTS_WAYPOINT 
SCRIPTS_LAST 
178 {
179  SCRIPTS_FIRST = 1,
180 
184 
186 };
Definition: ObjectMgr.h:181
Definition: ObjectMgr.h:185
Definition: ObjectMgr.h:179
Definition: ObjectMgr.h:183
Definition: ObjectMgr.h:182

◆ SkillRangeType

Enumerator
SKILL_RANGE_LANGUAGE 
SKILL_RANGE_LEVEL 
SKILL_RANGE_MONO 
SKILL_RANGE_RANK 
SKILL_RANGE_NONE 
955 {
956  SKILL_RANGE_LANGUAGE, // 300..300
957  SKILL_RANGE_LEVEL, // 1..max skill for level
958  SKILL_RANGE_MONO, // 1..1, grey monolite bar
959  SKILL_RANGE_RANK, // 1..skill for known rank
960  SKILL_RANGE_NONE // 0..0 always
961 };
Definition: ObjectMgr.h:956
Definition: ObjectMgr.h:960
Definition: ObjectMgr.h:958
Definition: ObjectMgr.h:957
Definition: ObjectMgr.h:959

◆ SummonerType

Enumerator
SUMMONER_TYPE_CREATURE 
SUMMONER_TYPE_GAMEOBJECT 
SUMMONER_TYPE_MAP 
66 {
70 };
Definition: ObjectMgr.h:69
Definition: ObjectMgr.h:67
Definition: ObjectMgr.h:68

Function Documentation

◆ ExtractExtendedPlayerName()

ExtendedPlayerName ExtractExtendedPlayerName ( std::string const &  name)
177 {
178  size_t pos = name.find('-');
179  if (pos != std::string::npos)
180  return ExtendedPlayerName(name.substr(0, pos), name.substr(pos + 1));
181  else
182  return ExtendedPlayerName(name, "");
183 }
Definition: ObjectMgr.h:981
+ Here is the caller graph for this function:

◆ GetScriptCommandName()

std::string GetScriptCommandName ( ScriptCommands  command)
104 {
105  std::string res = "";
106  switch (command)
107  {
108  case SCRIPT_COMMAND_TALK: res = "SCRIPT_COMMAND_TALK"; break;
109  case SCRIPT_COMMAND_EMOTE: res = "SCRIPT_COMMAND_EMOTE"; break;
110  case SCRIPT_COMMAND_FIELD_SET_DEPRECATED: res = "SCRIPT_COMMAND_FIELD_SET_DEPRECATED"; break;
111  case SCRIPT_COMMAND_MOVE_TO: res = "SCRIPT_COMMAND_MOVE_TO"; break;
112  case SCRIPT_COMMAND_FLAG_SET_DEPRECATED: res = "SCRIPT_COMMAND_FLAG_SET_DEPRECATED"; break;
113  case SCRIPT_COMMAND_FLAG_REMOVE_DEPRECATED: res = "SCRIPT_COMMAND_FLAG_REMOVE_DEPRECATED"; break;
114  case SCRIPT_COMMAND_TELEPORT_TO: res = "SCRIPT_COMMAND_TELEPORT_TO"; break;
115  case SCRIPT_COMMAND_QUEST_EXPLORED: res = "SCRIPT_COMMAND_QUEST_EXPLORED"; break;
116  case SCRIPT_COMMAND_KILL_CREDIT: res = "SCRIPT_COMMAND_KILL_CREDIT"; break;
117  case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT: res = "SCRIPT_COMMAND_RESPAWN_GAMEOBJECT"; break;
118  case SCRIPT_COMMAND_TEMP_SUMMON_CREATURE: res = "SCRIPT_COMMAND_TEMP_SUMMON_CREATURE"; break;
119  case SCRIPT_COMMAND_OPEN_DOOR: res = "SCRIPT_COMMAND_OPEN_DOOR"; break;
120  case SCRIPT_COMMAND_CLOSE_DOOR: res = "SCRIPT_COMMAND_CLOSE_DOOR"; break;
121  case SCRIPT_COMMAND_ACTIVATE_OBJECT: res = "SCRIPT_COMMAND_ACTIVATE_OBJECT"; break;
122  case SCRIPT_COMMAND_REMOVE_AURA: res = "SCRIPT_COMMAND_REMOVE_AURA"; break;
123  case SCRIPT_COMMAND_CAST_SPELL: res = "SCRIPT_COMMAND_CAST_SPELL"; break;
124  case SCRIPT_COMMAND_PLAY_SOUND: res = "SCRIPT_COMMAND_PLAY_SOUND"; break;
125  case SCRIPT_COMMAND_CREATE_ITEM: res = "SCRIPT_COMMAND_CREATE_ITEM"; break;
126  case SCRIPT_COMMAND_DESPAWN_SELF: res = "SCRIPT_COMMAND_DESPAWN_SELF"; break;
127  case SCRIPT_COMMAND_LOAD_PATH: res = "SCRIPT_COMMAND_LOAD_PATH"; break;
128  case SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT: res = "SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT"; break;
129  case SCRIPT_COMMAND_KILL: res = "SCRIPT_COMMAND_KILL"; break;
130  // TrinityCore only
131  case SCRIPT_COMMAND_ORIENTATION: res = "SCRIPT_COMMAND_ORIENTATION"; break;
132  case SCRIPT_COMMAND_EQUIP: res = "SCRIPT_COMMAND_EQUIP"; break;
133  case SCRIPT_COMMAND_MODEL: res = "SCRIPT_COMMAND_MODEL"; break;
134  case SCRIPT_COMMAND_CLOSE_GOSSIP: res = "SCRIPT_COMMAND_CLOSE_GOSSIP"; break;
135  case SCRIPT_COMMAND_PLAYMOVIE: res = "SCRIPT_COMMAND_PLAYMOVIE"; break;
136  case SCRIPT_COMMAND_MOVEMENT: res = "SCRIPT_COMMAND_MOVEMENT"; break;
137  case SCRIPT_COMMAND_PLAY_ANIMKIT: res = "SCRIPT_COMMAND_PLAY_ANIMKIT"; break;
138  default:
139  {
140  char sz[32];
141  sprintf(sz, "Unknown command: %d", command);
142  res = sz;
143  break;
144  }
145  }
146  return res;
147 }
Definition: ObjectMgr.h:137
Definition: ObjectMgr.h:119
Definition: ObjectMgr.h:130
Definition: ObjectMgr.h:118
Definition: ObjectMgr.h:117
Definition: ObjectMgr.h:116
Definition: ObjectMgr.h:138
Definition: ObjectMgr.h:111
Definition: ObjectMgr.h:125
Definition: ObjectMgr.h:128
Definition: ObjectMgr.h:123
Definition: ObjectMgr.h:135
Definition: ObjectMgr.h:109
Definition: ObjectMgr.h:129
Definition: ObjectMgr.h:108
Definition: ObjectMgr.h:124
Definition: ObjectMgr.h:114
Definition: ObjectMgr.h:112
Definition: ObjectMgr.h:134
Definition: ObjectMgr.h:122
Definition: ObjectMgr.h:113
Definition: ObjectMgr.h:120
Definition: ObjectMgr.h:139
Definition: ObjectMgr.h:121
Definition: ObjectMgr.h:110
Definition: ObjectMgr.h:126
Definition: ObjectMgr.h:115
Definition: ObjectMgr.h:136
Definition: ObjectMgr.h:133
+ Here is the caller graph for this function:

◆ GetScriptsMapByType()

ScriptMapMap* GetScriptsMapByType ( ScriptsType  type)
91 {
92  ScriptMapMap* res = nullptr;
93  switch (type)
94  {
95  case SCRIPTS_SPELL: res = &sSpellScripts; break;
96  case SCRIPTS_EVENT: res = &sEventScripts; break;
97  case SCRIPTS_WAYPOINT: res = &sWaypointScripts; break;
98  default: break;
99  }
100  return res;
101 }
ScriptMapMap sSpellScripts
Definition: ObjectMgr.cpp:73
Definition: ObjectMgr.h:181
std::map< uint32, ScriptMap > ScriptMapMap
Definition: ObjectMgr.h:422
Definition: ObjectMgr.h:183
ScriptMapMap sEventScripts
Definition: ObjectMgr.cpp:74
ScriptMapMap sWaypointScripts
Definition: ObjectMgr.cpp:75
Definition: ObjectMgr.h:182
+ Here is the caller graph for this function:

◆ GetScriptsTableNameByType()

std::string GetScriptsTableNameByType ( ScriptsType  type)
78 {
79  std::string res = "";
80  switch (type)
81  {
82  case SCRIPTS_SPELL: res = "spell_scripts"; break;
83  case SCRIPTS_EVENT: res = "event_scripts"; break;
84  case SCRIPTS_WAYPOINT: res = "waypoint_scripts"; break;
85  default: break;
86  }
87  return res;
88 }
Definition: ObjectMgr.h:181
Definition: ObjectMgr.h:183
Definition: ObjectMgr.h:182
+ Here is the caller graph for this function:

◆ GetSkillRangeType()

SkillRangeType GetSkillRangeType ( SkillRaceClassInfoEntry const *  rcEntry)
9094 {
9095  SkillLineEntry const* skill = sSkillLineStore.LookupEntry(rcEntry->SkillID);
9096  if (!skill)
9097  return SKILL_RANGE_NONE;
9098 
9099  if (sObjectMgr->GetSkillTier(rcEntry->SkillTierID))
9100  return SKILL_RANGE_RANK;
9101 
9102  if (rcEntry->SkillID == SKILL_RUNEFORGING)
9103  return SKILL_RANGE_MONO;
9104 
9105  switch (skill->CategoryID)
9106  {
9107  case SKILL_CATEGORY_ARMOR:
9108  return SKILL_RANGE_MONO;
9110  return SKILL_RANGE_LANGUAGE;
9111  }
9112 
9113  return SKILL_RANGE_LEVEL;
9114 }
DB2Storage< SkillLineEntry > sSkillLineStore("SkillLine.db2", SkillLineLoadInfo::Instance())
Definition: DB2Structure.h:3082
Definition: ObjectMgr.h:956
Definition: ObjectMgr.h:960
int8 CategoryID
Definition: DB2Structure.h:3090
#define sObjectMgr
Definition: ObjectMgr.h:1967
Definition: SharedDefines.h:5605
Definition: SharedDefines.h:5603
Definition: ObjectMgr.h:958
Definition: ObjectMgr.h:957
Definition: SharedDefines.h:5360
Definition: ObjectMgr.h:959
+ Here is the caller graph for this function:

◆ normalizePlayerName()

TC_GAME_API bool normalizePlayerName ( std::string &  name)
157 {
158  if (name.empty())
159  return false;
160 
161  std::wstring tmp;
162  if (!Utf8toWStr(name, tmp))
163  return false;
164 
165  wstrToLower(tmp);
166  if (!tmp.empty())
167  tmp[0] = wcharToUpper(tmp[0]);
168 
169  if (!WStrToUtf8(tmp, name))
170  return false;
171 
172  return true;
173 }
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
Definition: Util.cpp:365
bool WStrToUtf8(wchar_t const *wstr, size_t size, std::string &utf8str)
Definition: Util.cpp:415
void wstrToLower(std::wstring &str)
Definition: Util.cpp:462
wchar_t wcharToUpper(wchar_t wchar)
Definition: Util.h:235
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ sEventScripts

TC_GAME_API ScriptMapMap sEventScripts

◆ sSpellScripts

TC_GAME_API ScriptMapMap sSpellScripts

◆ sWaypointScripts

TC_GAME_API ScriptMapMap sWaypointScripts