diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-10-14 11:54:33 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-14 11:54:33 +0200 |
commit | 8693ee56955ce4d31e9e69f3971f52e250c1280c (patch) | |
tree | 8f819285f8fdac482fa14199c628e38665d4d94a | |
parent | 7051aab4219765e0c9faac0ce7bde0160451712a (diff) |
Core/Conditions: Fixed conditions not working for area auras
-rw-r--r-- | src/server/game/Conditions/ConditionMgr.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 408cd0092a4..6df877d8895 100644 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -1728,7 +1728,21 @@ 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: + 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 |