mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spells: IsAllowingDeadTargets now checks effects targets as well (#25914)
This commit is contained in:
@@ -1549,7 +1549,19 @@ bool SpellInfo::IsRequiringDeadTarget() const
|
||||
|
||||
bool SpellInfo::IsAllowingDeadTarget() const
|
||||
{
|
||||
return HasAttribute(SPELL_ATTR2_CAN_TARGET_DEAD) || Targets & (TARGET_FLAG_CORPSE_ALLY | TARGET_FLAG_CORPSE_ENEMY | TARGET_FLAG_UNIT_DEAD);
|
||||
if (HasAttribute(SPELL_ATTR2_CAN_TARGET_DEAD) || Targets & (TARGET_FLAG_CORPSE_ALLY | TARGET_FLAG_CORPSE_ENEMY | TARGET_FLAG_UNIT_DEAD))
|
||||
return true;
|
||||
|
||||
for (SpellEffectInfo const* effect : _effects)
|
||||
{
|
||||
if (!effect)
|
||||
continue;
|
||||
|
||||
if (effect->TargetA.GetObjectType() == TARGET_OBJECT_TYPE_CORPSE || effect->TargetB.GetObjectType() == TARGET_OBJECT_TYPE_CORPSE)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SpellInfo::IsGroupBuff() const
|
||||
|
||||
Reference in New Issue
Block a user