aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 2cb5b1db08d..742fc30fd69 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5409,16 +5409,6 @@ void Spell::EffectApplyGlyph(uint32 i)
Player *player = (Player*)m_caster;
- // remove old glyph
- if(uint32 oldglyph = player->GetGlyph(m_glyphIndex))
- {
- if(GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
- {
- player->RemoveAurasDueToSpell(old_gp->SpellId);
- player->SetGlyph(m_glyphIndex, 0);
- }
- }
-
// apply new one
if(uint32 glyph = m_spellInfo->EffectMiscValue[i])
{
@@ -5429,7 +5419,17 @@ void Spell::EffectApplyGlyph(uint32 i)
if(gp->TypeFlags != gs->TypeFlags)
{
SendCastResult(SPELL_FAILED_INVALID_GLYPH);
- return; // glyph slot missmatch
+ return; // glyph slot mismatch
+ }
+ }
+
+ // remove old glyph
+ if(uint32 oldglyph = player->GetGlyph(m_glyphIndex))
+ {
+ if(GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
+ {
+ player->RemoveAurasDueToSpell(old_gp->SpellId);
+ player->SetGlyph(m_glyphIndex, 0);
}
}