コード例 #1
0
        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);
        }
コード例 #2
0
 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));
     }
 }