diff --git a/src/strategy/shaman/MeleeShamanStrategy.cpp b/src/strategy/shaman/MeleeShamanStrategy.cpp index 0764f8a6..bf51ba9b 100644 --- a/src/strategy/shaman/MeleeShamanStrategy.cpp +++ b/src/strategy/shaman/MeleeShamanStrategy.cpp @@ -72,11 +72,8 @@ void MeleeShamanStrategy::InitTriggers(std::vector& triggers) triggers.push_back( new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr))); triggers.push_back( - new TriggerNode("maelstrom weapon", NextAction::array(0, new NextAction("lightning bolt", 25.0f), nullptr))); - triggers.push_back(new TriggerNode("not facing target", - NextAction::array(0, new NextAction("set facing", ACTION_NORMAL + 7), nullptr))); - // triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of - // enemy contact", ACTION_NORMAL + 8), nullptr))); + new TriggerNode("maelstrom weapon 4", NextAction::array(0, new NextAction("lightning bolt", 25.0f), nullptr))); + triggers.push_back(new TriggerNode( "medium aoe", NextAction::array(0, new NextAction("strength of earth totem", ACTION_LIGHT_HEAL), nullptr))); triggers.push_back(new TriggerNode( diff --git a/src/strategy/shaman/ShamanActions.cpp b/src/strategy/shaman/ShamanActions.cpp index 7394c320..3815b2b6 100644 --- a/src/strategy/shaman/ShamanActions.cpp +++ b/src/strategy/shaman/ShamanActions.cpp @@ -51,11 +51,14 @@ bool CastMagmaTotemAction::isUseful() { } bool CastFireNovaAction::isUseful() { + Unit* target = AI_VALUE(Unit*, "current target"); + if (!target) + return false; Creature* fireTotem = bot->GetMap()->GetCreature(bot->m_SummonSlot[1]); if (!fireTotem) return false; - if (bot->GetDistance(fireTotem) > 8.0f) + if (target->GetDistance(fireTotem) > 8.0f) return false; return CastMeleeSpellAction::isUseful(); diff --git a/src/strategy/shaman/ShamanAiObjectContext.cpp b/src/strategy/shaman/ShamanAiObjectContext.cpp index f4a821ce..f6dd9400 100644 --- a/src/strategy/shaman/ShamanAiObjectContext.cpp +++ b/src/strategy/shaman/ShamanAiObjectContext.cpp @@ -110,13 +110,17 @@ public: creators["no water totem"] = &ShamanATriggerFactoryInternal::no_water_totem; creators["no air totem"] = &ShamanATriggerFactoryInternal::no_air_totem; creators["earth shield on main tank"] = &ShamanATriggerFactoryInternal::earth_shield_on_main_tank; - creators["maelstrom weapon"] = &ShamanATriggerFactoryInternal::maelstrom_weapon; + creators["maelstrom weapon 3"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_3; + creators["maelstrom weapon 4"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_4; + creators["maelstrom weapon 5"] = &ShamanATriggerFactoryInternal::maelstrom_weapon_5; creators["flame shock"] = &ShamanATriggerFactoryInternal::flame_shock; creators["wrath of air totem"] = &ShamanATriggerFactoryInternal::wrath_of_air_totem; } private: - static Trigger* maelstrom_weapon(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI); } + static Trigger* maelstrom_weapon_3(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 3); } + static Trigger* maelstrom_weapon_4(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 4); } + static Trigger* maelstrom_weapon_5(PlayerbotAI* botAI) { return new MaelstromWeaponTrigger(botAI, 5); } static Trigger* heroism(PlayerbotAI* botAI) { return new HeroismTrigger(botAI); } static Trigger* bloodlust(PlayerbotAI* botAI) { return new BloodlustTrigger(botAI); } static Trigger* elemental_mastery(PlayerbotAI* botAI) { return new ElementalMasteryTrigger(botAI); } diff --git a/src/strategy/shaman/ShamanTriggers.h b/src/strategy/shaman/ShamanTriggers.h index 97e9ec03..2ab651a1 100644 --- a/src/strategy/shaman/ShamanTriggers.h +++ b/src/strategy/shaman/ShamanTriggers.h @@ -241,7 +241,7 @@ public: class MaelstromWeaponTrigger : public HasAuraStackTrigger { public: - MaelstromWeaponTrigger(PlayerbotAI* botAI) : HasAuraStackTrigger(botAI, "maelstrom weapon", 5) {} + MaelstromWeaponTrigger(PlayerbotAI* botAI, int stack = 5) : HasAuraStackTrigger(botAI, "maelstrom weapon", stack) {} }; class WindShearInterruptEnemyHealerSpellTrigger : public InterruptEnemyHealerTrigger