fix(Core/Spells): Make sure that attacker is always in combat with it… (#12516)
fix(Core/Spells): Make sure that attacker is always in combat with its victim when dealing damage/generating threat done by spells. Fixes #10801
This commit is contained in:
parent
7aea91fcb3
commit
c19d6b74e9
1 changed files with 7 additions and 0 deletions
|
|
@ -1033,7 +1033,14 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
|||
victim->ToCreature()->SetLastDamagedTime(GameTime::GetGameTime().count() + MAX_AGGRO_RESET_TIME);
|
||||
|
||||
if (attacker)
|
||||
{
|
||||
if (spellProto && !victim->IsInCombatWith(attacker))
|
||||
{
|
||||
victim->CombatStart(attacker, !(spellProto->AttributesEx3 & SPELL_ATTR3_SUPRESS_TARGET_PROCS));
|
||||
}
|
||||
|
||||
victim->AddThreat(attacker, float(damage), damageSchoolMask, spellProto);
|
||||
}
|
||||
}
|
||||
else // victim is a player
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue