Skip to content

Commit

Permalink
fixing bots going from one point to another when in guard/stay/follow…
Browse files Browse the repository at this point in the history
… when rtsc go is called (#8)

Co-authored-by: Viger <viger28@gmail.com>
  • Loading branch information
Vigerus and Viger committed May 15, 2024
1 parent 2e2ee5d commit 7a483bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions playerbot/strategy/actions/SeeSpellAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ bool SeeSpellAction::MoveToSpell(Player* requester, WorldPosition& spellPosition

stayPosition.Set(spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), spellPosition.getMapId());
posMap["stay"] = stayPosition;
posMap["return"] = stayPosition;
}
else if (ai->HasStrategy("guard", ai->GetState()))
{
Expand All @@ -231,6 +232,7 @@ bool SeeSpellAction::MoveToSpell(Player* requester, WorldPosition& spellPosition

guardPosition.Set(spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), spellPosition.getMapId());
posMap["guard"] = guardPosition;
posMap["return"] = guardPosition;
}
else if (ai->HasStrategy("follow", BotState::BOT_STATE_NON_COMBAT) && requester)
{
Expand All @@ -246,6 +248,7 @@ bool SeeSpellAction::MoveToSpell(Player* requester, WorldPosition& spellPosition

followPosition.Set(spellPosition.getX(), spellPosition.getY(), spellPosition.getZ(), spellPosition.getMapId());
posMap["follow"] = followPosition;
posMap["return"] = followPosition;
}
}

Expand Down

0 comments on commit 7a483bf

Please sign in to comment.