fix: bot stuck after drink or food && initialization customized

This commit is contained in:
Yunfan Li
2023-05-23 23:39:20 +08:00
parent 32da0c07c9
commit c16e587854
18 changed files with 247 additions and 119 deletions

View File

@@ -29,8 +29,7 @@ bool DrinkAction::Execute(Event event)
botAI->SetNextCheckDelay(sPlayerbotAIConfig->globalCoolDown);
return false;
}
bot->AddUnitState(UNIT_STAND_STATE_SIT);
bot->SetStandState(UNIT_STAND_STATE_SIT);
botAI->InterruptSpell();
//float hp = bot->GetHealthPercent();
@@ -82,7 +81,7 @@ bool EatAction::Execute(Event event)
return false;
}
bot->AddUnitState(UNIT_STAND_STATE_SIT);
bot->SetStandState(UNIT_STAND_STATE_SIT);
botAI->InterruptSpell();
float hp = bot->GetHealthPct();