mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 10:45:43 +00:00
facing to & reach party member to resurrect
This commit is contained in:
@@ -102,6 +102,10 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
|
||||
context->GetValue<Unit*>("current target")->Set(target);
|
||||
context->GetValue<LootObjectStack*>("available loot")->Get()->Add(guid);
|
||||
|
||||
/* prevent pet dead immediately in group */
|
||||
if (bot->GetGroup() && !target->IsInCombat()) {
|
||||
with_pet = false;
|
||||
}
|
||||
if (Pet* pet = bot->GetPet())
|
||||
{
|
||||
if (with_pet) {
|
||||
@@ -118,8 +122,10 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
|
||||
}
|
||||
}
|
||||
|
||||
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target))
|
||||
bot->SetFacingToObject(target);
|
||||
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target)) {
|
||||
sServerFacade->SetFacingTo(bot, target);
|
||||
}
|
||||
// bot->SetFacingToObject(target);
|
||||
|
||||
bool attacked = bot->Attack(target, true);
|
||||
botAI->ChangeEngine(BOT_STATE_COMBAT);
|
||||
|
||||
Reference in New Issue
Block a user