A good old fashioned drug deal gone bad.
So what law would have prevented this?
Banning guns from bars? Considering all of the shooters were already criminals engaged in a criminal act, who were prohibited from not only carrying a firearm, but possessing one as well, I doubt they would respect a law respect a law banning on guns in bars anymore than they would respect the law that prohibits them from owning or carrying a gun.
Banning private sales aka closing the gun show "loophole"? Considering these guys can find illegal drugs to buy and sell, I seriously doubt they'd have much trouble finding guns at some place other than a gun show or the classified ads. The same goes for licensing and gun registration.
Assault weapons ban? It might have reduced the number of shots fired between the two of them, but it wouldn't have prevented the shooting.
Safe storage law? Only if their guns were stolen.
What would work? How about keeping criminals off the street? The shooters were previous "guests of the state", so why not make them very long term "guests"? The best solution for criminal recidivism is to not let them out so soon and so often.