diff --git a/sql/mangos.sql b/sql/mangos.sql index 4010d6029..d25e5ae3c 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -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_10008_01_mangos_db_verison` bit(1) default NULL + `required_10011_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -18591,7 +18591,7 @@ INSERT INTO `spell_proc_event` VALUES (54488, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54489, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (54490, 0x00000000, 0, 0x20000021, 0x00009000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), -(54646, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00015400, 0x00000002, 0.000000, 0.000000, 0), +(54646, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (54695, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45), (54707, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 60), (54738, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 45), @@ -18713,7 +18713,7 @@ INSERT INTO `spell_proc_event` VALUES (63108, 0x00000000, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (63156, 0x00000000, 0, 0x00000001, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0), (63245, 0x00000000, 5, 0x00000100, 0x00800000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -(63280, 0x00000000, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0x000000, 0.000000, 0), +(63280, 0x00000000, 11, 0x20000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 0.000000, 0), (63320, 0x00000000, 5, 0x00040000, 0x00000000, 0x00008000, 0x00004000, 0x00000001, 0.000000, 0.000000, 0), (63373, 0x00000000, 11, 0x80000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000, 0.000000, 0.000000, 0), (63534, 0x00000000, 6, 0x00000040, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), diff --git a/sql/updates/10011_01_mangos_spell_proc_event.sql b/sql/updates/10011_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..a13492ecc --- /dev/null +++ b/sql/updates/10011_01_mangos_spell_proc_event.sql @@ -0,0 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_10008_01_mangos_db_verison required_10011_01_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE `entry` IN (54646,63280); +INSERT INTO `spell_proc_event` VALUES +(54646, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), +(63280, 0x00000000, 11, 0x20000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 0.000000, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 3dc93c0c7..dd95f026b 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -78,6 +78,7 @@ pkgdata_DATA = \ 10007_01_characters_pet_aura.sql \ 10008_01_mangos_db_verison.sql \ 10008_01_realmd_realmd_db_version.sql \ + 10011_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -136,4 +137,5 @@ EXTRA_DIST = \ 10007_01_characters_pet_aura.sql \ 10008_01_mangos_db_verison.sql \ 10008_01_realmd_realmd_db_version.sql \ + 10011_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 6a8a777f5..8635fa1e6 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1074,15 +1074,24 @@ void SpellMgr::LoadSpellProcEvents() DoSpellProcEvent worker(spe); doForHighRanks(entry,worker); - if (spell->procFlags==0) + if (spe.procFlags == 0) { - if (spe.procFlags == 0) + if (spell->procFlags==0) { sLog.outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); continue; } customProc++; } + else + { + if (spell->procFlags==spe.procFlags) + { + sLog.outErrorDb("Spell %u listed in `spell_proc_event` have exactly same proc flags as in spell.dbc, field value redundent", entry); + continue; + } + } + ++count; } while( result->NextRow() ); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8cf9e75f1..765601897 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10010" + #define REVISION_NR "10011" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 23f5416ef..e63c1943d 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_10007_01_characters_pet_aura" - #define REVISION_DB_MANGOS "required_10008_01_mangos_db_verison" + #define REVISION_DB_MANGOS "required_10011_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_10008_01_realmd_realmd_db_version" #endif // __REVISION_SQL_H__