fix(Core/Creatures): Spells casted by player should tap the creature … (#14725)
…only if in combat with it.
This commit is contained in:
@@ -2918,6 +2918,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
|||||||
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
m_caster->CombatStart(effectUnit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
||||||
|
|
||||||
// Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
|
// Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
|
||||||
|
if (effectUnit->IsInCombatWith(m_caster))
|
||||||
|
{
|
||||||
if (Creature* creature = effectUnit->ToCreature())
|
if (Creature* creature = effectUnit->ToCreature())
|
||||||
{
|
{
|
||||||
if (!creature->hasLootRecipient() && m_caster->IsPlayer())
|
if (!creature->hasLootRecipient() && m_caster->IsPlayer())
|
||||||
@@ -2925,6 +2927,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
|||||||
creature->SetLootRecipient(m_caster);
|
creature->SetLootRecipient(m_caster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Unsure if there are more spells that are not supposed to stop enemy from
|
// Unsure if there are more spells that are not supposed to stop enemy from
|
||||||
// regenerating HP from food, so for now it stays as an ID.
|
// regenerating HP from food, so for now it stays as an ID.
|
||||||
|
|||||||
Reference in New Issue
Block a user