mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/AI: No longer do strange things when told to enter evade mode while there's no need to do so, typically by terrible legacy code.
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
#ifndef TRINITY_FUZZYFIND_H
|
||||
#define TRINITY_FUZZYFIND_H
|
||||
|
||||
#include "advstd.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
namespace Containers
|
||||
|
||||
@@ -285,7 +285,7 @@ void CreatureAI::EngagementOver()
|
||||
|
||||
bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
|
||||
{
|
||||
if (me->IsInEvadeMode())
|
||||
if (!IsEngaged())
|
||||
return false;
|
||||
|
||||
if (!me->IsAlive())
|
||||
|
||||
@@ -250,10 +250,7 @@ void ObjectGridStoper::Visit(CreatureMapType &m)
|
||||
{
|
||||
iter->GetSource()->RemoveAllDynObjects();
|
||||
if (iter->GetSource()->IsInCombat())
|
||||
{
|
||||
iter->GetSource()->CombatStop();
|
||||
iter->GetSource()->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user