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.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 48555e6a0a4..742fc30fd69 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4115,7 +4115,6 @@ void Spell::EffectSummonPet(uint32 i)
owner->GetClosePoint(x, y, z, owner->GetObjectSize());
Pet* pet = owner->SummonPet(petentry, x, y, z, owner->GetOrientation(), SUMMON_PET, 0);
if(!pet)
-
return;
if(m_caster->GetTypeId() == TYPEID_UNIT)
@@ -5410,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])
{
@@ -5430,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);
}
}