Core/SmartAI: Fixed issue where ranged caster would switch to combat ready state between cast.
Core/AI: Some code cleanup
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into ghbb