diff --git a/sql/mangos.sql b/sql/mangos.sql index 7af4ddbe5..5d99431b2 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_9466_01_mangos_mangos_string` bit(1) default NULL + `required_9477_01_mangos_spell_proc_event` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -18663,6 +18663,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), (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/9477_01_mangos_spell_proc_event.sql b/sql/updates/9477_01_mangos_spell_proc_event.sql new file mode 100644 index 000000000..9cb3df85c --- /dev/null +++ b/sql/updates/9477_01_mangos_spell_proc_event.sql @@ -0,0 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_9466_01_mangos_mangos_string required_9477_01_mangos_spell_proc_event bit; + +/*Glyph of Totem of Wrath*/ +DELETE FROM `spell_proc_event` WHERE `entry` = 63280; +INSERT INTO `spell_proc_event` VALUES +(63280, 0x00000000, 11, 0x20000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000, 0x000000, 0.000000, 0); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 75a7fe3c3..3ff841d7d 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -80,6 +80,7 @@ pkgdata_DATA = \ 9460_02_mangos_spell_chain.sql \ 9464_01_mangos_spell_proc_event.sql \ 9466_01_mangos_mangos_string.sql \ + 9477_01_mangos_spell_proc_event.sql \ README ## Additional files to include when running 'make dist' @@ -140,4 +141,5 @@ EXTRA_DIST = \ 9460_02_mangos_spell_chain.sql \ 9464_01_mangos_spell_proc_event.sql \ 9466_01_mangos_mangos_string.sql \ + 9477_01_mangos_spell_proc_event.sql \ README diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 16cfb3bea..51185f3ce 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6664,6 +6664,34 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 58879; break; } + // Glyph of Totem of Wrath + case 63280: + { + Totem* totem = GetTotem(TOTEM_SLOT_FIRE); + if (!totem) + return false; + + // find totem aura bonus + AuraList const& spellPower = totem->GetAurasByType(SPELL_AURA_NONE); + for(AuraList::const_iterator i = spellPower.begin();i != spellPower.end(); ++i) + { + // select proper aura for format aura type in spell proto + if ((*i)->GetTarget()==totem && (*i)->GetSpellProto()->EffectApplyAuraName[(*i)->GetEffIndex()] == SPELL_AURA_MOD_HEALING_DONE && + (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000004000000)) + { + basepoints[0] = triggerAmount * (*i)->GetModifier()->m_amount / 100; + break; + } + } + + if (!basepoints[0]) + return false; + + basepoints[1] = basepoints[0]; + triggered_spell_id = 63283; // Totem of Wrath, caster bonus + target = this; + break; + } // Shaman T8 Elemental 4P Bonus case 64928: { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8ffb2420c..277c9d7b2 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 "9476" + #define REVISION_NR "9477" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 1a00af424..e79817b00 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_9466_01_mangos_mangos_string" + #define REVISION_DB_MANGOS "required_9477_01_mangos_spell_proc_event" #define REVISION_DB_REALMD "required_9010_01_realmd_realmlist" #endif // __REVISION_SQL_H__