diff --git a/playerbot/AiFactory.cpp b/playerbot/AiFactory.cpp index 115502e8c..de05e067e 100644 --- a/playerbot/AiFactory.cpp +++ b/playerbot/AiFactory.cpp @@ -974,7 +974,7 @@ Engine* AiFactory::createNonCombatEngine(Player* player, PlayerbotAI* const faca void AiFactory::AddDefaultDeadStrategies(Player* player, PlayerbotAI* const facade, Engine* deadEngine) { - deadEngine->addStrategies("dead", "stay", "default", "follow", NULL); + deadEngine->addStrategies("dead", "stay", "default", "follow", "group", NULL); if (sRandomPlayerbotMgr.IsFreeBot(player) && !player->GetGroup()) { deadEngine->removeStrategy("follow"); diff --git a/playerbot/strategy/generic/GroupStrategy.cpp b/playerbot/strategy/generic/GroupStrategy.cpp index 5f64275b7..485c781cb 100644 --- a/playerbot/strategy/generic/GroupStrategy.cpp +++ b/playerbot/strategy/generic/GroupStrategy.cpp @@ -27,3 +27,13 @@ void GroupStrategy::InitNonCombatTriggers(std::list &triggers) NextAction::array(0, new NextAction("reset instances", 1.0f), NULL)));*/ } +void GroupStrategy::InitDeadTriggers(std::list& triggers) +{ + triggers.push_back(new TriggerNode( + "seldom", + NextAction::array(0, new NextAction("leave far away", 4.0f), NULL))); + + triggers.push_back(new TriggerNode( + "leader is afk", + NextAction::array(0, new NextAction("leave far away", 4.0f), NULL))); +} \ No newline at end of file diff --git a/playerbot/strategy/generic/GroupStrategy.h b/playerbot/strategy/generic/GroupStrategy.h index b4768ec9e..020297a3e 100644 --- a/playerbot/strategy/generic/GroupStrategy.h +++ b/playerbot/strategy/generic/GroupStrategy.h @@ -12,5 +12,6 @@ namespace ai private: void InitNonCombatTriggers(std::list &triggers) override; + void InitDeadTriggers(std::list& triggers) override; }; }