feat: rndbot teleport, grind, stuck problem etc.

This commit is contained in:
Yunfan Li
2023-08-01 23:21:06 +08:00
parent 6b7bf8ade7
commit 0969db4c89
15 changed files with 178 additions and 157 deletions

View File

@@ -18,8 +18,8 @@ bool DrinkAction::Execute(Event event)
if (sPlayerbotAIConfig->freeFood)
{
if (bot->IsNonMeleeSpellCast(true))
return false;
// if (bot->IsNonMeleeSpellCast(true))
// return false;
bot->ClearUnitState(UNIT_STATE_CHASE);
bot->ClearUnitState(UNIT_STATE_FOLLOW);
@@ -70,8 +70,8 @@ bool EatAction::Execute(Event event)
if (sPlayerbotAIConfig->freeFood)
{
if (bot->IsNonMeleeSpellCast(true))
return false;
// if (bot->IsNonMeleeSpellCast(true))
// return false;
bot->ClearUnitState(UNIT_STATE_CHASE);
bot->ClearUnitState(UNIT_STATE_FOLLOW);
@@ -106,8 +106,8 @@ bool EatAction::Execute(Event event)
}
bool EatAction::isUseful()
{
return UseItemAction::isUseful() && AI_VALUE2(uint8, "health", "self target") < sPlayerbotAIConfig->lowHealth;
{
return UseItemAction::isUseful() && AI_VALUE2(uint8, "health", "self target") < 85;
}
bool EatAction::isPossible()