1481 TC_LOG_INFO(
"server.loading",
">> Loaded 0 spell learn spells. DB table `spell_learn_spell` is empty.");
1488 Field* fields = result->Fetch();
1501 TC_LOG_ERROR(
"sql.sql",
"Spell %u listed in `spell_learn_spell` does not exist", spell_id);
1507 TC_LOG_ERROR(
"sql.sql",
"Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.
Spell);
1513 TC_LOG_ERROR(
"sql.sql",
"Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.
Spell);
1520 }
while (result->NextRow());
1539 dbc_node.
Spell = effect->TriggerSpell;
1555 for (SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
1557 if (itr->second.Spell == dbc_node.
Spell)
1559 TC_LOG_ERROR(
"sql.sql",
"Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.",
1560 spell, dbc_node.
Spell);
1582 for (SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
1584 if (itr->second.Spell == spellLearnSpell->SpellID)
1586 TC_LOG_ERROR(
"sql.sql",
"Found redundant record (entry: %u, SpellID: %u) in `spell_learn_spell`, spell added automatically from SpellLearnSpell.db2", spellLearnSpell->LearnSpellID, spellLearnSpell->SpellID);
1598 for (SpellLearnSpellMap::const_iterator itr = dbc_node_bounds.first; itr != dbc_node_bounds.second; ++itr)
1600 if (itr->second.Spell == spellLearnSpell->SpellID)
1611 dbcLearnNode.
Spell = spellLearnSpell->SpellID;
1613 dbcLearnNode.
Active =
true;
1616 mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spellLearnSpell->LearnSpellID, dbcLearnNode));
1620 uint32 mastery_count = 0;
1640 for (SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
1642 if (itr->second.Spell == mastery)
1644 TC_LOG_ERROR(
"sql.sql",
"Found redundant record (entry: %u, SpellID: %u) in `spell_learn_spell`, spell added automatically as mastery learned spell from ChrSpecialization.dbc", masteryMainSpell, mastery);
1656 for (SpellLearnSpellMap::const_iterator itr = dbc_node_bounds.first; itr != dbc_node_bounds.second; ++itr)
1658 if (itr->second.Spell == mastery)
1669 masteryNode.
Spell = mastery;
1671 masteryNode.
Active =
true;
1674 mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(masteryMainSpell, masteryNode));
1679 TC_LOG_INFO(
"server.loading",
">> Loaded %u spell learn spells, %u found in Spell.dbc and %u from TalentTab.dbc in %u ms", count, dbc_count, mastery_count,
GetMSTimeDiffToNow(oldMSTime));
Definition: DBCEnums.h:404
#define MAX_MASTERY_SPELLS
Definition: DBCStructure.h:243
uint32 Spell
Definition: SpellMgr.h:539
bool IsPassive() const
Definition: SpellInfo.cpp:1403
Definition: SharedDefines.h:1879
Definition: DB2Structure.h:1203
Definition: SpellInfo.h:326
Class used to access individual fields of database query result.
Definition: Field.h:56
uint32 getMSTime()
Definition: Timer.h:24
uint32 const MasterySpells[MAX_CLASSES]
Definition: Player.cpp:114
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
Definition: DatabaseEnv.cpp:20
uint32 OverridesSpell
Definition: SpellMgr.h:540
Definition: SharedDefines.h:1046
Definition: DBCStructure.h:245
uint32 MasterySpellID[MAX_MASTERY_SPELLS]
Definition: DBCStructure.h:250
Definition: SpellMgr.h:537
uint32 GetSpellInfoStoreSize() const
Definition: SpellMgr.h:691
bool HasAttribute(SpellAttr0 attribute) const
Definition: SpellInfo.h:462
uint32 ClassID
Definition: DBCStructure.h:249
Definition: SpellInfo.h:238
uint32_t uint32
Definition: Define.h:150
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
SpellLearnSpellMapBounds GetSpellLearnSpellMapBounds(uint32 spell_id) const
Definition: SpellMgr.cpp:670
bool HasEffect(uint32 difficulty, SpellEffectName effect) const
Definition: SpellInfo.cpp:1169
bool AutoLearned
Definition: SpellMgr.h:542
SpellLearnSpellMap mSpellLearnSpells
Definition: SpellMgr.h:733
#define MAX_CLASSES
Definition: SharedDefines.h:181
Definition: SharedDefines.h:1054
DB2Storage< SpellLearnSpellEntry > sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellFormat, HOTFIX_SEL_SPELL_LEARN_SPELL)
DBCStorage< ChrSpecializationEntry > sChrSpecializationStore(ChrSpecializationfmt)
SpellInfo const * GetSpellInfo(uint32 spellId) const
Definition: SpellMgr.h:682
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
uint32 GetUInt32() const
Definition: Field.h:146
SpellEffectInfoVector GetEffectsForDifficulty(uint32 difficulty) const
Definition: SpellInfo.cpp:3311
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
bool GetBool() const
Definition: Field.h:65
bool Active
Definition: SpellMgr.h:541
std::multimap< uint32, SpellLearnSpellNode > SpellLearnSpellMap
Definition: SpellMgr.h:545
std::pair< SpellLearnSpellMap::const_iterator, SpellLearnSpellMap::const_iterator > SpellLearnSpellMapBounds
Definition: SpellMgr.h:546
Definition: SpellInfo.h:189