Core/Spell: Fix rogue "Glyph of Preparation"

Closes #10359

Signed-off-by: Vincent-Michael <Vincent_Michael@gmx.de>
This commit is contained in:
timh52280 authored and Vincent-Michael committed 2013-07-25 18:03:42 +02:00
1 parent 6dc1f242e4
commit 6a6e9a225c
3 files changed
+32 -40

No files matched your search

+11 -17
View File
@@ -362,31 +362,25 @@ class spell_rog_preparation : public SpellScriptLoader
Player* caster = GetCaster()->ToPlayer();
// immediately finishes the cooldown on certain Rogue abilities
const SpellCooldowns& cm = caster->GetSpellCooldownMap();
SpellCooldowns const& cm = caster->GetSpellCooldownMap();
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
if (!spellInfo)
continue;
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE)
{
if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VAN_EVAS_SPRINT) // Vanish, Evasion, Sprint
caster->RemoveSpellCooldown((itr++)->first, true);
else if (caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION))
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE &&
(spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_VAN_EVAS_SPRINT) || // Vanish, Evasion, Sprint
// Glyph of Preparation
caster->HasAura(SPELL_ROGUE_GLYPH_OF_PREPARATION) &&
(spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE_SMOKE_BOMB || // Dismantle, Smoke Bomb
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG0_ROGUE_KICK)) // Kick
{
if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_DISMANTLE || // Dismantle
spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_KICK || // Kick
(spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_BLADE_FLURRY && // Blade Flurry
spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_BLADE_FLURRY))
caster->RemoveSpellCooldown((itr++)->first, true);
else
++itr;
caster->RemoveSpellCooldown((itr++)->first, true);
}
else
++itr;
}
else
++itr;
}
}