public void execute(GameSession gameSession, IByteBuffer buffer) { var request = new HellstormSelectRocketRequest(); request.readCommand(buffer); var ammo = AmmoConverter.AmmoTypeToString(request.rocketType.type); gameSession.Player.RocketLauncher?.ChangeLoad(ammo); }
public void execute(GameSession gameSession, IByteBuffer buffer) { if (gameSession.Player.UsingNewClient) { var cmd = new commands.new_client.requests.ItemSelectionRequest(); cmd.readCommand(buffer); gameSession.Player.Controller.Miscs.UseItem(cmd.itemId); } else { var selectCmd = new commands.old_client.requests.SelectRocketRequest(); selectCmd.readCommand(buffer); var type = selectCmd.type; gameSession.Player.Controller.Miscs.UseItem(AmmoConverter.AmmoTypeToString(type)); } }