mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Cast spell] Arc check only forfacing spell
This commit is contained in:
@@ -2478,9 +2478,8 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
|
|||||||
|
|
||||||
ObjectGuid oldSel = bot->GetSelectedUnit() ? bot->GetSelectedUnit()->GetGUID() : ObjectGuid();
|
ObjectGuid oldSel = bot->GetSelectedUnit() ? bot->GetSelectedUnit()->GetGUID() : ObjectGuid();
|
||||||
bot->SetSelection(target->GetGUID());
|
bot->SetSelection(target->GetGUID());
|
||||||
|
|
||||||
WorldObject* faceTo = target;
|
WorldObject* faceTo = target;
|
||||||
if (!bot->HasInArc(CAST_ANGLE_IN_FRONT, faceTo))
|
if (!bot->HasInArc(CAST_ANGLE_IN_FRONT, faceTo) && (spellInfo->FacingCasterFlags & SPELL_FACING_FLAG_INFRONT))
|
||||||
{
|
{
|
||||||
sServerFacade->SetFacingTo(bot, faceTo);
|
sServerFacade->SetFacingTo(bot, faceTo);
|
||||||
//failWithDelay = true;
|
//failWithDelay = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user