mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
added 'move from group' action/strat/shortcut-action
This commit is contained in:
@@ -33,8 +33,8 @@ bool FollowChatShortcutAction::Execute(Event event)
|
||||
return false;
|
||||
|
||||
// botAI->Reset();
|
||||
botAI->ChangeStrategy("+follow,-passive,-grind", BOT_STATE_NON_COMBAT);
|
||||
botAI->ChangeStrategy("-follow,-passive,-grind", BOT_STATE_COMBAT);
|
||||
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({});
|
||||
|
||||
PositionMap& posMap = context->GetValue<PositionMap&>("position")->Get();
|
||||
@@ -102,8 +102,8 @@ bool StayChatShortcutAction::Execute(Event event)
|
||||
return false;
|
||||
|
||||
botAI->Reset();
|
||||
botAI->ChangeStrategy("+stay,-passive", BOT_STATE_NON_COMBAT);
|
||||
botAI->ChangeStrategy("-follow,-passive", BOT_STATE_COMBAT);
|
||||
botAI->ChangeStrategy("+stay,-passive,-move from group", BOT_STATE_NON_COMBAT);
|
||||
botAI->ChangeStrategy("-follow,-passive,-move from group", BOT_STATE_COMBAT);
|
||||
|
||||
SetReturnPosition(bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ());
|
||||
|
||||
@@ -111,6 +111,21 @@ bool StayChatShortcutAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MoveFromGroupChatShortcutAction::Execute(Event event)
|
||||
{
|
||||
Player* master = GetMaster();
|
||||
if (!master)
|
||||
return false;
|
||||
|
||||
// dont need to remove stay or follow, move from group takes priority over both
|
||||
// (see their isUseful() methods)
|
||||
botAI->ChangeStrategy("+move from group", BOT_STATE_NON_COMBAT);
|
||||
botAI->ChangeStrategy("+move from group", BOT_STATE_COMBAT);
|
||||
|
||||
botAI->TellMaster("Moving away from group");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FleeChatShortcutAction::Execute(Event event)
|
||||
{
|
||||
Player* master = GetMaster();
|
||||
|
||||
Reference in New Issue
Block a user