mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Conditions: Fixed conditions not working for area auras
(cherry picked from commit 8693ee5695)
This commit is contained in:
@@ -1882,7 +1882,24 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond) const
|
||||
break;
|
||||
}
|
||||
|
||||
TC_LOG_ERROR("sql.sql", "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_, __CHAIN__ for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(spellEffectInfo.EffectIndex));
|
||||
switch (spellEffectInfo.Effect)
|
||||
{
|
||||
case SPELL_EFFECT_PERSISTENT_AREA_AURA:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_FRIEND:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_ENEMY:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PET:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_OWNER:
|
||||
case SPELL_EFFECT_APPLY_AURA_ON_PET:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_SUMMONS:
|
||||
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY_NONRANDOM:
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
TC_LOG_ERROR("sql.sql", "SourceEntry %u SourceGroup %u in `condition` table - spell %u does not have implicit targets of types: _AREA_, _CONE_, _NEARBY_, __CHAIN__ or is not SPELL_EFFECT_PERSISTENT_AREA_AURA or SPELL_EFFECT_APPLY_AREA_AURA_* for effect %u, SourceGroup needs correction, ignoring.", cond->SourceEntry, origGroup, cond->SourceEntry, uint32(spellEffectInfo.EffectIndex));
|
||||
cond->SourceGroup &= ~(1 << spellEffectInfo.EffectIndex);
|
||||
}
|
||||
// all effects were removed, no need to add the condition at all
|
||||
|
||||
Reference in New Issue
Block a user