/**
         * Contructor.
         *
         * @param sceneDataControl
         *            Parent scene controller
         * @param elementReference
         *            Element reference of the data control structure
         */
        public ElementReferenceDataControl(SceneDataControl sceneDataControl, ElementReference elementReference, int type, int referenceNumber)
        {
            this.sceneDataControl = sceneDataControl;
            this.elementReference = elementReference;
            this.type             = type;
            this.visible          = true;
            if (type == Controller.ITEM_REFERENCE || type == Controller.NPC_REFERENCE)
            {
                this.influenceAreaDataControl = new InfluenceAreaDataControl(sceneDataControl, elementReference.getInfluenceArea(), this);
            }

            // Create subcontrollers
            Dictionary <string, ConditionsController.ConditionContextProperty> context1 = new Dictionary <string, ConditionsController.ConditionContextProperty>();

            ConditionsController.ConditionOwner parent = new ConditionsController.ConditionOwner(Controller.SCENE, sceneDataControl.getId());
            ConditionsController.ConditionOwner owner  = new ConditionsController.ConditionOwner(type, elementReference.getTargetId(), parent);
            context1.Add(ConditionsController.CONDITION_OWNER, owner);

            conditionsController = new ConditionsController(elementReference.getConditions(), context1);
        }