Small code cleanup and partial merge with dev branch Author: tomrus88

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-21 14:53:38 -06:00
parent 3b09489f88
commit de849cc508
18 changed files with 374 additions and 470 deletions

View File

@@ -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);
}
}