mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge branch 'master' into patch-2
This commit is contained in:
@@ -17,10 +17,6 @@ bool DrinkAction::Execute(Event event)
|
||||
if (bot->IsMounted())
|
||||
return false;
|
||||
|
||||
bool hasMana = AI_VALUE2(bool, "has mana", "self target");
|
||||
if (!hasMana)
|
||||
return false;
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::food))
|
||||
{
|
||||
// if (bot->IsNonMeleeSpellCast(true))
|
||||
@@ -58,7 +54,14 @@ bool DrinkAction::Execute(Event event)
|
||||
return UseItemAction::Execute(event);
|
||||
}
|
||||
|
||||
bool DrinkAction::isUseful() { return UseItemAction::isUseful() && AI_VALUE2(uint8, "mana", "self target") < 100; }
|
||||
bool DrinkAction::isUseful()
|
||||
{
|
||||
// check class uses mana
|
||||
if (!AI_VALUE2(bool, "has mana", "self target"))
|
||||
return false;
|
||||
|
||||
return UseItemAction::isUseful() && AI_VALUE2(uint8, "mana", "self target") < 100;
|
||||
}
|
||||
|
||||
bool DrinkAction::isPossible()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user