From 9d8aa63d5c51a37d917c7dc062ddc0ad0dd899b6 Mon Sep 17 00:00:00 2001 From: Beaste Date: Mon, 15 Jun 2009 16:33:52 +0400 Subject: [PATCH] [8021] Implement triggering part of shaman talent 51483 and ranks. Signed-off-by: VladimirMangos --- sql/mangos.sql | 5 ++++- sql/updates/8021_01_mangos_spell_proc_event.sql | 7 +++++++ sql/updates/Makefile.am | 2 ++ src/game/Unit.cpp | 14 ++++++++++++++ src/shared/revision_nr.h | 2 +- 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 sql/updates/8021_01_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index 95c1caef3..50671d4b7 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -23,7 +23,7 @@ DROP TABLE IF EXISTS `db_version`; CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, - `required_8016_01_mangos_npc_spellclick_spells` bit(1) default NULL + `required_8021_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -17410,6 +17410,9 @@ INSERT INTO `spell_proc_event` VALUES (51474, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), (51478, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), (51479, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0.000000, 0.000000, 0), +(51483, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), +(51485, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), +(51486, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), (51556, 0x00000000, 11, 0x000000C0, 0x00000000, 0x00000010, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (51557, 0x00000000, 11, 0x000000C0, 0x00000000, 0x00000010, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), (51558, 0x00000000, 11, 0x000000C0, 0x00000000, 0x00000010, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), diff --git a/sql/updates/8021_01_mangos_spell_proc_event.sql b/sql/updates/8021_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..936471131 --- /dev/null +++ b/sql/updates/8021_01_mangos_spell_proc_event.sql @@ -0,0 +1,7 @@ +ALTER TABLE db_version CHANGE COLUMN required_8016_01_mangos_npc_spellclick_spells required_8021_01_mangos_spell_proc_event bit; + +DELETE FROM `spell_proc_event` WHERE `entry` IN (51483,51485,51486); +INSERT INTO `spell_proc_event` VALUES +(51483, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), +(51485, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0), +(51486, 0x00000001, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 8d52c1756..e04d52a63 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -222,6 +222,7 @@ pkgdata_DATA = \ 7988_08_mangos_spell_bonus_data.sql \ 7988_09_mangos_spell_proc_event.sql \ 8016_01_mangos_npc_spellclick_spells.sql \ + 8021_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -424,4 +425,5 @@ EXTRA_DIST = \ 7988_08_mangos_spell_bonus_data.sql \ 7988_09_mangos_spell_proc_event.sql \ 8016_01_mangos_npc_spellclick_spells.sql \ + 8021_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4d5301106..4fda1d9bf 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5851,6 +5851,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu break; } } + // Storm, Earth and Fire + if (dummySpell->SpellIconID == 3063) + { + // Earthbind Totem summon only + if(procSpell->Id != 2484) + return false; + + float chance = triggerAmount; + if (!roll_chance_f(chance)) + return false; + + triggered_spell_id = 64695; + break; + } // Ancestral Awakening if (dummySpell->SpellIconID == 3065) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1a71db475..450ae4c7c 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 "8020" + #define REVISION_NR "8021" #endif // __REVISION_NR_H__