Loot when moving

This commit is contained in:
Yunfan Li
2024-02-08 01:37:53 +08:00
parent 9e78a0b36a
commit 01b04742b7
3 changed files with 67 additions and 62 deletions

View File

@@ -84,6 +84,11 @@ bool OpenLootAction::DoLoot(LootObject& lootObject)
return true;
}
if (bot->isMoving())
{
bot->StopMoving();
}
if (creature)
{
SkillType skill = creature->GetCreatureTemplate()->GetRequiredLootSkill();
@@ -119,7 +124,7 @@ bool OpenLootAction::DoLoot(LootObject& lootObject)
uint32 spellId = GetOpeningSpell(lootObject);
if (!spellId)
return false;
return botAI->CastSpell(spellId, bot);
}