[7067] Move inactive form/stance passive spells from playercreateinfo_spell to spell_learn_spell with active field.

This let have in `playercreateinfo_spell` only expected at character creating spells for simplify updating.
This commit is contained in:
VladimirMangos 2009-01-11 01:59:04 +03:00
parent 6165da2b3a
commit f956a3bf10
12 changed files with 2742 additions and 2724 deletions

View file

@ -1690,7 +1690,8 @@ void SpellMgr::LoadSpellLearnSpells()
{
mSpellLearnSpells.clear(); // need for reload case
QueryResult *result = WorldDatabase.Query("SELECT entry, SpellID FROM spell_learn_spell");
// 0 1 2
QueryResult *result = WorldDatabase.Query("SELECT entry, SpellID, Active FROM spell_learn_spell");
if(!result)
{
barGoLink bar( 1 );
@ -1714,6 +1715,7 @@ void SpellMgr::LoadSpellLearnSpells()
SpellLearnSpellNode node;
node.spell = fields[1].GetUInt32();
node.active = fields[2].GetBool();
node.autoLearned= false;
if(!sSpellStore.LookupEntry(spell_id))
@ -1750,6 +1752,7 @@ void SpellMgr::LoadSpellLearnSpells()
{
SpellLearnSpellNode dbc_node;
dbc_node.spell = entry->EffectTriggerSpell[i];
dbc_node.active = true; // all dbc based learned spells is active (show in spell book or hide by client itself)
// ignore learning not existed spells (broken/outdated/or generic learnig spell 483
if(!sSpellStore.LookupEntry(dbc_node.spell))