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 9 additions and 12 deletions

View File

@@ -1017,18 +1017,15 @@ void PlayerbotFactory::ClearSkills()
}
bot->SetUInt32Value(PLAYER_SKILL_INDEX(0), 0);
bot->SetUInt32Value(PLAYER_SKILL_INDEX(1), 0);
// unlearn default race/class skills
if (PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass()))
{
for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr)
{
uint32 skillId = itr->SkillId;
if (!bot->HasSkill(skillId))
continue;
bot->SetSkill(skillId, 0, 0, 0);
}
}
PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass());
for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr)
{
uint32 skillId = itr->SkillId;
if (!bot->HasSkill(skillId))
continue;
bot->SetSkill(skillId, 0, 0, 0);
}
}
void PlayerbotFactory::ClearEverything()

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())
{