mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
grind, teleport, move random for rndbot
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "GrindTargetValue.h"
|
||||
#include "Playerbots.h"
|
||||
#include "ReputationMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
Unit* GrindTargetValue::Calculate()
|
||||
{
|
||||
@@ -54,14 +56,19 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
|
||||
if (!unit)
|
||||
continue;
|
||||
|
||||
// if (unit->HasUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE)) {
|
||||
// continue;
|
||||
// }
|
||||
auto &rep = bot->ToPlayer()->GetReputationMgr();
|
||||
if (unit->ToCreature() && !unit->ToCreature()->GetCreatureTemplate()->lootid && bot->GetReactionTo(unit) >= REP_NEUTRAL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!bot->IsHostileTo(unit) && unit->GetNpcFlags() != UNIT_NPC_FLAG_NONE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!bot->isHonorOrXPTarget(unit)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > sPlayerbotAIConfig->spellDistance)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user