From 25c46037cdd5c5872b63b83e16de26386a823ebc Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 10 Sep 2024 20:45:46 +0800 Subject: [PATCH] Reset prioritized targets --- conf/playerbots.conf.dist | 2 +- src/PlayerbotAI.cpp | 1 + src/strategy/actions/ChatShortcutActions.cpp | 2 +- src/strategy/actions/UseMeetingStoneAction.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 518ae5ea..f186c5f7 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -802,7 +802,7 @@ AiPlayerbot.PremadeSpecGlyph.2.0 = 41106,43367,45741,43369,43365,41109 AiPlayerbot.PremadeSpecLink.2.0.60 = 50350151020013053100515221 AiPlayerbot.PremadeSpecLink.2.0.80 = 50350152220013053100515221-503201312 AiPlayerbot.PremadeSpecName.2.1 = prot pve -AiPlayerbot.PremadeSpecGlyph.2.1 = 41100,43367,43869,43369,43365,45745 +AiPlayerbot.PremadeSpecGlyph.2.1 = 41099,43367,43869,43369,43365,45745 AiPlayerbot.PremadeSpecLink.2.1.60 = -05005135203102311333112321 AiPlayerbot.PremadeSpecLink.2.1.80 = -05005135203102311333312321-502302012003 AiPlayerbot.PremadeSpecName.2.2 = ret pve diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 453544ff..460544c8 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -682,6 +682,7 @@ void PlayerbotAI::Reset(bool full) aiObjectContext->GetValue("old target")->Set(nullptr); aiObjectContext->GetValue("current target")->Set(nullptr); + aiObjectContext->GetValue("prioritized targets")->Reset(); aiObjectContext->GetValue("pull target")->Set(ObjectGuid::Empty); aiObjectContext->GetValue("rpg target")->Set(GuidPosition()); aiObjectContext->GetValue("loot target")->Set(LootObject()); diff --git a/src/strategy/actions/ChatShortcutActions.cpp b/src/strategy/actions/ChatShortcutActions.cpp index f158ca29..30d4c2f8 100644 --- a/src/strategy/actions/ChatShortcutActions.cpp +++ b/src/strategy/actions/ChatShortcutActions.cpp @@ -35,7 +35,7 @@ bool FollowChatShortcutAction::Execute(Event event) // botAI->Reset(); botAI->ChangeStrategy("+follow,-passive,-grind,-move from group", BOT_STATE_NON_COMBAT); botAI->ChangeStrategy("-follow,-passive,-grind,-move from group", BOT_STATE_COMBAT); - botAI->GetAiObjectContext()->GetValue("prioritized targets")->Set({}); + botAI->GetAiObjectContext()->GetValue("prioritized targets")->Reset(); PositionMap& posMap = context->GetValue("position")->Get(); PositionInfo pos = posMap["return"]; diff --git a/src/strategy/actions/UseMeetingStoneAction.cpp b/src/strategy/actions/UseMeetingStoneAction.cpp index f5d61b01..071b5b44 100644 --- a/src/strategy/actions/UseMeetingStoneAction.cpp +++ b/src/strategy/actions/UseMeetingStoneAction.cpp @@ -218,7 +218,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player) { bot->ResurrectPlayer(1.0f, false); botAI->TellMasterNoFacing("I live, again!"); - botAI->GetAiObjectContext()->GetValue("prioritized targets")->Set({}); + botAI->GetAiObjectContext()->GetValue("prioritized targets")->Reset(); } player->GetMotionMaster()->Clear();