aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 7b92b7c4051..43ee4952ed3 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1087,16 +1087,17 @@ void SpellMgr::LoadSpellLearnSpells()
for (SpellLearnSpellEntry const* spellLearnSpell : sSpellLearnSpellStore)
{
- if (!GetSpellInfo(spellLearnSpell->SpellID, DIFFICULTY_NONE))
+ if (!GetSpellInfo(spellLearnSpell->SpellID, DIFFICULTY_NONE) ||
+ !GetSpellInfo(spellLearnSpell->LearnSpellID, DIFFICULTY_NONE))
continue;
- SpellLearnSpellMapBounds db_node_bounds = dbSpellLearnSpells.equal_range(spellLearnSpell->LearnSpellID);
+ SpellLearnSpellMapBounds db_node_bounds = dbSpellLearnSpells.equal_range(spellLearnSpell->SpellID);
bool found = false;
for (SpellLearnSpellMap::const_iterator itr = db_node_bounds.first; itr != db_node_bounds.second; ++itr)
{
- if (int32(itr->second.Spell) == spellLearnSpell->SpellID)
+ if (int32(itr->second.Spell) == spellLearnSpell->LearnSpellID)
{
- 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);
+ TC_LOG_ERROR("sql.sql", "Found redundant record (entry: %u, SpellID: %u) in `spell_learn_spell`, spell added automatically from SpellLearnSpell.db2", spellLearnSpell->SpellID, spellLearnSpell->LearnSpellID);
found = true;
break;
}
@@ -1106,11 +1107,11 @@ void SpellMgr::LoadSpellLearnSpells()
continue;
// Check if it is already found in Spell.dbc, ignore silently if yes
- SpellLearnSpellMapBounds dbc_node_bounds = GetSpellLearnSpellMapBounds(spellLearnSpell->LearnSpellID);
+ SpellLearnSpellMapBounds dbc_node_bounds = GetSpellLearnSpellMapBounds(spellLearnSpell->SpellID);
found = false;
for (SpellLearnSpellMap::const_iterator itr = dbc_node_bounds.first; itr != dbc_node_bounds.second; ++itr)
{
- if (int32(itr->second.Spell) == spellLearnSpell->SpellID)
+ if (int32(itr->second.Spell) == spellLearnSpell->LearnSpellID)
{
found = true;
break;
@@ -1121,12 +1122,12 @@ void SpellMgr::LoadSpellLearnSpells()
continue;
SpellLearnSpellNode dbcLearnNode;
- dbcLearnNode.Spell = spellLearnSpell->SpellID;
+ dbcLearnNode.Spell = spellLearnSpell->LearnSpellID;
dbcLearnNode.OverridesSpell = spellLearnSpell->OverridesSpellID;
dbcLearnNode.Active = true;
dbcLearnNode.AutoLearned = false;
- mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spellLearnSpell->LearnSpellID, dbcLearnNode));
+ mSpellLearnSpells.insert(SpellLearnSpellMap::value_type(spellLearnSpell->SpellID, dbcLearnNode));
++dbc_count;
}