Core/Movement: Fixed possible invalid memory access
Fix typo
Merge pull request #11309 from Lartza/master

DB/SAI: Fix typo
Core/SmartAI: Fixed issue where ranged caster would switch to combat ready state between cast.
Core/AI: Some code cleanup