From 6efb768daa4b91aa4da8e9631a920b63f0331d86 Mon Sep 17 00:00:00 2001 From: laise Date: Sat, 27 Feb 2010 06:38:19 +0300 Subject: [PATCH] [9464] Spell effects of itemset 883 and variants. Signed-off-by: VladimirMangos --- sql/mangos.sql | 5 +- .../9464_01_mangos_spell_proc_event.sql | 6 +++ sql/updates/Makefile.am | 2 + src/game/SpellAuras.cpp | 53 +++++++++++++------ src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 6 files changed, 51 insertions(+), 19 deletions(-) create mode 100644 sql/updates/9464_01_mangos_spell_proc_event.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index cbdbf3bbb..461b66f4f 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_9460_02_mangos_spell_chain` bit(1) default NULL + `required_9464_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -18679,7 +18679,8 @@ INSERT INTO `spell_proc_event` VALUES (67672, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 50), (67702, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45), (67771, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 45), -(70664, 0x00000000, 7, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 2.000000, 0); +(70664, 0x00000000, 7, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 2.000000, 0), +(70748, 0x00000000, 3, 0x00000000, 0x00200000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 0.000000, 0); /*!40000 ALTER TABLE `spell_proc_event` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/updates/9464_01_mangos_spell_proc_event.sql b/sql/updates/9464_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..360f6a73f --- /dev/null +++ b/sql/updates/9464_01_mangos_spell_proc_event.sql @@ -0,0 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_9460_02_mangos_spell_chain required_9464_01_mangos_spell_proc_event bit; + +/*Item - Mage T10 4P Bonus*/ +DELETE FROM `spell_proc_event` WHERE `entry` = 70748; +INSERT INTO `spell_proc_event` VALUES +(70748, 0x00000000, 3, 0x00000000, 0x00200000, 0x00000000, 0x00000000, 0x00000000, 0x000000, 0.000000, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 3003d0b0a..589eb6159 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -78,6 +78,7 @@ pkgdata_DATA = \ 9450_01_mangos_spell_proc_event.sql \ 9460_01_mangos_spell_bonus_data.sql \ 9460_02_mangos_spell_chain.sql \ + 9464_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -136,4 +137,5 @@ EXTRA_DIST = \ 9450_01_mangos_spell_proc_event.sql \ 9460_01_mangos_spell_bonus_data.sql \ 9460_02_mangos_spell_chain.sql \ + 9464_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e46706d24..48da2040f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6031,24 +6031,47 @@ void Aura::HandleSpellSpecificBoosts(bool apply) else return; } - // Combustion (remove triggered aura stack) - else if (m_spellProto->Id == 11129) + + switch(GetId()) { - if(!apply) - spellId1 = 28682; - else + case 11129: // Combustion (remove triggered aura stack) + { + if(!apply) + spellId1 = 28682; + else + return; + break; + } + case 28682: // Combustion (remove main aura) + { + if(!apply) + spellId1 = 11129; + else + return; + break; + } + case 44401: // Missile Barrage (triggered) + case 48108: // Hot Streak (triggered) + case 57761: // Fireball! (Brain Freeze triggered) + { + // consumed aura + if (!apply && m_removeMode == AURA_REMOVE_BY_DEFAULT && m_duration != 0) + { + Unit* caster = GetCaster(); + // Item - Mage T10 2P Bonus + if (!caster || !caster->HasAura(70752)) + return; + + cast_at_remove = true; + spellId1 = 70753; // Pushing the Limit + } + else + return; + break; + } + default: return; } - // Combustion (remove main aura) - else if (m_spellProto->Id == 28682) - { - if(!apply) - spellId1 = 11129; - else - return; - } - else - return; break; } case SPELLFAMILY_WARRIOR: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 02c9b5f9c..d708ed4fd 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 "9463" + #define REVISION_NR "9464" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index d628a7745..4a0a122c7 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_9375_01_characters_character_glyphs" - #define REVISION_DB_MANGOS "required_9460_02_mangos_spell_chain" + #define REVISION_DB_MANGOS "required_9464_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__