mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
fix freefood
This commit is contained in:
parent
c9722ddb33
commit
aaae6b6476
@ -17,6 +17,7 @@ bool DrinkAction::Execute(Event event)
|
|||||||
|
|
||||||
if (sPlayerbotAIConfig->freeFood)
|
if (sPlayerbotAIConfig->freeFood)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (bot->IsNonMeleeSpellCast(true))
|
if (bot->IsNonMeleeSpellCast(true))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -44,8 +45,9 @@ bool DrinkAction::Execute(Event event)
|
|||||||
|
|
||||||
botAI->SetNextCheckDelay(delay);
|
botAI->SetNextCheckDelay(delay);
|
||||||
|
|
||||||
|
bot->AddAura(24707, bot);
|
||||||
return botAI->CastSpell(24707, bot);
|
return true;
|
||||||
|
// return botAI->CastSpell(24707, bot);
|
||||||
}
|
}
|
||||||
|
|
||||||
return UseItemAction::Execute(event);
|
return UseItemAction::Execute(event);
|
||||||
@ -94,9 +96,9 @@ bool EatAction::Execute(Event event)
|
|||||||
else
|
else
|
||||||
delay = 20000.0f * (100 - p) / 100.0f;
|
delay = 20000.0f * (100 - p) / 100.0f;
|
||||||
|
|
||||||
botAI->CastSpell(24707, bot);
|
|
||||||
botAI->SetNextCheckDelay(delay);
|
botAI->SetNextCheckDelay(delay);
|
||||||
|
|
||||||
|
bot->AddAura(24707, bot);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user