This is for a game I’m developing.
I have a MySQL table with each player entity that contains the id of the weapon they hold in each hand for example:
player id, playername, rhand, lhand,
1 Guy 1 2
2 OtherGuy 3 2
and I have an items table containing information about each item by id
item name damage_type
1 hammer crush
2 shield none
3 sword slash
when resolving combat on my server I search for each player by id one is the attacker and one is the defender I would like to return a result with each players weapon name and perhaps a property of the weapon (i.e. damage_type above) on the same line so I’d like results like this
player id playername rhand lhand rhand_damage_type lhand_damage_type
1 Guy hammer shield crush none
2 OtherGuy sword shield slash none
In case the plyers might also miss one or both weapons: