Exemplo n.º 1
0
 /// <summary>
 /// The class constructor.
 /// </summary>
 static Export()
 {
     // Initialize all of the Object Types in order of Export Priority.
     ObjectData.Create("buildingID", "gb", "_.CreateGarrisonBuilding", "f", "spellID");
     ObjectData.Create <ToyData>("isToy", "toy", "_.CreateToy", "f", "spellID");
     ObjectData.Create <ToyData>("toyID", "toy", "_.CreateToy", "f", "spellID");
     ObjectData.Create("mountID", "mnt", "_.CreateMount", "f", "spellID");
     ObjectData.Create("speciesID", "p", "_.CreateSpecies", "f", "spellID");
     ObjectData.Create("musicRollID", "mr", "_.CreateMusicRoll", "f", "spellID");
     ObjectData.Create("instanceID", "inst", "_.CreateInstance", "f");
     ObjectData.Create("artifactID", "artifact", "_.CreateArtifact", "f");
     ObjectData.Create <HeirloomData>("heirloomID", "heir", "_.CreateHeirloom");
     ObjectData.Create("holidayID", "ho", "_.CreateHoliday", "f");
     ObjectData.Create <ItemSourceData>("s", "s", "_.CreateItemSource");
     ObjectData.Create("categoryID", "cat", "_.CreateCategory", "f");
     ObjectData.Create("classID", "cl", "_.CreateCharacterClass", "f");
     ObjectData.Create("criteriaID", "crit", "_.CreateAchievementCriteria", "f");
     ObjectData.Create("difficultyID", "d", "_.CreateDifficulty", "f");
     ObjectData.Create <EncounterData>("encounterID", "e", "_.CreateEncounter", "f");
     ObjectData.Create("flightPathID", "fp", "_.CreateFlightPath", "f");
     ObjectData.Create <NPCData>("npcID", "n", "_.CreateNPC", "f");
     ObjectData.Create("objectID", "o", "_.CreateObject", "f");
     ObjectData.Create("petAbilityID", "pa", "_.CreatePetAbility", "f");
     ObjectData.Create("petTypeID", "pt", "_.CreatePetType", "f");
     ObjectData.Create("followerID", "follower", "_.CreateFollower", "f");
     ObjectData.Create("missionID", "gm", "_.CreateGarrisonMission", "f");
     ObjectData.Create("talentID", "gt", "_.CreateGarrisonTalent", "f");
     ObjectData.Create("mapID", "m", "_.CreateMap", "f");
     ObjectData.Create("illusionID", "ill", "_.CreateIllusion", "f", "spellID");
     ObjectData.Create("recipeID", "r", "_.CreateRecipe", "f", "spellID");
     ObjectData.Create("spellID", "sp", "_.CreateSpell");
     ObjectData.Create("setID", "gs", "_.CreateGearSet", "f");
     ObjectData.Create("setHeaderID", "gsh", "_.CreateGearSetHeader", "f");
     ObjectData.Create("setSubHeaderID", "gssh", "_.CreateGearSetSubHeader", "f");
     ObjectData.Create("titleID", "title", "_.CreateTitle", "f");
     ObjectData.Create("currencyID", "cu", "_.CreateCurrencyClass", "f");
     ObjectData.Create("azeriteEssenceID", "aze", "_.CreateAzeriteEssence", "f");
     ObjectData.Create <ItemData>("itemID", "i", "_.CreateItem", "f");
     ObjectData.Create("factionID", "faction", "_.CreateFaction", "f");
     ObjectData.Create <QuestData>("questID", "q", "_.CreateQuest", "f");
     ObjectData.Create("achID", "ach", "_.CreateAchievement", "f");
     ObjectData.Create("tierID", "t", "_.CreateTier", "f");
     ObjectData.Create("professionID", "prof", "_.CreateProfession", "requireSkill");
     ObjectData.Create("vignetteID", "v", "_.CreateVignette", "f");
     ObjectData.Create <NPCData>("creatureID", "n", "_.CreateNPC", "f");
     ObjectData.Create("f", "flt", "_.CreateFilter");
 }
Exemplo n.º 2
0
        public void ReadData()
        {
            Console.WriteLine(DateTime.Now.ToString("HH:mm:ss tt"));


            var props = GetProperties();

            GC.Collect();

            Console.Write("Чтение данных:     [");
            mapInfo.Cycle(table, (it) =>
            {
                //var doc = mapInfo.Eval(table.Name + @".VRI_DOC");
                var cadNum       = mapInfo.Eval(table.Name + @".CAD_NUM");
                var areaAsString = mapInfo.Eval(@"Int( Area( " + table.Name + @".Obj, ""sq m"") )");
                var area         = Convert.ToInt32(areaAsString);
                var lo           = mapInfo.Eval(table.Name + @".lo_lvl");
                var lo_lvl       = (lo == "true") ? true : false;
                var mid          = mapInfo.Eval(table.Name + @".mid_lvl");
                var mid_lvl      = (mid == "true") ? true : false;
                var hi           = mapInfo.Eval(table.Name + @".hi_lvl");
                var hi_lvl       = (hi == "true") ? true : false;
                var klass        = mapInfo.Eval(table.Name + @".VRI_KLASSI");

                var doc = props.FirstOrDefault(p => p.CadNum.Equals(cadNum)).VriDoc;



                tableData.Add(ObjectData.Create(new InputData(doc, area, "", lo_lvl, mid_lvl, hi_lvl, klass), it + 1, cadNum));

                if (it % (table.Lenght / 20) == 0)
                {
                    Console.Write(".");
                }
            });

            Console.WriteLine("]    OK");
            Console.WriteLine(DateTime.Now.ToString("HH:mm:ss tt"));
        }