AI server: target ID's now correctly set when AI must wait on a casting animation; resolves #269.