diff options
| author | timh52280 <> | 2013-07-25 18:02:41 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-25 18:03:42 +0200 |
| commit | 6a6e9a225c10e63bd2bf7610658a0d9bb9c59ca9 (patch) | |
| tree | 9dcfb2554b08a91d23cab89c91a2dcfe3ef38359 /src/server/scripts | |
| parent | 6dc1f242e4bfc82dd02584b798b283495e232190 (diff) | |
Core/Spell: Fix rogue "Glyph of Preparation"
Closes #10359
Signed-off-by: Vincent-Michael <Vincent_Michael@gmx.de>
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index fd29ab8b1e3..d4e627b7cc1 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -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->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) + continue; + + 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; } } |
