TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ObjectMgr.h File Reference
#include "Log.h"
#include "Object.h"
#include "Bag.h"
#include "Creature.h"
#include "DynamicObject.h"
#include "GameObject.h"
#include "TemporarySummon.h"
#include "Corpse.h"
#include "QuestDef.h"
#include "ItemTemplate.h"
#include "NPCHandler.h"
#include "DatabaseEnv.h"
#include "Mail.h"
#include "Map.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
#include "VehicleDefines.h"
#include "ConditionMgr.h"
#include "DB2Stores.h"
#include <string>
#include <tuple>
#include <map>
#include <limits>
#include <functional>
#include <memory>
+ 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  GameTele
 
struct  ScriptInfo
 
struct  SpellClickInfo
 
struct  AreaTriggerStruct
 
struct  CellObjectGuids
 
struct  TrinityString
 
struct  PetLevelInfo
 
struct  MailLevelReward
 
struct  RepRewardRate
 
struct  ReputationOnKillEntry
 
struct  RepSpilloverTemplate
 
struct  PointOfInterest
 
struct  GossipMenuItems
 
struct  GossipMenus
 
struct  QuestPOIPoint
 
struct  QuestPOI
 
struct  QuestGreeting
 
struct  GraveYardData
 
struct  CharcterTemplateClass
 
struct  CharacterTemplate
 
struct  SkillTiersEntry
 
struct  ExtendedPlayerName
 
struct  LanguageDesc
 
struct  DungeonEncounter
 
struct  PhaseInfoStruct
 
class  ObjectMgr
 

Macros

#define TRINITY_TRAINER_START_REF   200000
 
#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 sObjectMgr   ObjectMgr::instance()
 

Typedefs

typedef std::map< uint32,
PageText
PageTextContainer
 
typedef std::unordered_map
< uint16, InstanceTemplate
InstanceTemplateContainer
 
typedef std::unordered_map
< uint32, GameTele
GameTeleContainer
 
typedef std::multimap< uint32,
ScriptInfo
ScriptMap
 
typedef std::map< uint32,
ScriptMap
ScriptMapMap
 
typedef std::multimap< uint32,
uint32
SpellScriptsContainer
 
typedef std::pair
< SpellScriptsContainer::iterator,
SpellScriptsContainer::iterator > 
SpellScriptsBounds
 
typedef std::multimap< uint32,
SpellClickInfo
SpellClickInfoContainer
 
typedef std::pair
< SpellClickInfoContainer::const_iterator,
SpellClickInfoContainer::const_iterator > 
SpellClickInfoMapBounds
 
typedef std::set
< ObjectGuid::LowType
CellGuidSet
 
typedef std::unordered_map
< uint32, CellObjectGuids
CellObjectGuidsMap
 
typedef std::unordered_map
< uint32, CellObjectGuidsMap
MapObjectGuids
 
typedef std::map< ObjectGuid,
ObjectGuid
LinkedRespawnContainer
 
typedef std::unordered_map
< ObjectGuid::LowType,
CreatureData
CreatureDataContainer
 
typedef std::unordered_map
< ObjectGuid::LowType,
GameObjectData
GameObjectDataContainer
 
typedef std::map
< TempSummonGroupKey,
std::vector< TempSummonData > > 
TempSummonDataContainer
 
typedef std::unordered_map
< uint32, CreatureLocale
CreatureLocaleContainer
 
typedef std::unordered_map
< uint32, GameObjectLocale
GameObjectLocaleContainer
 
typedef std::unordered_map
< uint32, QuestTemplateLocale
QuestTemplateLocaleContainer
 
typedef std::unordered_map
< uint32,
QuestObjectivesLocale
QuestObjectivesLocaleContainer
 
typedef std::unordered_map
< uint32, PageTextLocale
PageTextLocaleContainer
 
typedef std::unordered_map
< uint32,
GossipMenuItemsLocale
GossipMenuItemsLocaleContainer
 
typedef std::unordered_map
< uint32,
PointOfInterestLocale
PointOfInterestLocaleContainer
 
typedef std::unordered_map
< uint32, TrinityString
TrinityStringContainer
 
typedef std::multimap< uint32,
uint32
QuestRelations
 
typedef std::multimap< uint32,
uint32
QuestRelationsReverse
 
typedef std::pair
< QuestRelations::const_iterator,
QuestRelations::const_iterator > 
QuestRelationBounds
 
typedef std::pair
< QuestRelationsReverse::const_iterator,
QuestRelationsReverse::const_iterator > 
QuestRelationReverseBounds
 
typedef std::list
< MailLevelReward
MailLevelRewardList
 
typedef std::unordered_map
< uint8, MailLevelRewardList
MailLevelRewardContainer
 
typedef std::multimap< uint32,
GossipMenus
GossipMenusContainer
 
typedef std::pair
< GossipMenusContainer::const_iterator,
GossipMenusContainer::const_iterator > 
GossipMenusMapBounds
 
typedef std::pair
< GossipMenusContainer::iterator,
GossipMenusContainer::iterator > 
GossipMenusMapBoundsNonConst
 
typedef std::multimap< uint32,
GossipMenuItems
GossipMenuItemsContainer
 
typedef std::pair
< GossipMenuItemsContainer::const_iterator,
GossipMenuItemsContainer::const_iterator > 
GossipMenuItemsMapBounds
 
typedef std::pair
< GossipMenuItemsContainer::iterator,
GossipMenuItemsContainer::iterator > 
GossipMenuItemsMapBoundsNonConst
 
typedef std::vector< QuestPOIQuestPOIVector
 
typedef std::unordered_map
< uint32, QuestPOIVector
QuestPOIContainer
 
typedef std::unordered_map
< uint8, std::unordered_map
< uint32, QuestGreeting const * > > 
QuestGreetingContainer
 
typedef std::multimap< uint32,
GraveYardData
GraveYardContainer
 
typedef std::pair
< GraveYardContainer::const_iterator,
GraveYardContainer::const_iterator > 
GraveYardMapBounds
 
typedef std::pair
< GraveYardContainer::iterator,
GraveYardContainer::iterator > 
GraveYardMapBoundsNonConst
 
typedef std::unordered_map
< uint32, VendorItemData
CacheVendorItemContainer
 
typedef std::unordered_map
< uint32, TrainerSpellData
CacheTrainerSpellContainer
 
typedef std::unordered_map
< uint8, uint8
ExpansionRequirementContainer
 
typedef std::unordered_map
< uint32, std::string > 
RealmNameContainer
 
typedef std::unordered_map
< uint32, CharacterTemplate
CharacterTemplateContainer
 
typedef std::list
< DungeonEncounter const * > 
DungeonEncounterList
 
typedef std::unordered_map
< uint64, DungeonEncounterList
DungeonEncounterContainer
 
typedef std::unordered_map
< uint32, std::vector< uint32 > > 
TerrainPhaseInfo
 
typedef std::unordered_map
< uint32, std::vector< uint32 > > 
TerrainUIPhaseInfo
 
typedef std::unordered_map
< uint32, std::vector
< PhaseInfoStruct > > 
PhaseInfo
 

Enumerations

enum  ScriptCommands {
  SCRIPT_COMMAND_TALK = 0, SCRIPT_COMMAND_EMOTE = 1, SCRIPT_COMMAND_FIELD_SET = 2, SCRIPT_COMMAND_MOVE_TO = 3,
  SCRIPT_COMMAND_FLAG_SET = 4, SCRIPT_COMMAND_FLAG_REMOVE = 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_PLAY_ANIMKIT = 35
}
 
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  SkillRangeType {
  SKILL_RANGE_LANGUAGE, SKILL_RANGE_LEVEL, SKILL_RANGE_MONO, SKILL_RANGE_RANK,
  SKILL_RANGE_NONE
}
 
enum  EncounterCreditType { ENCOUNTER_CREDIT_KILL_CREATURE = 0, ENCOUNTER_CREDIT_CAST_SPELL = 1 }
 

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)
 
LanguageDesc constGetLanguageDescByID (uint32 lang)
 

Variables

TC_GAME_API ScriptMapMap sSpellScripts
 
TC_GAME_API ScriptMapMap sEventScripts
 
TC_GAME_API ScriptMapMap sWaypointScripts
 
TC_GAME_API LanguageDesc lang_description [LANGUAGES_COUNT]
 

Macro Definition Documentation

#define MAX_CHARTER_NAME   24
#define MAX_INTERNAL_PLAYER_NAME   15
#define MAX_PET_NAME   12
#define MAX_PLAYER_NAME   12
#define MAX_SKILL_STEP   16
#define sObjectMgr   ObjectMgr::instance()
#define TRINITY_TRAINER_START_REF   200000

Typedef Documentation

typedef std::unordered_map<uint32, TrainerSpellData> CacheTrainerSpellContainer
typedef std::unordered_map<uint32, VendorItemData> CacheVendorItemContainer
typedef std::set<ObjectGuid::LowType> CellGuidSet
typedef std::unordered_map<uint32, CellObjectGuids> CellObjectGuidsMap
typedef std::unordered_map<uint32, CharacterTemplate> CharacterTemplateContainer
typedef std::unordered_map<uint32, CreatureLocale> CreatureLocaleContainer
typedef std::unordered_map<uint8, uint8> ExpansionRequirementContainer
typedef std::unordered_map<uint32, GameObjectLocale> GameObjectLocaleContainer
typedef std::unordered_map<uint32, GameTele > GameTeleContainer
typedef std::pair<GossipMenuItemsContainer::const_iterator, GossipMenuItemsContainer::const_iterator> GossipMenuItemsMapBounds
typedef std::pair<GossipMenuItemsContainer::iterator, GossipMenuItemsContainer::iterator> GossipMenuItemsMapBoundsNonConst
typedef std::multimap<uint32, GossipMenus> GossipMenusContainer
typedef std::pair<GossipMenusContainer::const_iterator, GossipMenusContainer::const_iterator> GossipMenusMapBounds
typedef std::pair<GossipMenusContainer::iterator, GossipMenusContainer::iterator> GossipMenusMapBoundsNonConst
typedef std::multimap<uint32, GraveYardData> GraveYardContainer
typedef std::pair<GraveYardContainer::const_iterator, GraveYardContainer::const_iterator> GraveYardMapBounds
typedef std::pair<GraveYardContainer::iterator, GraveYardContainer::iterator> GraveYardMapBoundsNonConst
typedef std::unordered_map<uint16, InstanceTemplate> InstanceTemplateContainer
typedef std::unordered_map<uint8, MailLevelRewardList> MailLevelRewardContainer
typedef std::unordered_map<uint32, CellObjectGuidsMap> MapObjectGuids
typedef std::map<uint32, PageText> PageTextContainer
typedef std::unordered_map<uint32, PageTextLocale> PageTextLocaleContainer
typedef std::unordered_map<uint32, std::vector<PhaseInfoStruct> > PhaseInfo
typedef std::unordered_map<uint8, std::unordered_map<uint32, QuestGreeting const*> > QuestGreetingContainer
typedef std::unordered_map<uint32, QuestPOIVector> QuestPOIContainer
typedef std::vector<QuestPOI> QuestPOIVector
typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator> QuestRelationBounds
typedef std::pair<QuestRelationsReverse::const_iterator, QuestRelationsReverse::const_iterator> QuestRelationReverseBounds
typedef std::multimap<uint32, uint32> QuestRelations
typedef std::multimap<uint32, uint32> QuestRelationsReverse
typedef std::unordered_map<uint32, std::string> RealmNameContainer
typedef std::multimap<uint32, ScriptInfo> ScriptMap
typedef std::map<uint32, ScriptMap > ScriptMapMap
typedef std::pair<SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator> SpellClickInfoMapBounds
typedef std::pair<SpellScriptsContainer::iterator, SpellScriptsContainer::iterator> SpellScriptsBounds
typedef std::multimap<uint32, uint32> SpellScriptsContainer
typedef std::map<TempSummonGroupKey, std::vector<TempSummonData> > TempSummonDataContainer
typedef std::unordered_map<uint32, std::vector<uint32 > > TerrainPhaseInfo
typedef std::unordered_map<uint32, std::vector<uint32> > TerrainUIPhaseInfo
typedef std::unordered_map<uint32, TrinityString> TrinityStringContainer

Enumeration Type Documentation

Enumerator
ENCOUNTER_CREDIT_KILL_CREATURE 
ENCOUNTER_CREDIT_CAST_SPELL 
671 {
674 };
Definition: ObjectMgr.h:672
Definition: ObjectMgr.h:673
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 
150 {
151  // Talk Flags
152  SF_TALK_USE_PLAYER = 0x1,
153 
154  // Emote flags
155  SF_EMOTE_USE_STATE = 0x1,
156 
157  // TeleportTo flags
159 
160  // KillCredit flags
162 
163  // RemoveAura flags
164  SF_REMOVEAURA_REVERSE = 0x1,
165 
166  // CastSpell flags
173 
174  // PlaySound flags
177 
178  // Orientation flags
180 };
Definition: ObjectMgr.h:161
Definition: ObjectMgr.h:170
Definition: ObjectMgr.h:167
Definition: ObjectMgr.h:175
Definition: ObjectMgr.h:169
Definition: ObjectMgr.h:152
Definition: ObjectMgr.h:176
Definition: ObjectMgr.h:172
Definition: ObjectMgr.h:164
Definition: ObjectMgr.h:171
Definition: ObjectMgr.h:155
Definition: ObjectMgr.h:179
Definition: ObjectMgr.h:158
Definition: ObjectMgr.h:168
Enumerator
SCRIPT_COMMAND_TALK 
SCRIPT_COMMAND_EMOTE 
SCRIPT_COMMAND_FIELD_SET 
SCRIPT_COMMAND_MOVE_TO 
SCRIPT_COMMAND_FLAG_SET 
SCRIPT_COMMAND_FLAG_REMOVE 
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_PLAY_ANIMKIT 
85 {
86  SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (0=say, 1=whisper, 2=yell, 3=emote text, 4=boss emote text), datalong2 & 1 = player talk (instead of creature), dataint = string_id
87  SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state
88  SCRIPT_COMMAND_FIELD_SET = 2, // source/target = Creature, datalong = field id, datalog2 = value
89  SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination
90  SCRIPT_COMMAND_FLAG_SET = 4, // source/target = Creature, datalong = field id, datalog2 = bitmask
91  SCRIPT_COMMAND_FLAG_REMOVE = 5, // source/target = Creature, datalong = field id, datalog2 = bitmask
92  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
93  SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0
94  SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit
95  SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay
96  SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation
97  SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
98  SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
99  SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO
100  SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id
101  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
102  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)
103  SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount
104  SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay
105 
106  SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable
107  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)
108  SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute
109 
110  // TrinityCore only
111  SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation
112  SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id
113  SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id
114  SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player
115  SCRIPT_COMMAND_PLAYMOVIE = 34, // source = Player, datalong = movie id
116  SCRIPT_COMMAND_PLAY_ANIMKIT = 35 // source = Creature, datalong = AnimKit id
117 };
Definition: ObjectMgr.h:115
Definition: ObjectMgr.h:97
Definition: ObjectMgr.h:108
Definition: ObjectMgr.h:96
Definition: ObjectMgr.h:95
Definition: ObjectMgr.h:94
Definition: ObjectMgr.h:89
Definition: ObjectMgr.h:103
Definition: ObjectMgr.h:106
Definition: ObjectMgr.h:101
Definition: ObjectMgr.h:90
Definition: ObjectMgr.h:113
Definition: ObjectMgr.h:87
Definition: ObjectMgr.h:91
Definition: ObjectMgr.h:107
Definition: ObjectMgr.h:86
Definition: ObjectMgr.h:102
Definition: ObjectMgr.h:92
Definition: ObjectMgr.h:112
Definition: ObjectMgr.h:100
Definition: ObjectMgr.h:98
Definition: ObjectMgr.h:116
Definition: ObjectMgr.h:99
Definition: ObjectMgr.h:104
Definition: ObjectMgr.h:93
Definition: ObjectMgr.h:114
Definition: ObjectMgr.h:111
Definition: ObjectMgr.h:88
Enumerator
SCRIPTS_FIRST 
SCRIPTS_SPELL 
SCRIPTS_EVENT 
SCRIPTS_WAYPOINT 
SCRIPTS_LAST 
139 {
140  SCRIPTS_FIRST = 1,
141 
145 
147 };
Definition: ObjectMgr.h:142
Definition: ObjectMgr.h:146
Definition: ObjectMgr.h:140
Definition: ObjectMgr.h:144
Definition: ObjectMgr.h:143
Enumerator
SKILL_RANGE_LANGUAGE 
SKILL_RANGE_LEVEL 
SKILL_RANGE_MONO 
SKILL_RANGE_RANK 
SKILL_RANGE_NONE 
626 {
627  SKILL_RANGE_LANGUAGE, // 300..300
628  SKILL_RANGE_LEVEL, // 1..max skill for level
629  SKILL_RANGE_MONO, // 1..1, grey monolite bar
630  SKILL_RANGE_RANK, // 1..skill for known rank
631  SKILL_RANGE_NONE // 0..0 always
632 };
Definition: ObjectMgr.h:627
Definition: ObjectMgr.h:631
Definition: ObjectMgr.h:629
Definition: ObjectMgr.h:628
Definition: ObjectMgr.h:630

Function Documentation

ExtendedPlayerName ExtractExtendedPlayerName ( std::string const name)
156 {
157  size_t pos = name.find('-');
158  if (pos != std::string::npos)
159  return ExtendedPlayerName(name.substr(0, pos), name.substr(pos + 1));
160  else
161  return ExtendedPlayerName(name, "");
162 }
Definition: ObjectMgr.h:651

+ Here is the caller graph for this function:

LanguageDesc const* GetLanguageDescByID ( uint32  lang)
193 {
194  for (uint8 i = 0; i < LANGUAGES_COUNT; ++i)
195  {
196  if (uint32(lang_description[i].lang_id) == lang)
197  return &lang_description[i];
198  }
199 
200  return NULL;
201 }
arena_t NULL
Definition: jemalloc_internal.h:624
#define LANGUAGES_COUNT
Definition: SharedDefines.h:988
uint8_t uint8
Definition: Define.h:152
LanguageDesc lang_description[LANGUAGES_COUNT]
Definition: ObjectMgr.cpp:164
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the caller graph for this function:

std::string GetScriptCommandName ( ScriptCommands  command)
82 {
83  std::string res = "";
84  switch (command)
85  {
86  case SCRIPT_COMMAND_TALK: res = "SCRIPT_COMMAND_TALK"; break;
87  case SCRIPT_COMMAND_EMOTE: res = "SCRIPT_COMMAND_EMOTE"; break;
88  case SCRIPT_COMMAND_FIELD_SET: res = "SCRIPT_COMMAND_FIELD_SET"; break;
89  case SCRIPT_COMMAND_MOVE_TO: res = "SCRIPT_COMMAND_MOVE_TO"; break;
90  case SCRIPT_COMMAND_FLAG_SET: res = "SCRIPT_COMMAND_FLAG_SET"; break;
91  case SCRIPT_COMMAND_FLAG_REMOVE: res = "SCRIPT_COMMAND_FLAG_REMOVE"; break;
92  case SCRIPT_COMMAND_TELEPORT_TO: res = "SCRIPT_COMMAND_TELEPORT_TO"; break;
93  case SCRIPT_COMMAND_QUEST_EXPLORED: res = "SCRIPT_COMMAND_QUEST_EXPLORED"; break;
94  case SCRIPT_COMMAND_KILL_CREDIT: res = "SCRIPT_COMMAND_KILL_CREDIT"; break;
95  case SCRIPT_COMMAND_RESPAWN_GAMEOBJECT: res = "SCRIPT_COMMAND_RESPAWN_GAMEOBJECT"; break;
96  case SCRIPT_COMMAND_TEMP_SUMMON_CREATURE: res = "SCRIPT_COMMAND_TEMP_SUMMON_CREATURE"; break;
97  case SCRIPT_COMMAND_OPEN_DOOR: res = "SCRIPT_COMMAND_OPEN_DOOR"; break;
98  case SCRIPT_COMMAND_CLOSE_DOOR: res = "SCRIPT_COMMAND_CLOSE_DOOR"; break;
99  case SCRIPT_COMMAND_ACTIVATE_OBJECT: res = "SCRIPT_COMMAND_ACTIVATE_OBJECT"; break;
100  case SCRIPT_COMMAND_REMOVE_AURA: res = "SCRIPT_COMMAND_REMOVE_AURA"; break;
101  case SCRIPT_COMMAND_CAST_SPELL: res = "SCRIPT_COMMAND_CAST_SPELL"; break;
102  case SCRIPT_COMMAND_PLAY_SOUND: res = "SCRIPT_COMMAND_PLAY_SOUND"; break;
103  case SCRIPT_COMMAND_CREATE_ITEM: res = "SCRIPT_COMMAND_CREATE_ITEM"; break;
104  case SCRIPT_COMMAND_DESPAWN_SELF: res = "SCRIPT_COMMAND_DESPAWN_SELF"; break;
105  case SCRIPT_COMMAND_LOAD_PATH: res = "SCRIPT_COMMAND_LOAD_PATH"; break;
106  case SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT: res = "SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT"; break;
107  case SCRIPT_COMMAND_KILL: res = "SCRIPT_COMMAND_KILL"; break;
108  // TrinityCore only
109  case SCRIPT_COMMAND_ORIENTATION: res = "SCRIPT_COMMAND_ORIENTATION"; break;
110  case SCRIPT_COMMAND_EQUIP: res = "SCRIPT_COMMAND_EQUIP"; break;
111  case SCRIPT_COMMAND_MODEL: res = "SCRIPT_COMMAND_MODEL"; break;
112  case SCRIPT_COMMAND_CLOSE_GOSSIP: res = "SCRIPT_COMMAND_CLOSE_GOSSIP"; break;
113  case SCRIPT_COMMAND_PLAYMOVIE: res = "SCRIPT_COMMAND_PLAYMOVIE"; break;
114  case SCRIPT_COMMAND_PLAY_ANIMKIT: res = "SCRIPT_COMMAND_PLAY_ANIMKIT"; break;
115  default:
116  {
117  char sz[32];
118  sprintf(sz, "Unknown command: %d", command);
119  res = sz;
120  break;
121  }
122  }
123  return res;
124 }
Definition: ObjectMgr.h:115
Definition: ObjectMgr.h:97
Definition: ObjectMgr.h:108
Definition: ObjectMgr.h:96
Definition: ObjectMgr.h:95
Definition: ObjectMgr.h:94
Definition: ObjectMgr.h:89
Definition: ObjectMgr.h:103
Definition: ObjectMgr.h:106
Definition: ObjectMgr.h:101
Definition: ObjectMgr.h:90
Definition: ObjectMgr.h:113
Definition: ObjectMgr.h:87
Definition: ObjectMgr.h:91
Definition: ObjectMgr.h:107
Definition: ObjectMgr.h:86
Definition: ObjectMgr.h:102
std::string sprintf(CStringRef format, ArgList args)
Definition: format.h:3096
Definition: ObjectMgr.h:92
Definition: ObjectMgr.h:112
Definition: ObjectMgr.h:100
Definition: ObjectMgr.h:98
Definition: ObjectMgr.h:116
Definition: ObjectMgr.h:99
Definition: ObjectMgr.h:104
Definition: ObjectMgr.h:93
Definition: ObjectMgr.h:114
Definition: ObjectMgr.h:111
Definition: ObjectMgr.h:88

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ScriptMapMap* GetScriptsMapByType ( ScriptsType  type)
69 {
70  ScriptMapMap* res = NULL;
71  switch (type)
72  {
73  case SCRIPTS_SPELL: res = &sSpellScripts; break;
74  case SCRIPTS_EVENT: res = &sEventScripts; break;
75  case SCRIPTS_WAYPOINT: res = &sWaypointScripts; break;
76  default: break;
77  }
78  return res;
79 }
ScriptMapMap sSpellScripts
Definition: ObjectMgr.cpp:51
Definition: ObjectMgr.h:142
std::map< uint32, ScriptMap > ScriptMapMap
Definition: ObjectMgr.h:376
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: ObjectMgr.h:144
ScriptMapMap sEventScripts
Definition: ObjectMgr.cpp:52
ScriptMapMap sWaypointScripts
Definition: ObjectMgr.cpp:53
Definition: ObjectMgr.h:143

+ Here is the caller graph for this function:

std::string GetScriptsTableNameByType ( ScriptsType  type)
56 {
57  std::string res = "";
58  switch (type)
59  {
60  case SCRIPTS_SPELL: res = "spell_scripts"; break;
61  case SCRIPTS_EVENT: res = "event_scripts"; break;
62  case SCRIPTS_WAYPOINT: res = "waypoint_scripts"; break;
63  default: break;
64  }
65  return res;
66 }
Definition: ObjectMgr.h:142
Definition: ObjectMgr.h:144
Definition: ObjectMgr.h:143

+ Here is the caller graph for this function:

SkillRangeType GetSkillRangeType ( SkillRaceClassInfoEntry const rcEntry)
7873 {
7874  SkillLineEntry const* skill = sSkillLineStore.LookupEntry(rcEntry->SkillID);
7875  if (!skill)
7876  return SKILL_RANGE_NONE;
7877 
7878  if (sObjectMgr->GetSkillTier(rcEntry->SkillTierID))
7879  return SKILL_RANGE_RANK;
7880 
7881  if (rcEntry->SkillID == SKILL_RUNEFORGING || rcEntry->SkillID == SKILL_RUNEFORGING_2)
7882  return SKILL_RANGE_MONO;
7883 
7884  switch (skill->CategoryID)
7885  {
7886  case SKILL_CATEGORY_ARMOR:
7887  return SKILL_RANGE_MONO;
7889  return SKILL_RANGE_LANGUAGE;
7890  }
7891 
7892  return SKILL_RANGE_LEVEL;
7893 }
Definition: DBCStructure.h:952
Definition: ObjectMgr.h:627
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
Definition: ObjectMgr.h:631
#define sObjectMgr
Definition: ObjectMgr.h:1567
Definition: SharedDefines.h:4150
Definition: SharedDefines.h:4148
Definition: ObjectMgr.h:629
Definition: SharedDefines.h:4075
int32 CategoryID
Definition: DBCStructure.h:955
Definition: ObjectMgr.h:628
Definition: SharedDefines.h:4023
Definition: ObjectMgr.h:630
TC_GAME_API bool normalizePlayerName ( std::string &  name)
134 {
135  if (name.empty())
136  return false;
137 
138  wchar_t wstr_buf[MAX_INTERNAL_PLAYER_NAME+1];
139  size_t wstr_len = MAX_INTERNAL_PLAYER_NAME;
140 
141  if (!Utf8toWStr(name, &wstr_buf[0], wstr_len))
142  return false;
143 
144  wstr_buf[0] = wcharToUpper(wstr_buf[0]);
145  for (size_t i = 1; i < wstr_len; ++i)
146  wstr_buf[i] = wcharToLower(wstr_buf[i]);
147 
148  if (!WStrToUtf8(wstr_buf, wstr_len, name))
149  return false;
150 
151  return true;
152 }
bool Utf8toWStr(char const *utf8str, size_t csize, wchar_t *wstr, size_t &wsize)
Definition: Util.cpp:281
bool WStrToUtf8(wchar_t *wstr, size_t size, std::string &utf8str)
Definition: Util.cpp:328
#define MAX_INTERNAL_PLAYER_NAME
Definition: ObjectMgr.h:645
wchar_t wcharToLower(wchar_t wchar)
Definition: Util.h:278
wchar_t wcharToUpper(wchar_t wchar)
Definition: Util.h:250

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

TC_GAME_API ScriptMapMap sEventScripts
TC_GAME_API ScriptMapMap sSpellScripts
TC_GAME_API ScriptMapMap sWaypointScripts