Skip to content

Commit

Permalink
Use item action only stop movement on casting item spells
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed May 28, 2024
1 parent 9c5267f commit e440df4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion playerbot/strategy/actions/UseItemAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ bool UseAction::UseItemInternal(Player* requester, uint32 itemId, Unit* unit, Ga
itemUsed->SetUsedInSpell(true);
}

if (sServerFacade.isMoving(bot))
// Stop the movement for casted items
const bool isCastedSpell = spell->GetCastedTime() > 0 || IsChanneledSpell(spellInfo);
if (isCastedSpell)
{
ai->StopMoving();
}
Expand Down

0 comments on commit e440df4

Please sign in to comment.