Sky King never leaves the cockpit no matter what happens in the passenger area. The cockpit door stays closed and locked. If the door is never breached, the pilot lands immediately.
If the door is breached, the armed pilot has an effective means of defense and very likely will retain control of the plane. If in the unlikely event the armed pilot is overwhelmed by the attackers, all they have gained by the pilot being armed is a handgun with very little or no ammo, and their tactical position is little better than if he was unarmed: they have the plane either way. However it is almost certain they will lose at least a few of their number in the attack, perhaps losing the terrorist pilot and thus their ability to use the plane as a weapon. Perhaps at that point any remaining resistance in the passenger area would be strong enough to win.
If he is unarmed and the door is breached he will likely be killed or incapacitated. He will lose control of the plane and it will be used as a weapon or shot down by our people.