Core/Auras: backout r2bf34fd7ac and add alternative - not spell specific sollution for the problem.
--HG-- branch : trunk
This commit is contained in:
@@ -2745,19 +2745,6 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
unitList.sort(Trinity::PowerPctOrderPred((Powers)power));
|
||||
unitList.resize(maxSize);
|
||||
}
|
||||
|
||||
// Replenishment: refresh existing auras
|
||||
if (m_spellInfo->Id == 57669)
|
||||
for (std::list<Unit *>::iterator itr = unitList.begin(); itr != unitList.end();)
|
||||
if (AuraEffect *aurEff = (*itr)->GetAuraEffect(SPELL_AURA_PERIODIC_ENERGIZE, SPELLFAMILY_GENERIC, 3184, EFFECT_0))
|
||||
{
|
||||
aurEff->SetAmount((*itr)->GetMaxPower(POWER_MANA) * 25 / 10000);
|
||||
aurEff->GetBase()->RefreshDuration();
|
||||
|
||||
itr = unitList.erase(itr);
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3157,6 +3157,9 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
|
||||
case SPELL_AURA_OBS_MOD_POWER:
|
||||
case SPELL_AURA_OBS_MOD_HEALTH:
|
||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE:
|
||||
// periodic auras which target areas are not allowed to stack this way (replenishment for example)
|
||||
if (IsAreaOfEffectSpellEffect(spellInfo_1, i) || IsAreaOfEffectSpellEffect(spellInfo_2, i))
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -403,6 +403,13 @@ inline bool IsAreaOfEffectSpell(SpellEntry const *spellInfo)
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsAreaOfEffectSpellEffect(SpellEntry const *spellInfo, uint8 effIndex)
|
||||
{
|
||||
if (IsAreaEffectTarget[spellInfo->EffectImplicitTargetA[effIndex]] || IsAreaEffectTarget[spellInfo->EffectImplicitTargetB[effIndex]])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool IsFarUnitTargetEffect(uint32 effect)
|
||||
{
|
||||
return (effect == SPELL_EFFECT_SUMMON_PLAYER);
|
||||
|
||||
@@ -567,6 +567,7 @@ bool AuraScript::_IsDefaultActionPrevented()
|
||||
case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
|
||||
return m_defaultActionPrevented;
|
||||
default:
|
||||
ASSERT(false && "m_defaultActionPrevented has incorrect value, or AuraScript::_IsDefaultActionPrevented is called in a wrong place");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user