mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Auras: Changed aura dot stacking rule to not ignore aura type of "existingAura"
This commit is contained in:
@@ -1919,30 +1919,37 @@ bool Aura::CanStackWith(Aura const* existingAura) const
|
||||
return true;
|
||||
|
||||
// check same periodic auras
|
||||
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
auto hasPeriodicNonAreaEffect = [](SpellInfo const* spellInfo)
|
||||
{
|
||||
switch (m_spellInfo->Effects[i].ApplyAuraName)
|
||||
for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
|
||||
{
|
||||
// DOT or HOT from different casters will stack
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_DUMMY:
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||
case SPELL_AURA_PERIODIC_LEECH:
|
||||
case SPELL_AURA_POWER_BURN:
|
||||
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 (m_spellInfo->Effects[i].IsTargetingArea() || existingSpellInfo->Effects[i].IsTargetingArea())
|
||||
switch (spellEffectInfo.ApplyAuraName)
|
||||
{
|
||||
// DOT or HOT from different casters will stack
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_DUMMY:
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||
case SPELL_AURA_PERIODIC_LEECH:
|
||||
case SPELL_AURA_POWER_BURN:
|
||||
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 (spellEffectInfo.IsTargetingArea())
|
||||
return false;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
if (hasPeriodicNonAreaEffect(m_spellInfo) && hasPeriodicNonAreaEffect(existingSpellInfo))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (HasEffectType(SPELL_AURA_CONTROL_VEHICLE) && existingAura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE))
|
||||
|
||||
Reference in New Issue
Block a user