ammo, pet return

This commit is contained in:
Yunfan Li
2023-05-30 17:10:51 +08:00
parent ffb0b260d3
commit 7f0b5c2f03
6 changed files with 36 additions and 27 deletions

View File

@@ -72,6 +72,7 @@ bool DropTargetAction::Execute(Event event)
context->GetValue<Unit*>("current target")->Set(nullptr);
bot->SetTarget(ObjectGuid::Empty);
bot->SetSelection(ObjectGuid());
botAI->ChangeEngine(BOT_STATE_NON_COMBAT);
botAI->InterruptSpell();
bot->AttackStop();
@@ -84,6 +85,8 @@ bool DropTargetAction::Execute(Event event)
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
pet->GetCharmInfo()->SetIsCommandFollow(true);
pet->AttackStop();
pet->GetCharmInfo()->IsReturning();
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
}
}