diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 0489e8b05..b7142c6c5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6917,44 +6917,9 @@ void Aura::PeriodicDummyTick() switch (spell->SpellFamilyName) { case SPELLFAMILY_GENERIC: + { switch (spell->Id) { - // Drink - case 430: - case 431: - case 432: - case 1133: - case 1135: - case 1137: - case 10250: - case 22734: - case 27089: - case 34291: - case 43182: - case 43183: - case 43706: - case 46755: - case 49472: // Drink Coffee - case 57073: - case 61830: - { - if (target->GetTypeId() != TYPEID_PLAYER) - return; - // Search SPELL_AURA_MOD_POWER_REGEN aura for this spell and add bonus - Unit::AuraList const& aura = target->GetAurasByType(SPELL_AURA_MOD_POWER_REGEN); - for(Unit::AuraList::const_iterator i = aura.begin(); i != aura.end(); ++i) - { - if ((*i)->GetId() == GetId()) - { - (*i)->GetModifier()->m_amount = m_modifier.m_amount; - ((Player*)target)->UpdateManaRegen(); - // Disable continue - m_isPeriodic = false; - return; - } - } - return; - } // Forsaken Skills case 7054: { @@ -7184,6 +7149,24 @@ void Aura::PeriodicDummyTick() default: break; } + + // Drink (item drink spells) + if (GetEffIndex() > EFFECT_INDEX_0 && spell->EffectApplyAuraName[GetEffIndex()-1] == SPELL_AURA_MOD_POWER_REGEN) + { + if (target->GetTypeId() != TYPEID_PLAYER) + return; + // Search SPELL_AURA_MOD_POWER_REGEN aura for this spell and add bonus + if (Aura* aura = GetHolder()->GetAuraByEffectIndex(SpellEffectIndex(GetEffIndex() - 1))) + { + aura->GetModifier()->m_amount = m_modifier.m_amount; + ((Player*)target)->UpdateManaRegen(); + // Disable continue + m_isPeriodic = false; + return; + } + return; + } + // Prey on the Weak if (spell->SpellIconID == 2983) { @@ -7200,6 +7183,7 @@ void Aura::PeriodicDummyTick() target->RemoveAurasDueToSpell(58670); } break; + } case SPELLFAMILY_MAGE: { // Mirror Image diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8cce99b5b..714ac1dcf 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10290" + #define REVISION_NR "10291" #endif // __REVISION_NR_H__