feat(Core/AI): convert SelectAggroTarget to enum class (#9893)

This commit is contained in:
Kargatum
2021-12-29 05:13:12 +07:00
committed by GitHub
parent e928d8b67e
commit c81891fc11
236 changed files with 622 additions and 598 deletions

View File

@@ -123,7 +123,7 @@ public:
events.ScheduleEvent(EVENT_ECK_SPIT, 10000);
break;
case EVENT_ECK_SPRING:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 30.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 30.0f, true))
{
me->getThreatMgr().resetAllAggro();
me->AddThreat(target, 500.0f);

View File

@@ -124,7 +124,7 @@ public:
void JustSummoned(Creature* summon) override
{
uint32 despawnTime = 0;
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
{
summon->CastSpell(target, SPELL_STAMPEDE_DMG, true);
despawnTime = (summon->GetDistance(target) / 40.0f * 1000) + 500;
@@ -190,7 +190,7 @@ public:
events.ScheduleEvent(EVENT_ENRAGE, 20000);
break;
case EVENT_STOMP:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
me->CastSpell(target, SPELL_STOMP, false);
events.ScheduleEvent(EVENT_STOMP, 20000);
break;
@@ -204,7 +204,7 @@ public:
return;
}
events.ScheduleEvent(EVENT_IMPALING_CHARGE, 21000);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
{
me->CastSpell(target, SPELL_IMPALING_CHARGE, false);
impaledList.insert(target->GetGUID());