mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-19 03:35:43 +00:00
Port fixes until b4094bf - flying, mount animations, bot attack range, free food option
This commit is contained in:
@@ -291,6 +291,10 @@ bool RpgHomeBindTrigger::IsActive()
|
||||
|
||||
bool RpgQueueBGTrigger::IsActive()
|
||||
{
|
||||
// skip bots not in continents
|
||||
if (!WorldPosition(bot).isOverworld()) // bg, raid, dungeon
|
||||
return false;
|
||||
|
||||
GuidPosition guidP(getGuidP());
|
||||
|
||||
if (!guidP.IsCreature())
|
||||
@@ -420,6 +424,22 @@ bool RpgDuelTrigger::IsActive()
|
||||
if (!botAI->HasStrategy("start duel", BOT_STATE_NON_COMBAT))
|
||||
return false;
|
||||
|
||||
// Less spammy duels
|
||||
if (bot->getLevel() < 3)
|
||||
return false;
|
||||
|
||||
if (botAI->HasRealPlayerMaster())
|
||||
{
|
||||
// do not auto duel if master is not afk
|
||||
if (botAI->GetMaster() && !botAI->GetMaster()->isAFK())
|
||||
return false;
|
||||
}
|
||||
|
||||
// do not auto duel with low hp
|
||||
if (AI_VALUE2(uint8, "health", "self target") < 90)
|
||||
return false;
|
||||
|
||||
|
||||
GuidPosition guidP(getGuidP());
|
||||
|
||||
if (!guidP.IsPlayer())
|
||||
@@ -433,7 +453,7 @@ bool RpgDuelTrigger::IsActive()
|
||||
if (player->getLevel() > bot->getLevel() + 3)
|
||||
return false;
|
||||
|
||||
if (bot->getLevel() > player->getLevel() + 20)
|
||||
if (bot->getLevel() > player->getLevel() + 10)
|
||||
return false;
|
||||
|
||||
// caster or target already have requested duel
|
||||
|
||||
Reference in New Issue
Block a user