diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index dde159ab..1c39e862 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -1247,7 +1247,7 @@ void PlayerbotFactory::InitEquipment(bool incremental) if (CanEquipUnseenItem(slot, dest, itemId)) items[slot].push_back(itemId); } - } while (items[slot].size() < 25 && desiredQuality-- > ITEM_QUALITY_NORMAL); + } while (items[slot].size() < 10 && desiredQuality-- > ITEM_QUALITY_NORMAL); } for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; ++slot) diff --git a/src/strategy/actions/ChooseTargetActions.cpp b/src/strategy/actions/ChooseTargetActions.cpp index c0c2b0ec..0157ae70 100644 --- a/src/strategy/actions/ChooseTargetActions.cpp +++ b/src/strategy/actions/ChooseTargetActions.cpp @@ -61,13 +61,13 @@ bool DropTargetAction::Execute(Event event) context->GetValue("available loot")->Get()->Add(guid); } - ObjectGuid pullTarget = context->GetValue("pull target")->Get(); - GuidVector possible = botAI->GetAiObjectContext()->GetValue("possible targets no los")->Get(); + // ObjectGuid pullTarget = context->GetValue("pull target")->Get(); + // GuidVector possible = botAI->GetAiObjectContext()->GetValue("possible targets no los")->Get(); - if (pullTarget && find(possible.begin(), possible.end(), pullTarget) == possible.end()) - { - context->GetValue("pull target")->Set(ObjectGuid::Empty); - } + // if (pullTarget && find(possible.begin(), possible.end(), pullTarget) == possible.end()) + // { + // context->GetValue("pull target")->Set(ObjectGuid::Empty); + // } context->GetValue("current target")->Set(nullptr); diff --git a/src/strategy/generic/NonCombatStrategy.cpp b/src/strategy/generic/NonCombatStrategy.cpp index cf17f33e..41874d59 100644 --- a/src/strategy/generic/NonCombatStrategy.cpp +++ b/src/strategy/generic/NonCombatStrategy.cpp @@ -7,12 +7,14 @@ void NonCombatStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("check mount state", 1.0f), new NextAction("check values", 1.0f), nullptr))); - triggers.push_back(new TriggerNode("near dark portal", NextAction::array(0, new NextAction("move to dark portal", 1.0f), nullptr))); - triggers.push_back(new TriggerNode("at dark portal azeroth", NextAction::array(0, new NextAction("use dark portal azeroth", 1.0f), nullptr))); - triggers.push_back(new TriggerNode("at dark portal outland", NextAction::array(0, new NextAction("move from dark portal", 1.0f), nullptr))); - triggers.push_back(new TriggerNode("need world buff", NextAction::array(0, new NextAction("world buff", 1.0f), nullptr))); - triggers.push_back(new TriggerNode("vehicle near", NextAction::array(0, new NextAction("enter vehicle", 10.0f), nullptr))); + triggers.push_back(new TriggerNode("timer", NextAction::array(0, new NextAction("check mount state", 1.0f), + // new NextAction("check values", 1.0f), + nullptr))); + // triggers.push_back(new TriggerNode("near dark portal", NextAction::array(0, new NextAction("move to dark portal", 1.0f), nullptr))); + // triggers.push_back(new TriggerNode("at dark portal azeroth", NextAction::array(0, new NextAction("use dark portal azeroth", 1.0f), nullptr))); + // triggers.push_back(new TriggerNode("at dark portal outland", NextAction::array(0, new NextAction("move from dark portal", 1.0f), nullptr))); + // triggers.push_back(new TriggerNode("need world buff", NextAction::array(0, new NextAction("world buff", 1.0f), nullptr))); + // triggers.push_back(new TriggerNode("vehicle near", NextAction::array(0, new NextAction("enter vehicle", 10.0f), nullptr))); } void CollisionStrategy::InitTriggers(std::vector& triggers) diff --git a/src/strategy/values/EnemyPlayerValue.cpp b/src/strategy/values/EnemyPlayerValue.cpp index 7edce1d3..abc579b1 100644 --- a/src/strategy/values/EnemyPlayerValue.cpp +++ b/src/strategy/values/EnemyPlayerValue.cpp @@ -113,8 +113,8 @@ Unit* EnemyPlayerValue::Calculate() continue; if (Unit* pAttacker = pMember->getAttackerForHelper()) - if (bot->IsWithinDist(pAttacker, maxAggroDistance * 2.0f) && bot->IsWithinLOSInMap(pAttacker) && pAttacker != pVictim - && pAttacker->CanSeeOrDetect(bot) && pAttacker->IsPlayer()) + if (pAttacker->IsPlayer() && bot->IsWithinDist(pAttacker, maxAggroDistance * 2.0f) && bot->IsWithinLOSInMap(pAttacker) && pAttacker != pVictim + && pAttacker->CanSeeOrDetect(bot)) return pAttacker; } } diff --git a/src/strategy/values/NearestUnitsValue.cpp b/src/strategy/values/NearestUnitsValue.cpp index 2a0c1d4e..f0880b0d 100644 --- a/src/strategy/values/NearestUnitsValue.cpp +++ b/src/strategy/values/NearestUnitsValue.cpp @@ -13,7 +13,7 @@ GuidVector NearestUnitsValue::Calculate() GuidVector results; for (Unit* unit : targets) { - if ((ignoreLos || bot->IsWithinLOSInMap(unit)) && AcceptUnit(unit)) + if (AcceptUnit(unit) && (ignoreLos || bot->IsWithinLOSInMap(unit))) results.push_back(unit->GetGUID()); } diff --git a/src/strategy/values/PartyMemberToHeal.cpp b/src/strategy/values/PartyMemberToHeal.cpp index 8caa2077..0f76b6e7 100644 --- a/src/strategy/values/PartyMemberToHeal.cpp +++ b/src/strategy/values/PartyMemberToHeal.cpp @@ -74,7 +74,7 @@ bool PartyMemberToHeal::Check(Unit* player) { // return player && player != bot && player->GetMapId() == bot->GetMapId() && player->IsInWorld() && // sServerFacade->GetDistance2d(bot, player) < (player->IsPlayer() && botAI->IsTank((Player*)player) ? 50.0f : 40.0f); - return player && player->GetMapId() == bot->GetMapId() && + return player->GetMapId() == bot->GetMapId() && bot->GetDistance2d(player) < sPlayerbotAIConfig->healDistance * 2 && bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ()); }