From 7260fcb5c63ff1de397100cd46eda50ffc8b3025 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 14 Oct 2021 11:54:33 +0200 Subject: Core/Conditions: Fixed conditions not working for area auras (cherry picked from commit 8693ee56955ce4d31e9e69f3971f52e250c1280c) --- src/server/game/Conditions/ConditionMgr.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index d2cc4e94848..796080a020f 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -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 -- cgit v1.2.3