If you cast a spell and it gets interupted, you won't get charged mana, but if you cast a spell and the lightning bolt hits a dead corpse cos your target dies straight after casting it, then you will get charged mana for it.