mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-04 03:13:48 +00:00
Dungeon botAI bugfixes
- Utgarde Keep (Keleseth): Bots continue combat correctly after killing a frost tomb - Utgarde Keep (Dalronn & Skarvald): Bots continue combat correctly after killing Dalronn - Utgarde Keep (Ingvar): Tank correctly avoids Dark Smash in second phase - Oculus (Drake combat): Bots more consistently attack the drakes in the air when flying around - Halls of Lightning (Bjarngrim): Bots no longer acquire priority targets until in combat
This commit is contained in:
@@ -161,18 +161,17 @@ bool DrakeAttackAction::Execute(Event event)
|
||||
|
||||
if (!target)
|
||||
{
|
||||
GuidVector attackers = AI_VALUE(GuidVector, "attackers");
|
||||
for (auto& attacker : attackers)
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "possible targets");
|
||||
for (auto& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(attacker);
|
||||
if (!unit) { continue; }
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !unit->IsInCombat()) { continue; }
|
||||
|
||||
SET_AI_VALUE(Unit*, "current target", unit);
|
||||
target = unit;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Check this again to see if a target was assigned
|
||||
if (!target) { return false; }
|
||||
|
||||
switch (vehicleBase->GetEntry())
|
||||
|
||||
@@ -49,18 +49,8 @@ bool GroupFlyingTrigger::IsActive()
|
||||
|
||||
bool DrakeCombatTrigger::IsActive()
|
||||
{
|
||||
Unit* vehicleBase = bot->GetVehicleBase();
|
||||
if (!vehicleBase) { return false; }
|
||||
|
||||
GuidVector attackers = AI_VALUE(GuidVector, "attackers");
|
||||
for (auto& attacker : attackers)
|
||||
{
|
||||
Unit* target = botAI->GetUnit(attacker);
|
||||
if (!target) { continue; }
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
GuidVector targets = AI_VALUE(GuidVector, "possible targets");
|
||||
return !targets.empty();
|
||||
}
|
||||
|
||||
bool VarosCloudstriderTrigger::IsActive()
|
||||
@@ -76,7 +66,7 @@ bool UromArcaneExplosionTrigger::IsActive()
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "mage-lord urom");
|
||||
if (!boss) { return false; }
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION);
|
||||
return bool(boss->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION));
|
||||
}
|
||||
|
||||
bool UromTimeBombTrigger::IsActive()
|
||||
|
||||
Reference in New Issue
Block a user