mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-03-07 17:40:28 +00:00
@@ -7,8 +7,6 @@ bool AttackErekemAction::Execute(Event event)
|
||||
{
|
||||
// Focus boss first, adds after
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "erekem");
|
||||
if (!boss) { return false; }
|
||||
|
||||
if (AI_VALUE(Unit*, "current target") != boss)
|
||||
{
|
||||
return Attack(boss);
|
||||
@@ -21,8 +19,6 @@ bool AttackIchorGlobuleAction::Execute(Event event)
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ichoron");
|
||||
if (!boss) { return false; }
|
||||
|
||||
Unit* currentTarget = AI_VALUE(Unit*, "current target");
|
||||
|
||||
// Tank prioritise boss if it's up
|
||||
if (botAI->IsTank(bot) && !boss->HasAura(SPELL_DRAINED))
|
||||
{
|
||||
@@ -42,6 +38,7 @@ bool AttackIchorGlobuleAction::Execute(Event event)
|
||||
Unit* unit = botAI->GetUnit(*i);
|
||||
if (unit && unit->GetEntry() == NPC_ICHOR_GLOBULE)
|
||||
{
|
||||
Unit* currentTarget = AI_VALUE(Unit*, "current target");
|
||||
// Check IDs here, NOT Unit* pointers:
|
||||
// Don't keep swapping between sentries.
|
||||
// If we're already attacking one, don't retarget another
|
||||
@@ -53,7 +50,7 @@ bool AttackIchorGlobuleAction::Execute(Event event)
|
||||
}
|
||||
}
|
||||
// No ichor globules left alive, fall back to targeting boss
|
||||
if (currentTarget != boss)
|
||||
if (AI_VALUE(Unit*, "current target") != boss)
|
||||
{
|
||||
return Attack(boss);
|
||||
}
|
||||
@@ -65,8 +62,6 @@ bool AttackVoidSentryAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "zuramat the obliterator");
|
||||
if (!boss) { return false; }
|
||||
|
||||
Unit* currentTarget = AI_VALUE(Unit*, "current target");
|
||||
|
||||
// Target is not findable from threat table using AI_VALUE2(),
|
||||
// therefore need to search manually for the unit name
|
||||
@@ -78,6 +73,7 @@ bool AttackVoidSentryAction::Execute(Event event)
|
||||
Unit* unit = botAI->GetUnit(*i);
|
||||
if (unit && unit->GetEntry() == NPC_VOID_SENTRY)
|
||||
{
|
||||
Unit* currentTarget = AI_VALUE(Unit*, "current target");
|
||||
// Check IDs here, NOT Unit* pointers:
|
||||
// Don't keep swapping between sentries.
|
||||
// If we're already attacking one, don't retarget another
|
||||
@@ -89,7 +85,7 @@ bool AttackVoidSentryAction::Execute(Event event)
|
||||
}
|
||||
}
|
||||
// No void sentries left alive, fall back to targeting boss
|
||||
if (currentTarget != boss)
|
||||
if (AI_VALUE(Unit*, "current target") != boss)
|
||||
{
|
||||
return Attack(boss);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user