Game server: Cleaned up some duplicate resistance logic in Unit::GetACDamage().
Magic system: Fixed/implemented a few player checks to prevent player-specific code from crashing if using an NPC.