diff options
author | QAston <none@none> | 2009-08-13 02:23:50 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-13 02:23:50 +0200 |
commit | 46f4159c5ec165345859beac8ceca7581374aa6b (patch) | |
tree | fb5e99b28854449d1e82e881b4f1a81048b5bb69 /src | |
parent | 9ef950f9beeff1e0be793a4161b2fb54a33e78bf (diff) |
*Fix glyphs increasing duration of buff when it's selfcasted.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 5 | ||||
-rw-r--r-- | src/game/Unit.cpp | 30 |
2 files changed, 30 insertions, 5 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8cd7ca66226..de7ecaa8962 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -396,11 +396,6 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1), m_upd if(!m_permanent && modOwner) { - // Glyph of Thorns - if (m_target == caster && m_spellProto->SpellFamilyName==SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x100) - if (AuraEffect * aurEff = m_target->GetAuraEffect(57862, 0)) - m_maxduration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS; - modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, m_maxduration); // Get zero duration aura after - need set m_maxduration > 0 for apply/remove aura work if (m_maxduration<=0) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 21474dfb94a..364fa8a741f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11772,6 +11772,36 @@ int32 Unit::ModSpellDuration(SpellEntry const* spellProto, Unit const* target, i } //else positive mods here, there are no currently //when there will be, change GetTotalAuraModifierByMiscValue to GetTotalPositiveAuraModifierByMiscValue + + // Glyphs which increase duration of selfcasted buffs + if (target == this) + { + switch(spellProto->SpellFamilyName) + { + case SPELLFAMILY_DRUID: + if (spellProto->SpellFamilyFlags[0] & 0x100) + { + // Glyph of Thorns + if (AuraEffect * aurEff = GetAuraEffect(57862, 0)) + duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS; + } + break; + case SPELLFAMILY_PALADIN: + if (spellProto->SpellFamilyFlags[0] & 0x00000002) + { + // Glyph of Blessing of Might + if (AuraEffect * aurEff = GetAuraEffect(57958, 0)) + duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS; + } + else if (spellProto->SpellFamilyFlags[0] & 0x00010000) + { + // Glyph of Blessing of Wisdom + if (AuraEffect * aurEff = GetAuraEffect(57979, 0)) + duration += aurEff->GetAmount() * MINUTE * IN_MILISECONDS; + } + break; + } + } return duration>0 ? duration : 0; } |