mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
- Added skipping disperse tactic while bot is in stay stance (#1180)
This commit is contained in:
@@ -2232,7 +2232,9 @@ bool CombatFormationMoveAction::isUseful()
|
||||
bool CombatFormationMoveAction::Execute(Event event)
|
||||
{
|
||||
float dis = AI_VALUE(float, "disperse distance");
|
||||
if (dis <= 0.0f)
|
||||
if (dis <= 0.0f ||
|
||||
(!bot->IsInCombat() && botAI->HasStrategy("stay", BotState::BOT_STATE_NON_COMBAT)) ||
|
||||
(bot->IsInCombat() && botAI->HasStrategy("stay", BotState::BOT_STATE_COMBAT)))
|
||||
return false;
|
||||
Player* playerToLeave = NearestGroupMember(dis);
|
||||
if (playerToLeave && bot->GetExactDist(playerToLeave) < dis)
|
||||
|
||||
Reference in New Issue
Block a user