Skip to content

Commit

Permalink
UnitAI: Fix instant aoe spells changing target in crosshairs
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Nov 8, 2021
1 parent c4395a5 commit c908d75
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/game/AI/BaseAI/UnitAI.cpp
Expand Up @@ -335,6 +335,17 @@ void UnitAI::OnSpellCastStateChange(Spell const* spell, bool state, WorldObject*
{
case TARGET_ENUM_UNITS_ENEMY_IN_CONE_24: // ignores everything and keeps turning
return;
case TARGET_LOCATION_CASTER_SRC:
case TARGET_LOCATION_CASTER_DEST:
switch (spellInfo->EffectImplicitTargetB[EFFECT_INDEX_0])
{
case TARGET_ENUM_UNITS_ENEMY_AOE_AT_SRC_LOC: // ignores everything and keeps turning if instant
case TARGET_ENUM_UNITS_ENEMY_AOE_AT_DEST_LOC:
if (!spell->GetCastTime())
return;
break;
}
break;
case TARGET_UNIT_FRIEND:
case TARGET_UNIT_ENEMY: forceTarget = true; break;
case TARGET_UNIT_SCRIPT_NEAR_CASTER:
Expand Down

0 comments on commit c908d75

Please sign in to comment.