[11035] Implement some spell duration glyphs work.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Darkknight900 2011-01-18 15:56:04 +03:00 committed by VladimirMangos
parent 97756e95a2
commit d12fa5b8ac
2 changed files with 35 additions and 1 deletions

View file

@ -8821,6 +8821,40 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
if (duration < 0) duration = 0;
}
if (duration > 0 && unitPlayer && target == this)
{
switch(spellProto->SpellFamilyName)
{
case SPELLFAMILY_DRUID:
// Thorns
if (spellProto->SpellIconID == 53 && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000100)))
{
// Glyph of Thorns
if (Aura *aur = GetAura(57862, EFFECT_INDEX_0))
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
}
break;
case SPELLFAMILY_PALADIN:
// Blessing of Might
if (spellProto->SpellIconID == 298 && spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000002))
{
// Glyph of Blessing of Might
if (Aura *aur = GetAura(57958, EFFECT_INDEX_0))
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
}
// Blessing of Wisdom
else if (spellProto->SpellIconID == 306 && spellProto->SpellFamilyFlags & UI64LIT(0x0000000000010000))
{
// Glyph of Blessing of Wisdom
if (Aura *aur = GetAura(57979, EFFECT_INDEX_0))
duration += aur->GetModifier()->m_amount * MINUTE * IN_MILLISECONDS;
}
break;
default:
break;
}
}
return duration;
}