Solus changing the person under attack from a stranger to a family member is only moral in terms of knowing the situation. Could it be that if it were a family member you would have an understanding of the roles of the players. That is the key in this: Who is the bad guy, and who is reacting to it?
How much do we need to know?
The clerk is working the counter and the bad guy draws a gun to rob the place while threatening the clerk with death, that threat being implicit in the presence of the drawn gun.
Does it matter that the clerk might be sleeping with the bad guy's mate? Or any other history the two might have?
The means to settle that history is not with an armed robbery.
I would choose to intervene. To me the life of that clerk, as flawed and dark as it might, unbeknownst to me, be is worth the risk of my life.
Others would not take the risk for a stranger, but would for a friend or loved one.
And there are still others, I would assume, who would not take that risk for anyone.
I don't think a personal understanding of the background of a loved one carries as much weight in the decision as the value of the life of the person being threatened has to you.