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:
Treeston
2019-07-29 00:13:40 +02:00
parent 48091257d3
commit 163f44c1b0
3 changed files with 5 additions and 4 deletions

View File

@@ -18,6 +18,10 @@
#ifndef TRINITY_FUZZYFIND_H
#define TRINITY_FUZZYFIND_H
#include "advstd.h"
#include <map>
#include <string>
namespace Trinity
{
namespace Containers

View File

@@ -285,7 +285,7 @@ void CreatureAI::EngagementOver()
bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
{
if (me->IsInEvadeMode())
if (!IsEngaged())
return false;
if (!me->IsAlive())

View File

@@ -250,10 +250,7 @@ void ObjectGridStoper::Visit(CreatureMapType &m)
{
iter->GetSource()->RemoveAllDynObjects();
if (iter->GetSource()->IsInCombat())
{
iter->GetSource()->CombatStop();
iter->GetSource()->AI()->EnterEvadeMode();
}
}
}