mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Small code cleanup and partial merge with dev branch Author: tomrus88
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user