mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
fix strategies conflict for rndbot
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
#include "DKAiObjectContext.h"
|
#include "DKAiObjectContext.h"
|
||||||
#include "PriestAiObjectContext.h"
|
#include "PriestAiObjectContext.h"
|
||||||
#include "MageAiObjectContext.h"
|
#include "MageAiObjectContext.h"
|
||||||
|
#include "SharedDefines.h"
|
||||||
#include "WarlockAiObjectContext.h"
|
#include "WarlockAiObjectContext.h"
|
||||||
#include "WarriorAiObjectContext.h"
|
#include "WarriorAiObjectContext.h"
|
||||||
#include "ShamanAiObjectContext.h"
|
#include "ShamanAiObjectContext.h"
|
||||||
@@ -275,7 +276,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
else
|
else
|
||||||
engine->addStrategies("heal", "threat", nullptr);
|
engine->addStrategies("heal", "threat", nullptr);
|
||||||
|
|
||||||
engine->addStrategies("dps assist", "cure", "ranged", nullptr);
|
engine->addStrategies("dps assist", "cure", nullptr);
|
||||||
break;
|
break;
|
||||||
case CLASS_MAGE:
|
case CLASS_MAGE:
|
||||||
if (tab == 0)
|
if (tab == 0)
|
||||||
@@ -285,65 +286,62 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
else
|
else
|
||||||
engine->addStrategies("frost", "frost aoe", "threat", nullptr);
|
engine->addStrategies("frost", "frost aoe", "threat", nullptr);
|
||||||
|
|
||||||
engine->addStrategies("dps", "dps assist", "cure", "ranged", nullptr);
|
engine->addStrategies("dps", "dps assist", "cure", nullptr);
|
||||||
break;
|
break;
|
||||||
case CLASS_WARRIOR:
|
case CLASS_WARRIOR:
|
||||||
if (tab == 2)
|
if (tab == 2)
|
||||||
engine->addStrategies("tank", "tank assist", "aoe", "close", "mark rti", nullptr);
|
engine->addStrategies("tank", "tank assist", "aoe", "mark rti", nullptr);
|
||||||
else if (player->getLevel() < 30 || tab == 0)
|
else if (player->getLevel() < 30 || tab == 0)
|
||||||
engine->addStrategies("arms", "aoe", "dps assist", "threat", "close", "behind", nullptr);
|
engine->addStrategies("arms", "aoe", "dps assist", "threat", "behind", nullptr);
|
||||||
else
|
else
|
||||||
engine->addStrategies("fury", "aoe", "dps assist", "threat", "close", "behind", nullptr);
|
engine->addStrategies("fury", "aoe", "dps assist", "threat", "behind", nullptr);
|
||||||
break;
|
break;
|
||||||
case CLASS_SHAMAN:
|
case CLASS_SHAMAN:
|
||||||
if (tab == 0)
|
if (tab == 0)
|
||||||
engine->addStrategies("caster", "caster aoe", "bmana", "threat", "ranged", nullptr);
|
engine->addStrategies("caster", "caster aoe", "bmana", "threat", nullptr);
|
||||||
else if (tab == 2)
|
else if (tab == 2)
|
||||||
engine->addStrategies("heal", "bmana", "ranged", nullptr);
|
engine->addStrategies("heal", "bmana", nullptr);
|
||||||
else
|
else
|
||||||
engine->addStrategies("melee", "melee aoe", "bdps", "threat", "close", nullptr);
|
engine->addStrategies("melee", "melee aoe", "bdps", "threat", nullptr);
|
||||||
|
|
||||||
engine->addStrategies("dps assist", "cure", "totems", nullptr);
|
engine->addStrategies("dps assist", "cure", "totems", nullptr);
|
||||||
break;
|
break;
|
||||||
case CLASS_PALADIN:
|
case CLASS_PALADIN:
|
||||||
if (tab == 1)
|
if (tab == 1)
|
||||||
engine->addStrategies("tank", "tank assist", "bthreat", "barmor", "cure", "close", nullptr);
|
engine->addStrategies("tank", "tank assist", "bthreat", "barmor", "cure", nullptr);
|
||||||
else if (tab == 0)
|
else if (tab == 0)
|
||||||
engine->addStrategies("heal", "dps assist", "cure", nullptr);
|
engine->addStrategies("heal", "dps assist", "cure", nullptr);
|
||||||
else
|
else
|
||||||
engine->addStrategies("dps", "dps assist", "cure", "close", "baoe", nullptr);
|
engine->addStrategies("dps", "dps assist", "cure", "baoe", nullptr);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CLASS_DRUID:
|
case CLASS_DRUID:
|
||||||
if (tab == 0)
|
if (tab == 0)
|
||||||
{
|
{
|
||||||
engine->addStrategies("caster", "cure", "caster aoe", "threat", "dps assist", "ranged", nullptr);
|
engine->addStrategies("caster", "cure", "caster aoe", "threat", "dps assist", nullptr);
|
||||||
if (player->getLevel() > 19)
|
engine->addStrategy("caster debuff");
|
||||||
engine->addStrategy("caster debuff");
|
|
||||||
}
|
}
|
||||||
else if (tab == 2)
|
else if (tab == 2)
|
||||||
engine->addStrategies("heal", "cure", "dps assist", "ranged", nullptr);
|
engine->addStrategies("heal", "cure", "dps assist", nullptr);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
engine->removeStrategy("ranged");
|
|
||||||
engine->removeStrategy("flee");
|
engine->removeStrategy("flee");
|
||||||
engine->addStrategies("bear", "tank assist", "close", nullptr);
|
engine->addStrategies("bear", "tank assist", nullptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLASS_HUNTER:
|
case CLASS_HUNTER:
|
||||||
engine->addStrategies("dps", "aoe", "bdps", "threat", "dps assist", "ranged", nullptr);
|
engine->addStrategies("dps", "aoe", "bdps", "threat", "dps assist", nullptr);
|
||||||
if (player->getLevel() > 19)
|
engine->addStrategy("dps debuff");
|
||||||
engine->addStrategy("dps debuff");
|
|
||||||
break;
|
break;
|
||||||
case CLASS_ROGUE:
|
case CLASS_ROGUE:
|
||||||
if (tab == ROGUE_TAB_ASSASSINATION) {
|
if (tab == ROGUE_TAB_ASSASSINATION) {
|
||||||
engine->addStrategies("melee", "threat", "dps assist", "aoe", "close", "behind", nullptr);
|
engine->addStrategies("melee", "threat", "dps assist", "aoe", "behind", nullptr);
|
||||||
} else {
|
} else {
|
||||||
engine->addStrategies("dps", "threat", "dps assist", "aoe", "close", "behind", nullptr);
|
engine->addStrategies("dps", "threat", "dps assist", "aoe", "behind", nullptr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLASS_WARLOCK:
|
case CLASS_WARLOCK:
|
||||||
engine->addStrategies("dps assist", "dps", "dps debuff", "aoe", "ranged", "threat", nullptr);
|
engine->addStrategies("dps assist", "dps", "dps debuff", "aoe", "threat", nullptr);
|
||||||
break;
|
break;
|
||||||
case CLASS_DEATH_KNIGHT:
|
case CLASS_DEATH_KNIGHT:
|
||||||
if (tab == 0)
|
if (tab == 0)
|
||||||
@@ -353,8 +351,6 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
else
|
else
|
||||||
engine->addStrategies("unholy", "unholy aoe", "dps assist", "threat", nullptr);
|
engine->addStrategies("unholy", "unholy aoe", "dps assist", "threat", nullptr);
|
||||||
|
|
||||||
engine->addStrategies("close", nullptr);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,40 +358,39 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
|
|||||||
{
|
{
|
||||||
if (!player->GetGroup())
|
if (!player->GetGroup())
|
||||||
{
|
{
|
||||||
engine->ChangeStrategy(sPlayerbotAIConfig->randomBotCombatStrategies);
|
// change for heal spec
|
||||||
|
|
||||||
// engine->addStrategy("flee");
|
|
||||||
engine->addStrategy("boost");
|
engine->addStrategy("boost");
|
||||||
|
engine->addStrategy("dps assist");
|
||||||
if (player->getClass() == CLASS_WARLOCK)
|
engine->removeStrategy("threat");
|
||||||
{
|
// engine-
|
||||||
engine->removeStrategy("ranged");
|
switch (player->getClass()) {
|
||||||
}
|
case CLASS_PRIEST: {
|
||||||
|
if (tab != PRIEST_TAB_SHADOW) {
|
||||||
if (player->getClass() == CLASS_DRUID && tab == 2)
|
engine->addStrategies("dps", "shadow debuff", "shadow aoe", nullptr);
|
||||||
{
|
}
|
||||||
engine->addStrategies("caster", "caster aoe", nullptr);
|
break;
|
||||||
}
|
}
|
||||||
|
case CLASS_DRUID: {
|
||||||
if (player->getClass() == CLASS_DRUID && tab == 1 && urand(0, 100) > 50 && player->getLevel() > 19)
|
if (tab == DRUID_TAB_RESTORATION) {
|
||||||
{
|
engine->addStrategies("caster", "caster aoe", nullptr);
|
||||||
engine->addStrategy("dps");
|
engine->addStrategy("caster debuff");
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
if (player->getClass() == CLASS_PRIEST && tab == 1)
|
}
|
||||||
{
|
case CLASS_SHAMAN: {
|
||||||
engine->removeStrategy("heal");
|
if (tab == SHAMAN_TAB_RESTORATION) {
|
||||||
engine->addStrategies("holy", "shadow debuff", "shadow aoe", "threat", nullptr);
|
engine->addStrategies("caster", "caster aoe", "bmana", nullptr);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
if (player->getClass() == CLASS_SHAMAN && tab == 2)
|
}
|
||||||
{
|
case CLASS_PALADIN: {
|
||||||
engine->addStrategies("caster", "caster aoe", nullptr);
|
if (tab == PALADIN_TAB_HOLY) {
|
||||||
}
|
engine->addStrategies("dps", "dps assist", "baoe", nullptr);
|
||||||
|
}
|
||||||
if (player->getClass() == CLASS_PALADIN && tab == 0)
|
break;
|
||||||
{
|
}
|
||||||
engine->addStrategies("dps", "close", nullptr);
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,6 +227,13 @@ std::string const RandomPlayerbotFactory::CreateRandomBotName(uint8 gender)
|
|||||||
}
|
}
|
||||||
fields = result->Fetch();
|
fields = result->Fetch();
|
||||||
std::string ret = fields[0].Get<std::string>();
|
std::string ret = fields[0].Get<std::string>();
|
||||||
|
// check name limitations
|
||||||
|
if (ObjectMgr::CheckPlayerName(ret) != CHAR_NAME_SUCCESS ||
|
||||||
|
(sObjectMgr->IsReservedName(ret) || sObjectMgr->IsProfanityName(ret)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ret.size()) {
|
if (ret.size()) {
|
||||||
CharacterDatabase.DirectExecute("UPDATE playerbots_names SET in_use=1 WHERE name='{}'", ret);
|
CharacterDatabase.DirectExecute("UPDATE playerbots_names SET in_use=1 WHERE name='{}'", ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ void CasterDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
|
triggers.push_back(new TriggerNode("eclipse (lunar)", NextAction::array(0, new NextAction("starfire", ACTION_NORMAL + 6), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
triggers.push_back(new TriggerNode("moonfire", NextAction::array(0, new NextAction("moonfire", ACTION_NORMAL + 4), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
|
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
|
||||||
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"party member remove curse",
|
"party member remove curse",
|
||||||
NextAction::array(0, new NextAction("remove curse on party", ACTION_DISPEL + 7), NULL)));
|
NextAction::array(0, new NextAction("remove curse on party", ACTION_DISPEL + 7), NULL)));
|
||||||
|
|||||||
@@ -75,7 +75,5 @@ void HealDruidStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
"medium mana",
|
"medium mana",
|
||||||
NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
|
NextAction::array(0, new NextAction("innervate", ACTION_HIGH + 5), NULL)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
"enemy too close for spell",
|
|
||||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ void CombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
|||||||
triggers.push_back(new TriggerNode("mounted", NextAction::array(0, new NextAction("check mount state", 54), nullptr)));
|
triggers.push_back(new TriggerNode("mounted", NextAction::array(0, new NextAction("check mount state", 54), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("out of react range", NextAction::array(0, new NextAction("flee to master", 55), nullptr)));
|
// triggers.push_back(new TriggerNode("out of react range", NextAction::array(0, new NextAction("flee to master", 55), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("combat stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("combat stuck", NextAction::array(0, new NextAction("reset", 1.0f), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
|
||||||
// triggers.push_back(new TriggerNode("combat long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
// triggers.push_back(new TriggerNode("combat long stuck", NextAction::array(0, new NextAction("hearthstone", 0.9f), new NextAction("repop", 0.8f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ void MeleeCombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
|||||||
{
|
{
|
||||||
CombatStrategy::InitTriggers(triggers);
|
CombatStrategy::InitTriggers(triggers);
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
|
// triggers.push_back(new TriggerNode("not facing target", NextAction::array(0, new NextAction("set facing", ACTION_MOVE + 7), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_MOVE + 8), nullptr)));
|
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_MOVE + 8), 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)));
|
// triggers.push_back(new TriggerNode("enemy too close for melee", NextAction::array(0, new NextAction("move out of enemy contact", ACTION_NORMAL + 8), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBehindCombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
void SetBehindCombatStrategy::InitTriggers(std::vector<TriggerNode*> &triggers)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ void RpgStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode("rpg", NextAction::array(0, new NextAction("rpg work", 1.001f), nullptr)));
|
triggers.push_back(new TriggerNode("rpg", NextAction::array(0, new NextAction("rpg work", 1.001f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("rpg", NextAction::array(0, new NextAction("rpg emote", 1.001f), nullptr)));
|
triggers.push_back(new TriggerNode("rpg", NextAction::array(0, new NextAction("rpg emote", 1.001f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("has rpg target", NextAction::array(0, new NextAction("rpg cancel", 1.001f), nullptr)));
|
triggers.push_back(new TriggerNode("has rpg target", NextAction::array(0, new NextAction("rpg cancel", 1.001f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("rpg taxi", NextAction::array(0, new NextAction("rpg taxi", 1.005f), nullptr)));
|
// triggers.push_back(new TriggerNode("rpg taxi", NextAction::array(0, new NextAction("rpg taxi", 1.005f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("rpg discover", NextAction::array(0, new NextAction("rpg discover", 1.110f), nullptr)));
|
triggers.push_back(new TriggerNode("rpg discover", NextAction::array(0, new NextAction("rpg discover", 1.110f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("rpg start quest", NextAction::array(0, new NextAction("rpg start quest", 1.080f), nullptr)));
|
triggers.push_back(new TriggerNode("rpg start quest", NextAction::array(0, new NextAction("rpg start quest", 1.080f), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("rpg end quest", NextAction::array(0, new NextAction("rpg end quest", 1.090f), nullptr)));
|
triggers.push_back(new TriggerNode("rpg end quest", NextAction::array(0, new NextAction("rpg end quest", 1.090f), nullptr)));
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void GenericHunterStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode("enemy too close for shoot", NextAction::array(0, new NextAction("flee", ACTION_HIGH + 3), NULL)));
|
triggers.push_back(new TriggerNode("enemy too close for shoot", NextAction::array(0, new NextAction("flee", ACTION_HIGH + 3), NULL)));
|
||||||
triggers.push_back(new TriggerNode("misdirection on main tank", NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
|
triggers.push_back(new TriggerNode("misdirection on main tank", NextAction::array(0, new NextAction("misdirection on main tank", ACTION_HIGH + 7), NULL)));
|
||||||
triggers.push_back(new TriggerNode("tranquilizing shot", NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));
|
triggers.push_back(new TriggerNode("tranquilizing shot", NextAction::array(0, new NextAction("tranquilizing shot", 61.0f), NULL)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NextAction** HunterBoostStrategy::getDefaultActions()
|
NextAction** HunterBoostStrategy::getDefaultActions()
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ void GenericMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("evocation", ACTION_EMERGENCY + 5), nullptr)));
|
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("evocation", ACTION_EMERGENCY + 5), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("fire ward", NextAction::array(0, new NextAction("fire ward", ACTION_EMERGENCY), nullptr)));
|
triggers.push_back(new TriggerNode("fire ward", NextAction::array(0, new NextAction("fire ward", ACTION_EMERGENCY), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("frost ward", NextAction::array(0, new NextAction("frost ward", ACTION_EMERGENCY), nullptr)));
|
triggers.push_back(new TriggerNode("frost ward", NextAction::array(0, new NextAction("frost ward", ACTION_EMERGENCY), nullptr)));
|
||||||
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void MageCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ void HealPaladinStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"sacred shield on main tank",
|
"sacred shield on main tank",
|
||||||
NextAction::array(0, new NextAction("sacred shield on main tank", ACTION_CRITICAL_HEAL + 6), NULL)));
|
NextAction::array(0, new NextAction("sacred shield on main tank", ACTION_CRITICAL_HEAL + 6), NULL)));
|
||||||
|
|
||||||
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,7 @@ void GenericPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
"low mana",
|
"low mana",
|
||||||
NextAction::array(0, new NextAction("hymn of hope", ACTION_HIGH), NULL)));
|
NextAction::array(0, new NextAction("hymn of hope", ACTION_HIGH), NULL)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
"enemy too close for spell",
|
|
||||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,9 +113,13 @@ void DpsRogueStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
"light aoe",
|
"light aoe",
|
||||||
NextAction::array(0, new NextAction("blade flurry", ACTION_HIGH + 3), NULL)));
|
NextAction::array(0, new NextAction("blade flurry", ACTION_HIGH + 3), NULL)));
|
||||||
|
|
||||||
// triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
// "enemy out of melee",
|
"enemy out of melee",
|
||||||
// NextAction::array(0, new NextAction("stealth", ACTION_NORMAL + 9), new NextAction("reach melee", ACTION_NORMAL + 8), NULL)));
|
NextAction::array(0,
|
||||||
|
new NextAction("stealth", ACTION_NORMAL + 9),
|
||||||
|
new NextAction("sprint", ACTION_NORMAL + 8),
|
||||||
|
new NextAction("reach melee", ACTION_NORMAL + 7),
|
||||||
|
NULL)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"expose armor",
|
"expose armor",
|
||||||
|
|||||||
@@ -57,9 +57,7 @@ void CasterShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
"no fire totem",
|
"no fire totem",
|
||||||
NextAction::array(0, new NextAction("totem of wrath", 15.0f), NULL)));
|
NextAction::array(0, new NextAction("totem of wrath", 15.0f), NULL)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
"enemy too close for spell",
|
|
||||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
|
|||||||
@@ -93,9 +93,7 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
"earth shield on main tank",
|
"earth shield on main tank",
|
||||||
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
|
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_HIGH), nullptr)));
|
||||||
"enemy too close for spell",
|
|
||||||
NextAction::array(0, new NextAction("flee", 49.0f), NULL)));
|
|
||||||
|
|
||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"medium mana",
|
"medium mana",
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range)
|
|||||||
!attacker->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION) &&
|
!attacker->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION) &&
|
||||||
// !(attacker->GetGUID().IsPet() && enemy) &&
|
// !(attacker->GetGUID().IsPet() && enemy) &&
|
||||||
!(attacker->GetCreatureType() == CREATURE_TYPE_CRITTER && !attacker->IsInCombat()) && !(sPlayerbotAIConfig->IsInPvpProhibitedZone(attacker->GetAreaId()) &&
|
!(attacker->GetCreatureType() == CREATURE_TYPE_CRITTER && !attacker->IsInCombat()) && !(sPlayerbotAIConfig->IsInPvpProhibitedZone(attacker->GetAreaId()) &&
|
||||||
|
bot->CanSeeOrDetect(attacker) &&
|
||||||
(attacker->GetGUID().IsPlayer() || attacker->GetGUID().IsPet())) && (!c || (!c->IsInEvadeMode() && ((!isMemberBotGroup && botAI->HasStrategy("attack tagged", BOT_STATE_NON_COMBAT)) ||
|
(attacker->GetGUID().IsPlayer() || attacker->GetGUID().IsPet())) && (!c || (!c->IsInEvadeMode() && ((!isMemberBotGroup && botAI->HasStrategy("attack tagged", BOT_STATE_NON_COMBAT)) ||
|
||||||
leaderHasThreat || (!c->hasLootRecipient() && (!c->GetVictim() || (c->GetVictim() && ((!c->GetVictim()->IsPlayer() || bot->IsInSameGroupWith(c->GetVictim()->ToPlayer())) ||
|
leaderHasThreat || (!c->hasLootRecipient() && (!c->GetVictim() || (c->GetVictim() && ((!c->GetVictim()->IsPlayer() || bot->IsInSameGroupWith(c->GetVictim()->ToPlayer())) ||
|
||||||
(botAI->GetMaster() && c->GetVictim() == botAI->GetMaster()))))) || c->isTappedBy(bot))));
|
(botAI->GetMaster() && c->GetVictim() == botAI->GetMaster()))))) || c->isTappedBy(bot))));
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
|
|||||||
|
|
||||||
if (!unit)
|
if (!unit)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!bot->IsHostileTo(unit) && unit->GetNpcFlags() != UNIT_NPC_FLAG_NONE) {
|
if (!bot->IsHostileTo(unit) && unit->GetNpcFlags() != UNIT_NPC_FLAG_NONE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ GenericWarriorStrategy::GenericWarriorStrategy(PlayerbotAI* botAI) : CombatStrat
|
|||||||
void GenericWarriorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
void GenericWarriorStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||||
{
|
{
|
||||||
CombatStrategy::InitTriggers(triggers);
|
CombatStrategy::InitTriggers(triggers);
|
||||||
|
triggers.push_back(new TriggerNode("enemy out of melee", NextAction::array(0, new NextAction("reach melee", ACTION_NORMAL + 8), nullptr)));
|
||||||
/*triggers.push_back(new TriggerNode("bloodrage", NextAction::array(0, new NextAction("bloodrage", ACTION_HIGH + 1), nullptr)));
|
/*triggers.push_back(new TriggerNode("bloodrage", NextAction::array(0, new NextAction("bloodrage", ACTION_HIGH + 1), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("shield bash", NextAction::array(0, new NextAction("shield bash", ACTION_INTERRUPT + 4), nullptr)));
|
triggers.push_back(new TriggerNode("shield bash", NextAction::array(0, new NextAction("shield bash", ACTION_INTERRUPT + 4), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("shield bash on enemy healer", NextAction::array(0, new NextAction("shield bash on enemy healer", ACTION_INTERRUPT + 3), nullptr)));
|
triggers.push_back(new TriggerNode("shield bash on enemy healer", NextAction::array(0, new NextAction("shield bash on enemy healer", ACTION_INTERRUPT + 3), nullptr)));
|
||||||
|
|||||||
Reference in New Issue
Block a user