mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[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:
parent
d714cd8b3c
commit
0d363cc77a
9 changed files with 28 additions and 8 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue