public byte[] write()
        {
            var cmd = new ByteArray(ID);

            cmd.AddBytes(type.write());
            cmd.Double(amount);
            return(cmd.Message.ToArray());
        }
        public static Command write(int attackerId, int targetId, bool hit, int currentLoad, AmmunitionTypeModule rocketType)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(attackerId);
            cmd.Integer(targetId);
            cmd.Boolean(hit);
            cmd.Integer(currentLoad);
            cmd.AddBytes(rocketType.write());
            return(new Command(cmd.ToByteArray(), false));
        }
Ejemplo n.º 3
0
        public static Command write(List <int> equippedLauncherTypes, AmmunitionTypeModule rocketType, int currentLoad)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(equippedLauncherTypes.Count);
            foreach (var type in equippedLauncherTypes)
            {
                cmd.Integer(type);
            }
            cmd.AddBytes(rocketType.write());
            cmd.Integer(currentLoad);
            return(new Command(cmd.ToByteArray(), false));
        }