This commit is contained in:
Yunfan Li
2023-09-03 14:36:40 +08:00
parent 50a2be40f7
commit 0be6cc11aa
5 changed files with 14 additions and 11 deletions

View File

@@ -36,9 +36,9 @@ bool AttackAnythingAction::isUseful()
if (context->GetValue<TravelTarget*>("travel target")->Get()->isTraveling() &&
ChooseRpgTargetAction::isFollowValid(bot, *context->GetValue<TravelTarget*>("travel target")->Get()->getPosition())) //Bot is traveling
return false;
if (bot->IsInCombat()) {
return false;
}
// if (bot->IsInCombat()) {
// return false;
// }
Unit* target = GetTarget();
if (!target)

View File

@@ -755,7 +755,7 @@ bool MovementAction::IsMovingAllowed()
bot->HasUnitState(UNIT_STATE_LOST_CONTROL))
return false;
if (bot->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_CONTROLLED)) {
if (bot->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_CONTROLLED) != NULL_MOTION_TYPE) {
return false;
}