mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-18 01:24:35 +00:00
Removed unnecessary spaces
This commit is contained in:
@@ -47,7 +47,7 @@ class DungeonStrategyContext : public NamedObjectContext<Strategy>
|
||||
|
||||
// Burning Crusade
|
||||
// ...
|
||||
|
||||
|
||||
// Wrath of the Lich King
|
||||
creators["wotlk-uk"] = &DungeonStrategyContext::wotlk_uk; // Utgarde Keep
|
||||
creators["wotlk-nex"] = &DungeonStrategyContext::wotlk_nex; // The Nexus
|
||||
@@ -84,8 +84,8 @@ class DungeonStrategyContext : public NamedObjectContext<Strategy>
|
||||
static Strategy* wotlk_toc(PlayerbotAI* botAI) { return new WotlkDungeonToCStrategy(botAI); }
|
||||
// NYI from here down
|
||||
static Strategy* wotlk_hor(PlayerbotAI* botAI) { return new WotlkDungeonUKStrategy(botAI); }
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ bool AttackWebWrapAction::Execute(Event event)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return Attack(webWrap);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
float KrikthirMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (!botAI->IsDps(bot)) { return 1.0f; }
|
||||
|
||||
|
||||
// Target is not findable from threat table using AI_VALUE2(),
|
||||
// therefore need to search manually for the unit name
|
||||
Unit* boss = nullptr;
|
||||
|
||||
@@ -11,7 +11,7 @@ void WotlkDungeonANStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("attack web wrap", ACTION_RAID + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("krik'thir watchers",
|
||||
NextAction::array(0, new NextAction("krik'thir priority", ACTION_RAID + 4), nullptr)));
|
||||
|
||||
|
||||
// Hadronox
|
||||
// The core AC triggers are very buggy with this boss, but default strat seems to play correctly
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "AzjolNerubTriggers.h"
|
||||
|
||||
class WotlkDungeonANTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonANTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonANTriggerContext()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
bool KrikthirWebWrapTrigger::IsActive()
|
||||
{
|
||||
if (!botAI->IsDps(bot)) { return false; }
|
||||
|
||||
|
||||
// Target is not findable from threat table using AI_VALUE2(),
|
||||
// therefore need to search manually for the unit name
|
||||
GuidVector targets = AI_VALUE(GuidVector, "possible targets no los");
|
||||
@@ -51,7 +51,7 @@ bool KrikthirWatchersTrigger::IsActive()
|
||||
// for (auto i = triggers.begin(); i != triggers.end(); i++)
|
||||
// {
|
||||
// Unit* unit = botAI->GetUnit(*i);
|
||||
|
||||
|
||||
// if (unit)
|
||||
// {
|
||||
// bot->Yell("TRIGGER="+unit->GetName(), LANG_UNIVERSAL);
|
||||
@@ -64,6 +64,6 @@ bool AnubarakPoundTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "anub'arak");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_POUND);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ float EpochMultiplier::GetValue(Action* action)
|
||||
if (!boss) { return 1.0f; }
|
||||
|
||||
if (bot->getClass() == CLASS_HUNTER) { return 1.0f; }
|
||||
|
||||
|
||||
if (dynamic_cast<FleeAction*>(action)) { return 0.0f; }
|
||||
|
||||
return 1.0f;
|
||||
|
||||
@@ -10,12 +10,12 @@ void WotlkDungeonCoSStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Salramm the Fleshcrafter
|
||||
triggers.push_back(new TriggerNode("explode ghoul",
|
||||
NextAction::array(0, new NextAction("explode ghoul spread", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
|
||||
// Chrono-Lord Epoch
|
||||
// Not sure if this actually works, I think I've seen him charge melee characters..?
|
||||
triggers.push_back(new TriggerNode("epoch ranged",
|
||||
NextAction::array(0, new NextAction("epoch stack", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
|
||||
// Mal'Ganis
|
||||
|
||||
// Infinite Corruptor (Heroic only)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "CullingOfStratholmeTriggers.h"
|
||||
|
||||
class WotlkDungeonCoSTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonCoSTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonCoSTriggerContext()
|
||||
|
||||
@@ -64,11 +64,11 @@ bool NovosTargetPriorityAction::Execute(Event event)
|
||||
{
|
||||
// TODO: This can be improved, some parts are still buggy.
|
||||
// But it works for now and this fight is very easy
|
||||
|
||||
|
||||
// Designate a dps char to handle the stairs adds.
|
||||
// This is probably better as a melee, so just pick the first
|
||||
// melee dps in the party. If none exist, pick the first ranged.
|
||||
|
||||
|
||||
// TODO: Switch to botAI->Index instead, cleaner
|
||||
Player* stairsDps = nullptr;
|
||||
GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
@@ -76,7 +76,7 @@ bool NovosTargetPriorityAction::Execute(Event event)
|
||||
{
|
||||
Player* groupMember = botAI->GetPlayer(member);
|
||||
if (!groupMember) { continue; }
|
||||
|
||||
|
||||
if (botAI->IsDps(groupMember))
|
||||
{
|
||||
if (botAI->IsMelee(groupMember))
|
||||
@@ -131,7 +131,7 @@ bool NovosTargetPriorityAction::Execute(Event event)
|
||||
{
|
||||
selectedTargets[0] = unit;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (creatureId == NPC_FETID_TROLL_CORPSE)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ float NovosMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "novos the summoner");
|
||||
if (!boss) { return 1.0f; }
|
||||
|
||||
|
||||
if (boss->FindCurrentSpellBySpellId(SPELL_ARCANE_FIELD) && bot->GetTarget())
|
||||
{
|
||||
if (dynamic_cast<DpsAssistAction*>(action)
|
||||
@@ -25,7 +25,7 @@ float NovosMultiplier::GetValue(Action* action)
|
||||
float TharonjaMultiplier::GetValue(Action* action)
|
||||
{
|
||||
if (!bot->HasAura(SPELL_GIFT_OF_THARONJA)) { return 1.0f; }
|
||||
|
||||
|
||||
// Suppress all skills that are not enabled in skeleton form.
|
||||
// Still allow non-ability actions such as movement
|
||||
if (dynamic_cast<CastSpellAction*>(action)
|
||||
|
||||
@@ -7,7 +7,7 @@ void WotlkDungeonDTKStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Trollgore
|
||||
triggers.push_back(new TriggerNode("corpse explode",
|
||||
NextAction::array(0, new NextAction("corpse explode spread", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
|
||||
// Novos the Summoner
|
||||
// TODO: Can be improved - it's a pretty easy fight but complex to program, revisit if needed
|
||||
triggers.push_back(new TriggerNode("arcane field",
|
||||
@@ -16,7 +16,7 @@ void WotlkDungeonDTKStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("novos positioning", ACTION_MOVE + 4), nullptr)));
|
||||
triggers.push_back(new TriggerNode("arcane field",
|
||||
NextAction::array(0, new NextAction("novos target priority", ACTION_NORMAL + 1), nullptr)));
|
||||
|
||||
|
||||
// King Dred
|
||||
// TODO: Fear ward / tremor totem, or general anti-fear strat development
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "DrakTharonKeepTriggers.h"
|
||||
|
||||
class WotlkDungeonDTKTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonDTKTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonDTKTriggerContext()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "SharedDefines.h"
|
||||
|
||||
bool MoveFromBronjahmAction::Execute(Event event)
|
||||
{
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
||||
if (!boss)
|
||||
return false;
|
||||
@@ -46,10 +46,10 @@ bool AttackCorruptedSoulFragmentAction::Execute(Event event)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ bool BronjahmGroupPositionAction::Execute(Event event)
|
||||
// If soul is near boss, flee from boss
|
||||
if (soulToBossDist < 10.0f)
|
||||
return FleePosition(unit->GetPosition(), 13.0f, 1000U);
|
||||
|
||||
|
||||
// If soul exists but none of the above conditions, don't move to tank position yet
|
||||
bot->SetFacingToObject(boss);
|
||||
return true;
|
||||
|
||||
@@ -30,7 +30,7 @@ bool SwitchToSoulFragment::IsActive()
|
||||
if (!activeSoulExists)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BronjahmPositionTrigger::IsActive()
|
||||
|
||||
@@ -15,11 +15,11 @@ void WotlkDungeonGDStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("avoid poison nova", ACTION_RAID + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("snake wrap",
|
||||
NextAction::array(0, new NextAction("attack snake wrap", ACTION_RAID + 4), nullptr)));
|
||||
|
||||
|
||||
// Gal'darah
|
||||
triggers.push_back(new TriggerNode("whirling slash",
|
||||
NextAction::array(0, new NextAction("avoid whirling slash", ACTION_RAID + 5), nullptr)));
|
||||
|
||||
|
||||
// Eck the Ferocious (Heroic only)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "GundrakTriggers.h"
|
||||
|
||||
class WotlkDungeonGDTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonGDTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonGDTriggerContext()
|
||||
|
||||
@@ -7,7 +7,7 @@ bool SladranPoisonNovaTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "slad'ran");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return bool(boss->FindCurrentSpellBySpellId(SPELL_POISON_NOVA));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ enum GundrakIDs
|
||||
SPELL_POISON_NOVA_N = 55081,
|
||||
SPELL_POISON_NOVA_H = 59842,
|
||||
NPC_SNAKE_WRAP = 29742,
|
||||
|
||||
|
||||
// Gal'darah
|
||||
SPELL_WHIRLING_SLASH_N = 55250,
|
||||
SPELL_WHIRLING_SLASH_H = 59824,
|
||||
|
||||
@@ -59,7 +59,7 @@ bool VolkhanTargetAction::Execute(Event event)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return Attack(boss);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ bool LokenStackAction::Execute(Event event)
|
||||
// else
|
||||
return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss), maxMovement));
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ float BjarngrimMultiplier::GetValue(Action* action)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ float VolkhanMultiplier::GetValue(Action* action)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ void WotlkDungeonHoLStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Volkhan
|
||||
triggers.push_back(new TriggerNode("volkhan",
|
||||
NextAction::array(0, new NextAction("volkhan target", ACTION_RAID + 5), nullptr)));
|
||||
|
||||
|
||||
// Ionar
|
||||
triggers.push_back(new TriggerNode("ionar disperse",
|
||||
NextAction::array(0, new NextAction("disperse position", ACTION_MOVE + 5), nullptr)));
|
||||
@@ -24,7 +24,7 @@ void WotlkDungeonHoLStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// TODO: Targeted player can dodge the ball, but a single player soaking it isn't too bad to heal
|
||||
triggers.push_back(new TriggerNode("ball lightning",
|
||||
NextAction::array(0, new NextAction("ball lightning spread", ACTION_MOVE + 2), nullptr)));
|
||||
|
||||
|
||||
// Loken
|
||||
triggers.push_back(new TriggerNode("lightning nova",
|
||||
NextAction::array(0, new NextAction("avoid lightning nova", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "HallsOfLightningTriggers.h"
|
||||
|
||||
class WotlkDungeonHoLTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonHoLTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonHoLTriggerContext()
|
||||
|
||||
@@ -27,7 +27,7 @@ bool BjarngrimWhirlwindTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "general bjarngrim");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_WHIRLWIND_BJARNGRIM);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ bool IonarBallLightningTrigger::IsActive()
|
||||
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ionar");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_BALL_LIGHTNING);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ bool IonarTankAggroTrigger::IsActive()
|
||||
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ionar");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return AI_VALUE2(bool, "has aggro", "current target");
|
||||
}
|
||||
|
||||
@@ -88,6 +88,6 @@ bool LokenLightningNovaTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "loken");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_LIGHTNING_NOVA);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ bool ShatterSpreadAction::Execute(Event event)
|
||||
|
||||
float radius = 40.0f;
|
||||
Unit* closestMember = nullptr;
|
||||
|
||||
|
||||
GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
for (auto& member : members)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ bool ShatterSpreadAction::Execute(Event event)
|
||||
// return MoveAway(closestMember, radius - bot->GetExactDist2d(closestMember));
|
||||
return MoveAway(closestMember, 5.0f);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ float KrystallusMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "krystallus");
|
||||
if (!boss) { return 1.0f; }
|
||||
|
||||
|
||||
// Check both of these... the spell is applied first, debuff later.
|
||||
// Neither is active for the full duration so we need to trigger off both
|
||||
if (bot->HasAura(SPELL_GROUND_SLAM) || bot->HasAura(DEBUFF_GROUND_SLAM))
|
||||
|
||||
@@ -11,7 +11,7 @@ void WotlkDungeonHoSStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// TODO: I think bots need to dismiss pets on this, or they nuke players they are standing close to
|
||||
triggers.push_back(new TriggerNode("ground slam",
|
||||
NextAction::array(0, new NextAction("shatter spread", ACTION_RAID + 5), nullptr)));
|
||||
|
||||
|
||||
// Tribunal of Ages
|
||||
// Seems fine, maybe add focus targeting strat if needed on heroic.
|
||||
// Main issue is dps will immediately rambo in and sometimes die before tank gets aggro,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "HallsOfStoneTriggers.h"
|
||||
|
||||
class WotlkDungeonHoSTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonHoSTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonHoSTriggerContext()
|
||||
|
||||
@@ -7,7 +7,7 @@ bool KrystallusGroundSlamTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "krystallus");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
// Check both of these... the spell is applied first, debuff later.
|
||||
// Neither is active for the full duration so we need to trigger off both
|
||||
return bot->HasAura(SPELL_GROUND_SLAM) || bot->HasAura(DEBUFF_GROUND_SLAM);
|
||||
@@ -17,6 +17,6 @@ bool SjonnirLightningRingTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "sjonnir the ironshaper");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_LIGHTNING_RING);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ bool MoveFromWhirlwindAction::Execute(Event event)
|
||||
}
|
||||
|
||||
float bossDistance = bot->GetExactDist2d(boss->GetPosition());
|
||||
|
||||
|
||||
// Check if the bot is already at a safe distance
|
||||
if (bossDistance > targetDist)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ bool DodgeSpikesAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ormorok the tree-shaper");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return Move(bot->GetAngle(boss), bot->GetExactDist2d(boss) - 0.3f);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ float FactionCommanderMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = nullptr;
|
||||
uint8 faction = bot->GetTeamId();
|
||||
|
||||
|
||||
switch (bot->GetMap()->GetDifficulty())
|
||||
{
|
||||
case DUNGEON_DIFFICULTY_NORMAL:
|
||||
@@ -78,7 +78,7 @@ float OrmorokMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ormorok the tree-shaper");
|
||||
if (!boss) { return 1.0f; }
|
||||
|
||||
|
||||
// These are used for auto ranged repositioning, need to suppress so ranged dps don't ping-pong
|
||||
if (dynamic_cast<FleeAction*>(action))
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ void WotlkDungeonNexStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
triggers.push_back(new TriggerNode("faction commander whirlwind",
|
||||
NextAction::array(0, new NextAction("move from whirlwind", ACTION_MOVE + 5), nullptr)));
|
||||
// TODO: Handle fear? (tremor totems, fear ward etc.)
|
||||
|
||||
|
||||
// Grand Magus Telestra
|
||||
triggers.push_back(new TriggerNode("telestra firebomb",
|
||||
NextAction::array(0, new NextAction("firebomb spread", ACTION_MOVE + 5), nullptr)));
|
||||
@@ -21,7 +21,7 @@ void WotlkDungeonNexStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Anomalus
|
||||
triggers.push_back(new TriggerNode("chaotic rift",
|
||||
NextAction::array(0, new NextAction("chaotic rift target", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Ormorok the Tree-Shaper
|
||||
// Tank trigger to stack inside boss. Can also add return action to prevent boss repositioning
|
||||
// if it becomes too much of a problem. He usually dies before he's up against a wall though
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "NexusTriggers.h"
|
||||
|
||||
class WotlkDungeonNexTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonNexTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonNexTriggerContext()
|
||||
|
||||
@@ -7,7 +7,7 @@ bool FactionCommanderWhirlwindTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = nullptr;
|
||||
uint8 faction = bot->GetTeamId();
|
||||
|
||||
|
||||
switch (bot->GetMap()->GetDifficulty())
|
||||
{
|
||||
case DUNGEON_DIFFICULTY_NORMAL:
|
||||
|
||||
@@ -327,7 +327,7 @@ bool AvoidArcaneExplosionAction::Execute(Event event)
|
||||
}
|
||||
|
||||
if (!closestPos) { return false; }
|
||||
|
||||
|
||||
return MoveNear(bot->GetMapId(), closestPos->GetPositionX(), closestPos->GetPositionY(), closestPos->GetPositionZ(), 2.0f, MovementPriority::MOVEMENT_COMBAT);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ float MountingDrakeMultiplier::GetValue(Action* action)
|
||||
// If we suppress everything, they seem to mount properly. A bit of a ham-fisted solution but it works
|
||||
Player* master = botAI->GetMaster();
|
||||
if (!master) { return 1.0f; }
|
||||
|
||||
|
||||
if (bot->GetMapId() != OCULUS_MAP_ID || !master->GetVehicleBase() || bot->GetVehicleBase()) { return 1.0f; }
|
||||
|
||||
if (!dynamic_cast<MountDrakeAction*>(action))
|
||||
|
||||
@@ -8,7 +8,7 @@ void WotlkDungeonOccStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// TODO: May need work, TBA.
|
||||
triggers.push_back(new TriggerNode("unstable sphere",
|
||||
NextAction::array(0, new NextAction("avoid unstable sphere", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
|
||||
// DRAKES
|
||||
triggers.push_back(new TriggerNode("drake mount",
|
||||
NextAction::array(0, new NextAction("mount drake", ACTION_RAID + 5), nullptr)));
|
||||
@@ -29,7 +29,7 @@ void WotlkDungeonOccStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("avoid arcane explosion", ACTION_MOVE + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("time bomb",
|
||||
NextAction::array(0, new NextAction("time bomb spread", ACTION_MOVE + 4), nullptr)));
|
||||
|
||||
|
||||
// Ley-Guardian Eregos
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "OculusTriggers.h"
|
||||
|
||||
class WotlkDungeonOccTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonOccTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonOccTriggerContext()
|
||||
|
||||
@@ -27,7 +27,7 @@ bool DrakeMountTrigger::IsActive()
|
||||
{
|
||||
Player* master = botAI->GetMaster();
|
||||
if (!master) { return false; }
|
||||
|
||||
|
||||
return master->GetVehicleBase() && !bot->GetVehicleBase();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ bool UromArcaneExplosionTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "mage-lord urom");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
return bool(boss->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION));
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ float JedogaShadowseekerMultiplier::GetValue(Action* action)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (volunteer)
|
||||
{
|
||||
if (dynamic_cast<DpsAssistAction*>(action))
|
||||
|
||||
@@ -7,7 +7,7 @@ void WotlkDungeonOKStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Elder Nadox
|
||||
triggers.push_back(new TriggerNode("nadox guardian",
|
||||
NextAction::array(0, new NextAction("attack nadox guardian", ACTION_RAID + 5), nullptr)));
|
||||
|
||||
|
||||
// Prince Taldaram
|
||||
// Flame Orb spawns in melee, doesn't have a clear direction until it starts moving.
|
||||
// Maybe not worth trying to avoid and just heal through. Only consideration is not to have ranged
|
||||
@@ -23,7 +23,7 @@ void WotlkDungeonOKStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
triggers.push_back(new TriggerNode("shadow crash",
|
||||
NextAction::array(0, new NextAction("avoid shadow crash", ACTION_MOVE + 5), nullptr)));
|
||||
// Volazj is not implemented properly in AC, insanity phase does nothing.
|
||||
|
||||
|
||||
// Amanitar (Heroic Only)
|
||||
// TODO: once I get to heroics
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "OldKingdomTriggers.h"
|
||||
|
||||
class WotlkDungeonOKTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonOKTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonOKTriggerContext()
|
||||
|
||||
@@ -38,6 +38,6 @@ bool ShadowCrashTrigger::IsActive()
|
||||
{
|
||||
Unit* unit = AI_VALUE2(Unit*, "find target", "forgotten one");
|
||||
if (!unit) { return false; }
|
||||
|
||||
|
||||
return !botAI->IsMelee(bot);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "SharedDefines.h"
|
||||
|
||||
bool IckAndKrickAction::Execute(Event event)
|
||||
{
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "Ick");
|
||||
if (!boss)
|
||||
return false;
|
||||
@@ -309,7 +309,7 @@ bool TyrannusAction::RangedSpread(bool rangedSpread)
|
||||
return FleePosition(unit->GetPosition(), moveDistance, 250U);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ bool ToCMountedAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint32 spellId = AI_VALUE2(uint32, "vehicle spell id", "Thrust");
|
||||
if (botAI->CanCastVehicleSpell(spellId, target) && botAI->CastVehicleSpell(spellId, target))
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "TrialOfTheChampionTriggers.h"
|
||||
|
||||
class WotlkDungeonToCTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonToCTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonToCTriggerContext()
|
||||
|
||||
@@ -32,7 +32,7 @@ bool AttackDalronnAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "dalronn the controller");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
if (AI_VALUE(Unit*, "current target") == boss)
|
||||
{
|
||||
return false;
|
||||
@@ -51,13 +51,13 @@ bool IngvarStopCastingAction::Execute(Event event)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Spell* spell = bot->FindCurrentSpellBySpellId(my_spell_id);
|
||||
if (!spell) { return false; }
|
||||
|
||||
// bot->Yell("cancelling spell="+std::to_string(my_spell_id), LANG_UNIVERSAL);
|
||||
bot->InterruptSpell(spell->GetCurrentContainer(), false, true, true);
|
||||
|
||||
|
||||
// Can slightly optimise by allowing bot to keep casting if they will finish the cast
|
||||
// before boss spell goes off, however need to hook boss AI for cast remaining.
|
||||
return true;
|
||||
|
||||
@@ -72,7 +72,7 @@ float IngvarThePlundererMultiplier::GetValue(Action* action)
|
||||
}
|
||||
// Done with non-tank logic
|
||||
if (!isTank) { return 1.0f; }
|
||||
|
||||
|
||||
// TANK ONLY
|
||||
if (boss->FindCurrentSpellBySpellId(SPELL_SMASH) ||
|
||||
boss->FindCurrentSpellBySpellId(SPELL_DARK_SMASH))
|
||||
|
||||
@@ -7,11 +7,11 @@ void WotlkDungeonUKStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// Prince Keleseth
|
||||
triggers.push_back(new TriggerNode("keleseth frost tomb",
|
||||
NextAction::array(0, new NextAction("attack frost tomb", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Skarvald the Constructor & Dalronn the Controller
|
||||
triggers.push_back(new TriggerNode("dalronn priority",
|
||||
NextAction::array(0, new NextAction("attack dalronn", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Ingvar the Plunderer
|
||||
|
||||
// Doesn't work yet, this action doesn't get processed until the existing cast finishes
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "UtgardeKeepTriggers.h"
|
||||
|
||||
class WotlkDungeonUKTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonUKTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonUKTriggerContext()
|
||||
|
||||
@@ -21,7 +21,7 @@ bool DalronnDpsTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "dalronn the controller");
|
||||
if (!boss || !boss->isTargetableForAttack()) { return false; }
|
||||
|
||||
|
||||
// This doesn't cause issues with healers currently and they will continue to heal even when included here
|
||||
return !botAI->IsTank(bot);
|
||||
}
|
||||
@@ -78,6 +78,6 @@ bool NotBehindIngvarTrigger::IsActive()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "ingvar the plunderer");
|
||||
if (!boss || botAI->IsTank(bot)) { return false; }
|
||||
|
||||
|
||||
return AI_VALUE2(bool, "behind", "current target");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ void WotlkDungeonUPStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("avoid freezing cloud", ACTION_RAID + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("skadi whirlwind",
|
||||
NextAction::array(0, new NextAction("avoid skadi whirlwind", ACTION_RAID + 4), nullptr)));
|
||||
|
||||
|
||||
// King Ymiron
|
||||
// May need to avoid orb.. unclear if the generic avoid AoE does this well
|
||||
triggers.push_back(new TriggerNode("ymiron bane",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "UtgardePinnacleTriggers.h"
|
||||
|
||||
class WotlkDungeonUPTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonUPTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonUPTriggerContext()
|
||||
|
||||
@@ -32,7 +32,7 @@ bool AttackIchorGlobuleAction::Execute(Event event)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Target is not findable from threat table using AI_VALUE2(),
|
||||
// therefore need to search manually for the unit name
|
||||
GuidVector targets = AI_VALUE(GuidVector, "possible targets");
|
||||
@@ -67,7 +67,7 @@ bool AttackVoidSentryAction::Execute(Event event)
|
||||
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
|
||||
// GuidVector targets = AI_VALUE(GuidVector, "possible targets no los");
|
||||
|
||||
@@ -10,7 +10,7 @@ float ErekemMultiplier::GetValue(Action* action)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "erekem");
|
||||
if (!boss || !botAI->IsDps(bot)) { return 1.0f; }
|
||||
|
||||
|
||||
if (dynamic_cast<DpsAssistAction*>(action))
|
||||
{
|
||||
return 0.0f;
|
||||
@@ -48,7 +48,7 @@ float ZuramatMultiplier::GetValue(Action* action)
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (boss->HasAura(SPELL_SHROUD_OF_DARKNESS) && dynamic_cast<AttackAction*>(action))
|
||||
{
|
||||
return 0.0f;
|
||||
|
||||
@@ -8,14 +8,14 @@ void WotlkDungeonVHStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
// This boss has many purgable buffs, purging/dispels could be merged into generic strats though
|
||||
triggers.push_back(new TriggerNode("erekem target",
|
||||
NextAction::array(0, new NextAction("attack erekem", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Moragg
|
||||
// TODO: This guy has Optic Link which may require moving, add if needed
|
||||
|
||||
// Ichoron
|
||||
triggers.push_back(new TriggerNode("ichoron target",
|
||||
NextAction::array(0, new NextAction("attack ichor globule", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Xevozz
|
||||
// TODO: Revisit in heroics, waypoints back and forth on stairs. Need to test with double beacon spawn
|
||||
|
||||
@@ -27,7 +27,7 @@ void WotlkDungeonVHStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||
NextAction::array(0, new NextAction("stop attack", ACTION_HIGH + 5), nullptr)));
|
||||
triggers.push_back(new TriggerNode("void shift",
|
||||
NextAction::array(0, new NextAction("attack void sentry", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
|
||||
// Cyanigosa
|
||||
triggers.push_back(new TriggerNode("cyanigosa positioning",
|
||||
NextAction::array(0, new NextAction("rear flank", ACTION_MOVE + 5), nullptr)));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "AiObjectContext.h"
|
||||
#include "VioletHoldTriggers.h"
|
||||
|
||||
class WotlkDungeonVHTriggerContext : public NamedObjectContext<Trigger>
|
||||
class WotlkDungeonVHTriggerContext : public NamedObjectContext<Trigger>
|
||||
{
|
||||
public:
|
||||
WotlkDungeonVHTriggerContext()
|
||||
|
||||
Reference in New Issue
Block a user