mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Class spell] Fix attack action for ranged
This commit is contained in:
@@ -110,7 +110,8 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
|
|||||||
context->GetValue<Unit*>("current target")->Set(target);
|
context->GetValue<Unit*>("current target")->Set(target);
|
||||||
context->GetValue<LootObjectStack*>("available loot")->Get()->Add(guid);
|
context->GetValue<LootObjectStack*>("available loot")->Get()->Add(guid);
|
||||||
|
|
||||||
bool attacked = bot->Attack(target, true);
|
bool melee = bot->IsWithinMeleeRange(target) || botAI->IsMelee(bot);
|
||||||
|
bot->Attack(target, melee);
|
||||||
|
|
||||||
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target)) {
|
if (IsMovingAllowed() && !bot->HasInArc(CAST_ANGLE_IN_FRONT, target)) {
|
||||||
sServerFacade->SetFacingTo(bot, target);
|
sServerFacade->SetFacingTo(bot, target);
|
||||||
|
|||||||
Reference in New Issue
Block a user