mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Compare commits
10 Commits
c3eecc0d7c
...
a19604024e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a19604024e | ||
|
|
972e2604ce | ||
|
|
aaa9e1a42c | ||
|
|
df77668b4b | ||
|
|
ec4ab34f94 | ||
|
|
62e2ca247a | ||
|
|
d9b57fcfd4 | ||
|
|
e042e3b12b | ||
|
|
3228667121 | ||
|
|
f26c4e99f6 |
@ -10,9 +10,6 @@
|
||||
|
||||
bool DrinkAction::Execute(Event event)
|
||||
{
|
||||
if (bot->IsInCombat())
|
||||
return false;
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::food))
|
||||
{
|
||||
// if (bot->IsNonMeleeSpellCast(true))
|
||||
@ -52,23 +49,22 @@ bool DrinkAction::Execute(Event event)
|
||||
|
||||
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;
|
||||
return UseItemAction::isUseful() &&
|
||||
AI_VALUE2(bool, "has mana", "self target") &&
|
||||
AI_VALUE2(uint8, "mana", "self target") < 100;
|
||||
}
|
||||
|
||||
bool DrinkAction::isPossible()
|
||||
{
|
||||
return !bot->IsInCombat() && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::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());
|
||||
}
|
||||
|
||||
bool EatAction::Execute(Event event)
|
||||
{
|
||||
if (bot->IsInCombat())
|
||||
return false;
|
||||
|
||||
if (botAI->HasCheat(BotCheatMask::food))
|
||||
{
|
||||
// if (bot->IsNonMeleeSpellCast(true))
|
||||
@ -106,9 +102,17 @@ bool EatAction::Execute(Event event)
|
||||
return UseItemAction::Execute(event);
|
||||
}
|
||||
|
||||
bool EatAction::isUseful() { return UseItemAction::isUseful() && AI_VALUE2(uint8, "health", "self target") < 85; }
|
||||
bool EatAction::isUseful()
|
||||
{
|
||||
return UseItemAction::isUseful() &&
|
||||
AI_VALUE2(uint8, "health", "self target") < 100;
|
||||
}
|
||||
|
||||
bool EatAction::isPossible()
|
||||
{
|
||||
return !bot->IsInCombat() && (botAI->HasCheat(BotCheatMask::food) || UseItemAction::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());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user