mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +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
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
|||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`cache_id` int(10) default '0',
|
||||
`required_10416_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
`required_10419_01_mangos_spell_chain` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -16788,8 +16788,6 @@ INSERT INTO spell_chain VALUES
|
|||
(9885,9884,1126,7,0),
|
||||
(26990,9885,1126,8,0),
|
||||
(48469,26990,1126,9,0),
|
||||
/*Nourish*/
|
||||
(50464,0,50464,1,0),
|
||||
/*Rebirth*/
|
||||
(20484,0,20484,1,0),
|
||||
(20739,20484,20484,2,0),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10400_01_mangos_mangos_string required_10409_01_mangos_spell_chain bit;
|
||||
|
||||
INSERT INTO spell_chain VALUES (47230, 0, 47230, 1, 0), (47231, 47230, 47230, 2, 0);
|
||||
INSERT INTO spell_chain VALUES
|
||||
(47230, 0, 47230, 1, 0),
|
||||
(47231, 47230, 47230, 2, 0);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10410_01_mangos_spell_chain required_10411_01_mangos_spell_proc_event bit;
|
||||
|
||||
insert into spell_proc_event values (47230, 0x7F, 5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
insert into spell_proc_event values (47230, 0x7F, 5, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10411_01_mangos_spell_proc_event required_10416_01_mangos_spell_proc_event bit;
|
||||
|
||||
DELETE FROM spell_proc_event WHERE entry = 71611;
|
||||
INSERT INTO spell_proc_event VALUES (71611, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
INSERT INTO spell_proc_event VALUES (71611, 0x7F, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);
|
||||
|
|
|
|||
4
sql/updates/10419_01_mangos_spell_chain.sql
Normal file
4
sql/updates/10419_01_mangos_spell_chain.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_10416_01_mangos_spell_proc_event required_10419_01_mangos_spell_chain bit;
|
||||
|
||||
DELETE FROM spell_chain WHERE first_spell = 50464;
|
||||
|
||||
|
|
@ -89,6 +89,7 @@ pkgdata_DATA = \
|
|||
10410_01_mangos_spell_chain.sql \
|
||||
10411_01_mangos_spell_proc_event.sql \
|
||||
10416_01_mangos_spell_proc_event.sql \
|
||||
10419_01_mangos_spell_chain.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -158,4 +159,5 @@ EXTRA_DIST = \
|
|||
10410_01_mangos_spell_chain.sql \
|
||||
10411_01_mangos_spell_proc_event.sql \
|
||||
10416_01_mangos_spell_proc_event.sql \
|
||||
10419_01_mangos_spell_chain.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10418"
|
||||
#define REVISION_NR "10419"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef __REVISION_SQL_H__
|
||||
#define __REVISION_SQL_H__
|
||||
#define REVISION_DB_CHARACTERS "required_10332_02_characters_pet_aura"
|
||||
#define REVISION_DB_MANGOS "required_10416_01_mangos_spell_proc_event"
|
||||
#define REVISION_DB_MANGOS "required_10419_01_mangos_spell_chain"
|
||||
#define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version"
|
||||
#endif // __REVISION_SQL_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue