[Cast spell] Arc check only forfacing spell

This commit is contained in:
Yunfan Li
2024-04-19 12:11:46 +08:00
parent 7e4449b4fa
commit 32f787b2aa

View File

@@ -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;