[Core] Improve "NPCs gets stuck in melee animation while casting". [c2110]