mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
- Added skipping disperse tactic while bot is in stay stance (#1180)
This commit is contained in:
parent
3f52563ca7
commit
fe519854a4
@ -2232,7 +2232,9 @@ bool CombatFormationMoveAction::isUseful()
|
|||||||
bool CombatFormationMoveAction::Execute(Event event)
|
bool CombatFormationMoveAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
float dis = AI_VALUE(float, "disperse distance");
|
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;
|
return false;
|
||||||
Player* playerToLeave = NearestGroupMember(dis);
|
Player* playerToLeave = NearestGroupMember(dis);
|
||||||
if (playerToLeave && bot->GetExactDist(playerToLeave) < dis)
|
if (playerToLeave && bot->GetExactDist(playerToLeave) < dis)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user