Skip to content

Commit

Permalink
[11035] Implement some spell duration glyphs work.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Darkknight900 authored and VladimirMangos committed Jan 18, 2011
1 parent 55410ee commit 58324cb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions src/game/Unit.cpp
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11034"
#define REVISION_NR "11035"
#endif // __REVISION_NR_H__

0 comments on commit 58324cb

Please sign in to comment.