Compare commits

..

1 Commits

Author SHA1 Message Date
bash
c191edf280 MoveToTravelTargetAction prevent delay when in combat 2025-08-13 00:54:46 +02:00
2 changed files with 6 additions and 17 deletions

View File

@@ -164,33 +164,22 @@ void PlayerbotFactory::Init()
{
continue;
}
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(gemId);
if (!proto)
{
continue;
}
if (proto->ItemLevel < 60)
{
continue;
}
if (proto->Flags & ITEM_FLAG_UNIQUE_EQUIPPABLE)
{
continue;
}
if (sRandomItemMgr->IsTestItem(gemId))
{
continue;
}
if (!sGemPropertiesStore.LookupEntry(proto->GemProperties))
continue;
if (!proto || !sGemPropertiesStore.LookupEntry(proto->GemProperties))
{
continue;
}
// LOG_INFO("playerbots", "Add {} to enchantment gems", gemId);
enchantGemIdCache.push_back(gemId);
}

View File

@@ -18,7 +18,7 @@ bool MoveToTravelTargetAction::Execute(Event event)
WorldLocation location = *target->getPosition();
Group* group = bot->GetGroup();
if (group && !urand(0, 1) && bot == botAI->GetGroupMaster())
if (group && !urand(0, 1) && bot == botAI->GetGroupMaster() && !bot->IsInCombat())
{
for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
{