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

Fix cmangos/issues#379