mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 10:45:43 +00:00
Port fixes until b4094bf - flying, mount animations, bot attack range, free food option
This commit is contained in:
@@ -72,7 +72,28 @@ Unit* GiveFoodAction::GetTarget()
|
||||
return AI_VALUE(Unit*, "party member without food");
|
||||
}
|
||||
|
||||
bool GiveFoodAction::isUseful()
|
||||
{
|
||||
if (!GetTarget())
|
||||
return false;
|
||||
|
||||
bool isRandomBot = GetTarget()->IsPlayer() && sRandomPlayerbotMgr->IsRandomBot((Player*) GetTarget());
|
||||
|
||||
return !isRandomBot || (isRandomBot && !sPlayerbotAIConfig->freeFood);
|
||||
}
|
||||
|
||||
Unit* GiveWaterAction::GetTarget()
|
||||
{
|
||||
return AI_VALUE(Unit*, "party member without water");
|
||||
}
|
||||
|
||||
|
||||
bool GiveWaterAction::isUseful()
|
||||
{
|
||||
if (!GetTarget())
|
||||
return false;
|
||||
|
||||
bool isRandomBot = GetTarget()->IsPlayer() && sRandomPlayerbotMgr->IsRandomBot((Player*)GetTarget());
|
||||
|
||||
return !isRandomBot || (isRandomBot && !sPlayerbotAIConfig->freeFood);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user