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,10 +1017,8 @@ void PlayerbotFactory::ClearSkills()
} }
bot->SetUInt32Value(PLAYER_SKILL_INDEX(0), 0); bot->SetUInt32Value(PLAYER_SKILL_INDEX(0), 0);
bot->SetUInt32Value(PLAYER_SKILL_INDEX(1), 0); bot->SetUInt32Value(PLAYER_SKILL_INDEX(1), 0);
// unlearn default race/class skills // unlearn default race/class skills
if (PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass())) PlayerInfo const* info = sObjectMgr->GetPlayerInfo(bot->getRace(), bot->getClass());
{
for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr) for (PlayerCreateInfoSkills::const_iterator itr = info->skills.begin(); itr != info->skills.end(); ++itr)
{ {
uint32 skillId = itr->SkillId; uint32 skillId = itr->SkillId;
@@ -1029,7 +1027,6 @@ void PlayerbotFactory::ClearSkills()
bot->SetSkill(skillId, 0, 0, 0); bot->SetSkill(skillId, 0, 0, 0);
} }
} }
}
void PlayerbotFactory::ClearEverything() void PlayerbotFactory::ClearEverything()
{ {

View File

@@ -18,7 +18,7 @@ bool MoveToTravelTargetAction::Execute(Event event)
WorldLocation location = *target->getPosition(); WorldLocation location = *target->getPosition();
Group* group = bot->GetGroup(); 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()) for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next())
{ {