mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/AI: Fix reset and interruption of non melee spells
This commit is contained in:
@@ -205,6 +205,11 @@ void CreatureAI::JustAppeared()
|
||||
}
|
||||
}
|
||||
|
||||
void CreatureAI::JustReachedHome()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
void CreatureAI::JustEnteredCombat(Unit* who)
|
||||
{
|
||||
if (!IsEngaged() && !me->CanHaveThreatList())
|
||||
@@ -234,7 +239,6 @@ void CreatureAI::EnterEvadeMode(EvadeReason why)
|
||||
}
|
||||
}
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
bool CreatureAI::UpdateVictim()
|
||||
@@ -276,6 +280,7 @@ void CreatureAI::EngagementStart(Unit* who)
|
||||
}
|
||||
_isEngaged = true;
|
||||
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->AtEngage(who);
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
void OnCharmed(bool isNew) override;
|
||||
|
||||
// Called at reaching home after evade
|
||||
virtual void JustReachedHome() { }
|
||||
virtual void JustReachedHome();
|
||||
|
||||
void DoZoneInCombat(Creature* creature = nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user