Reset prioritized targets

This commit is contained in:
Yunfan Li
2024-09-10 20:45:46 +08:00
parent bca621a883
commit 25c46037cd
4 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -682,6 +682,7 @@ void PlayerbotAI::Reset(bool full)
aiObjectContext->GetValue<Unit*>("old target")->Set(nullptr);
aiObjectContext->GetValue<Unit*>("current target")->Set(nullptr);
aiObjectContext->GetValue<Unit*>("prioritized targets")->Reset();
aiObjectContext->GetValue<ObjectGuid>("pull target")->Set(ObjectGuid::Empty);
aiObjectContext->GetValue<GuidPosition>("rpg target")->Set(GuidPosition());
aiObjectContext->GetValue<LootObject>("loot target")->Set(LootObject());

View File

@@ -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<GuidVector>("prioritized targets")->Set({});
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
PositionMap& posMap = context->GetValue<PositionMap&>("position")->Get();
PositionInfo pos = posMap["return"];

View File

@@ -218,7 +218,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
{
bot->ResurrectPlayer(1.0f, false);
botAI->TellMasterNoFacing("I live, again!");
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Set({});
botAI->GetAiObjectContext()->GetValue<GuidVector>("prioritized targets")->Reset();
}
player->GetMotionMaster()->Clear();