[10419] Check redundant single rank spell data in spell_chain.

Also, add empty lines to end of file and apply code style tosome sql updates.
This commit is contained in:
VladimirMangos 2010-08-29 06:20:33 +04:00
parent d714cd8b3c
commit 0d363cc77a
9 changed files with 28 additions and 8 deletions

View file

@ -2520,6 +2520,20 @@ void SpellMgr::LoadSpellChains()
mSpellChainsNext.insert(SpellChainMapNext::value_type(node.req,spell_id));
}
// check single rank redundant cases (single rank talents not added by default so this can be only custom cases)
for(SpellChainMap::const_iterator i = mSpellChains.begin(); i != mSpellChains.end(); ++i)
{
// skip non-first ranks, and spells with additional reqs
if (i->second.rank > 1 || i->second.req)
continue;
if (mSpellChainsNext.find(i->first) == mSpellChainsNext.end())
{
sLog.outErrorDb("Spell %u (prev: %u, first: %u, rank: %d, req: %u) listed in `spell_chain` has single rank data, so redundant.",
i->first,i->second.prev,i->second.first,i->second.rank,i->second.req);
}
}
sLog.outString();
sLog.outString( ">> Loaded %u spell chain records", count );
}