mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Compare commits
No commits in common. "a19604024eaa424fdddaac9f3ae2a60b67047d05" and "c3eecc0d7cb3eda170713ba51aa6408a17864fc5" have entirely different histories.
a19604024e
...
c3eecc0d7c
@ -10,6 +10,9 @@
|
||||
|
||||
bool DrinkAction::Execute(Event event)
|
||||
{
|
||||
if (bot->IsInCombat())
|
||||
return false;
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::food))
|
||||
{
|
||||
// if (bot->IsNonMeleeSpellCast(true))
|
||||
@ -49,22 +52,23 @@ bool DrinkAction::Execute(Event event)
|
||||
|
||||
bool DrinkAction::isUseful()
|
||||
{
|
||||
return UseItemAction::isUseful() &&
|
||||
AI_VALUE2(bool, "has mana", "self target") &&
|
||||
AI_VALUE2(uint8, "mana", "self target") < 100;
|
||||
// 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()
|
||||
{
|
||||
return !bot->IsInCombat() &&
|
||||
!bot->IsMounted() &&
|
||||
!botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form",
|
||||
"aquatic form","flight form", "swift flight form", nullptr) &&
|
||||
(botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible());
|
||||
return !bot->IsInCombat() && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible());
|
||||
}
|
||||
|
||||
bool EatAction::Execute(Event event)
|
||||
{
|
||||
if (bot->IsInCombat())
|
||||
return false;
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::food))
|
||||
{
|
||||
// if (bot->IsNonMeleeSpellCast(true))
|
||||
@ -102,17 +106,9 @@ bool EatAction::Execute(Event event)
|
||||
return UseItemAction::Execute(event);
|
||||
}
|
||||
|
||||
bool EatAction::isUseful()
|
||||
{
|
||||
return UseItemAction::isUseful() &&
|
||||
AI_VALUE2(uint8, "health", "self target") < 100;
|
||||
}
|
||||
bool EatAction::isUseful() { return UseItemAction::isUseful() && AI_VALUE2(uint8, "health", "self target") < 85; }
|
||||
|
||||
bool EatAction::isPossible()
|
||||
{
|
||||
return !bot->IsInCombat() &&
|
||||
!bot->IsMounted() &&
|
||||
!botAI->HasAnyAuraOf(GetTarget(), "dire bear form", "bear form", "cat form", "travel form",
|
||||
"aquatic form","flight form", "swift flight form", nullptr) &&
|
||||
(botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible());
|
||||
return !bot->IsInCombat() && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::isPossible());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user