HoL updates

This commit is contained in:
Bobblybook
2024-10-18 20:57:48 +11:00
parent f6987a80a5
commit 66b7a3852d
2 changed files with 24 additions and 2 deletions

View File

@@ -19,8 +19,15 @@ bool BjarngrimTargetAction::Execute(Event event)
break;
}
}
Unit* currentTarget = AI_VALUE(Unit*, "current target");
// There are two, we don't want to ping-pong between them if we're attacking one already
if (!target || AI_VALUE(Unit*, "current target") == target)
if (target && currentTarget && currentTarget->GetEntry() == NPC_STORMFORGED_LIEUTENANT)
{
return false;
}
if (AI_VALUE(Unit*, "current target") == target)
{
return false;
}

View File

@@ -19,7 +19,22 @@ float BjarngrimMultiplier::GetValue(Action* action)
}
}
Unit* boss_add = AI_VALUE2(Unit*, "find target", "stormforged lieutenant");
// Detect boss adds this way as sometimes they don't get added to threat table on dps bots,
// and some dps just stand at range and don't engage the boss at all as they can't find the adds
// Unit* boss_add = AI_VALUE2(Unit*, "find target", "stormforged lieutenant");
Unit* boss_add = nullptr;
GuidVector targets = AI_VALUE(GuidVector, "possible targets no los");
for (auto i = targets.begin(); i != targets.end(); ++i)
{
Unit* unit = botAI->GetUnit(*i);
if (unit && unit->GetEntry() == NPC_STORMFORGED_LIEUTENANT)
{
boss_add = unit;
break;
}
}
if (!boss_add || botAI->IsTank(bot)) { return 1.0f; }
if (dynamic_cast<DpsAssistAction*>(action))