Skip to content

Commit

Permalink
[10011] Check redundent procFlags value in spell_proc_event.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirMangos committed May 31, 2010
1 parent 76fab9f commit 22d2650
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sql/mangos.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';

--
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down
6 changes: 6 additions & 0 deletions sql/updates/10011_01_mangos_spell_proc_event.sql
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 2 additions & 0 deletions sql/updates/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
13 changes: 11 additions & 2 deletions src/game/SpellMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10010"
#define REVISION_NR "10011"
#endif // __REVISION_NR_H__
2 changes: 1 addition & 1 deletion src/shared/revision_sql.h
Original file line number Diff line number Diff line change
@@ -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__

0 comments on commit 22d2650

Please sign in to comment.