Пример #1
0
        public MasterpieceEngraving(List <Property> properties, World world)
            : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "skill_at_time": SkillAtTime = Convert.ToInt32(property.Value); break;

                case "hfid": Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

                case "entity_id": MakerEntity = world.GetEntity(Convert.ToInt32(property.Value)); break;

                case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break;

                case "maker": if (Maker == null)
                    {
                        Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "maker_entity": if (MakerEntity == null)
                    {
                        MakerEntity = world.GetEntity(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "site": if (Site == null)
                    {
                        Site = world.GetSite(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "skill_rating": SkillAtTime = Convert.ToInt32(property.Value); break;

                case "art_id": ArtId = Convert.ToInt32(property.Value); break;

                case "art_subid": ArtSubId = Convert.ToInt32(property.Value); break;
                }
            }

            Maker.AddEvent(this);
            MakerEntity.AddEvent(this);
            Site.AddEvent(this);
        }
Пример #2
0
        public MasterpieceArch(List <Property> properties, World world)
            : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "skill_at_time": SkillAtTime = property.Value; break;

                case "hfid": Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

                case "entity_id": MakerEntity = world.GetEntity(Convert.ToInt32(property.Value)); break;

                case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break;

                case "maker": if (Maker == null)
                    {
                        Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "maker_entity": if (MakerEntity == null)
                    {
                        MakerEntity = world.GetEntity(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "site": if (Site == null)
                    {
                        Site = world.GetSite(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "building_type": BuildingType = property.Value; break;

                case "building_subtype": BuildingSubType = property.Value; break;

                case "building_custom": BuildingCustom = Convert.ToInt32(property.Value); break;
                }
            }
            Maker.AddEvent(this);
            MakerEntity.AddEvent(this);
            Site.AddEvent(this);
        }
Пример #3
0
        public MasterpieceDye(List <Property> properties, World world)
            : base(properties, world)
        {
            foreach (Property property in properties)
            {
                switch (property.Name)
                {
                case "skill_at_time": SkillAtTime = property.Value; break;

                case "hfid": Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value)); break;

                case "entity_id": MakerEntity = world.GetEntity(Convert.ToInt32(property.Value)); break;

                case "site_id": Site = world.GetSite(Convert.ToInt32(property.Value)); break;

                case "maker": if (Maker == null)
                    {
                        Maker = world.GetHistoricalFigure(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "maker_entity": if (MakerEntity == null)
                    {
                        MakerEntity = world.GetEntity(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "site": if (Site == null)
                    {
                        Site = world.GetSite(Convert.ToInt32(property.Value));
                    }
                    else
                    {
                        property.Known = true;
                    } break;

                case "item_type": ItemType = property.Value.Replace("_", " "); break;

                case "item_subtype": ItemSubType = property.Value.Replace("_", " "); break;

                case "mat": Material = property.Value.Replace("_", " "); break;

                case "mat_type": MaterialType = Convert.ToInt32(property.Value); break;

                case "mat_index": MaterialIndex = Convert.ToInt32(property.Value); break;

                case "dye_mat": DyeMaterial = property.Value.Replace("_", " "); break;

                case "dye_mat_type": DyeMaterialType = Convert.ToInt32(property.Value); break;

                case "dye_mat_index": DyeMaterialIndex = Convert.ToInt32(property.Value); break;
                }
            }
            Maker.AddEvent(this);
            MakerEntity.AddEvent(this);
            Site.AddEvent(this);
        }