Ejemplo n.º 1
0
        public HistoricalEventRelationShip(List <Property> properties, World world) : base(properties, world)
        {
            Type      = "historical event relationship";
            Seconds72 = -1;
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "event":
                    Id = Convert.ToInt32(property.Value);
                    break;

                case "source_hf":
                    SourceHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    break;

                case "target_hf":
                    TargetHf = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    break;

                case "year":
                    Year = Convert.ToInt32(property.Value);
                    break;

                case "relationship":
                    RelationshipType = VagueRelationship.GetVagueRelationshipTypeByProperty(property, property.Value);
                    break;
                }
            }

            SourceHf.AddEvent(this);
            TargetHf.AddEvent(this);
        }