mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 02:40:28 +00:00
Random bots gear related enhancements
This commit is contained in:
@@ -116,12 +116,11 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
|
||||
botAI->rpgInfo.status == RPG_GO_INNKEEPER ||
|
||||
botAI->rpgInfo.status == RPG_DO_QUEST;
|
||||
|
||||
bool notHostile = !bot->IsHostileTo(unit); /*|| (unit->ToCreature() && unit->ToCreature()->IsCivilian());*/
|
||||
float aggroRange = 30.0f;
|
||||
if (unit->ToCreature())
|
||||
aggroRange = std::min(30.0f, unit->ToCreature()->GetAggroRange(bot) + 10.0f);
|
||||
bool outOfAggro = unit->ToCreature() && bot->GetDistance(unit) > aggroRange;
|
||||
if (inactiveGrindStatus && (outOfAggro || notHostile))
|
||||
if (inactiveGrindStatus && outOfAggro)
|
||||
{
|
||||
if (needForQuestMap.find(unit->GetEntry()) == needForQuestMap.end())
|
||||
needForQuestMap[unit->GetEntry()] = needForQuest(unit);
|
||||
|
||||
Reference in New Issue
Block a user