From ad92f5e210b7a2c0584cdabd30560fe723d160be Mon Sep 17 00:00:00 2001 From: Anubisss Date: Fri, 15 May 2009 17:58:06 +0200 Subject: [PATCH] *Fix Glyph of Ice Block. *Thanks QAston for the help in the SpellFamilyMask. --HG-- branch : trunk --- sql/updates/3323_world_spell_proc_event.sql | 4 ++++ sql/world_spell_full.sql | 3 ++- src/game/Unit.cpp | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 sql/updates/3323_world_spell_proc_event.sql diff --git a/sql/updates/3323_world_spell_proc_event.sql b/sql/updates/3323_world_spell_proc_event.sql new file mode 100644 index 0000000000..e1ed164999 --- /dev/null +++ b/sql/updates/3323_world_spell_proc_event.sql @@ -0,0 +1,4 @@ +-- Glyph of Ice Block -- +DELETE FROM `spell_proc_event` WHERE `entry` = 56372; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(56372, 0x00, 3, 0x00000000, 0x00000080, 0x00000000, 0x00004000, 0x00000000, 0.000000, 0.000000, 0); diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql index af93f1f4cd..12a3f5d274 100644 --- a/sql/world_spell_full.sql +++ b/sql/world_spell_full.sql @@ -1491,5 +1491,6 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell (974, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3), (9782, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0), (9784, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0), -(9799, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0); +(9799, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0), +(56372, 0, 3, 0, 128, 0, 16384, 0, 0, 0, 0); -- (42370, 0x00, 11, 0x00000080, 0x00000000, 0x00000000, 0.000000, 0.000000, 0); \ No newline at end of file diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e176405d04..5c7bf24457 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5331,6 +5331,25 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger CastSpell(this, 28682, true, castItem, triggeredByAura); return (procEx & PROC_EX_CRITICAL_HIT);// charge update only at crit hits, no hidden cooldowns } + // Glyph of Ice Block + case 56372: + { + if(GetTypeId() != TYPEID_PLAYER) + return false; + + SpellCooldowns SpellCDs = ((Player*)this)->GetSpellCooldowns(); + // remove cooldowns on all ranks of Frost Nova + for(SpellCooldowns::const_iterator itr = SpellCDs.begin(); itr != SpellCDs.end(); itr++) + { + SpellEntry const* SpellCDs_entry = sSpellStore.LookupEntry(itr->first); + // Frost Nova + if(SpellCDs_entry && SpellCDs_entry->SpellFamilyName == SPELLFAMILY_MAGE && SpellCDs_entry->SpellFamilyFlags[0] & 0x00000040) + { + ((Player*)this)->RemoveSpellCooldown(SpellCDs_entry->Id, true); + } + } + break; + } } break; }