Used [have_location] for checking target validity as opposed to [have_unit]
Don't use tostring when format expects an integer
Another case of [have_unit] -> [have_location]
Removed more unnecessary tostring usage
Converted use of ipairs to pairs
Fixed part of the Cast Spell menu not being translatable
Parsed loc_filter when setting the cast spell menu item.

This fixes a problem where variables in spell target filters caused the cast menu to not appear