public UserViewModel(UserView userView, tblUserData user)
 {
     recipe        = new tblRecipe();
     this.userView = userView;
     RecipesData   = new RecipesData();
     this.user     = user;
 }
コード例 #2
0
        public void Init()
        {
            CharacterData = new CharacterData(GetPath(Path.Combine("Character", "CharacterConfig")));
            _log.Info("Loaded CharacterConfig...");

            ItemsData = new ItemsData(GetPath(Path.Combine("Game", "ItemList.bin")));
            _log.Info("Loaded {0} items.", ItemsData.Count);

            MnData = new MnData(GetPath(Path.Combine("Game", "MN.bin")));
            _log.Info("Loaded {0} monster names.", MnData.Count);

            NpcData = new NpcData(GetPath("Npcs", false));
            _log.Info("Loaded {0} npcs.", NpcData.Count);

            MobData = new MobData(GetPath("Mobs", false));
            _log.Info("Loaded {0} mobs.", MobData.Count);

            QuestData = new QuestData(GetPath(Path.Combine("Game", "Quest.bin")));
            _log.Info("Loaded {0} quests.", QuestData.Count);

            SkillData = new SkillDataData(GetPath(Path.Combine("Game", "SkillData.bin")));
            _log.Info("Loaded {0} skills.", SkillData.Count);

            using (var connection = DatabaseManager.Instance.GetConnection())
            {
                ConvertCoreData = new ConvertCoreData(connection);
                _log.Info("Loaded {0} core converts.", ConvertCoreData.Count);

                GearCoresData = new GearCoresData(connection);
                _log.Info("Loaded {0} core upgrades.", GearCoresData.Count);

                ExpData = new ExpData(connection);
                _log.Info("Loaded {0} levels.", ExpData.Count);

                PranExpData = new ExpData(connection, true);
                _log.Info("Loaded {0} pran levels.", PranExpData.Count);

                MakeItemsData = new MakeItemsData(connection);
                _log.Info("Loaded {0} make items.", MakeItemsData.Count);

                MapsData = new MapsData(connection);
                _log.Info("Loaded {0} maps.", MapsData.Count);

                RecipesData = new RecipesData(connection);
                _log.Info("Loaded {0} recipes.", RecipesData.Count);

                ReinforceAData = new ReinforceAData(connection);
                ReinforceWData = new ReinforceWData(connection);
                _log.Info("Loaded {0} reinforce values.", ReinforceAData.Count + ReinforceWData.Count);

                SetsData = new SetsData(connection);
                _log.Info("Loaded {0} sets.", SetsData.Count);

                TitlesData = new TitlesData(connection);
                _log.Info("Loaded {0} titles.", TitlesData.Count);
            }
        }
コード例 #3
0
    public static void SaveRecipes(RecipesArrays recipe)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/recipe.arrays";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        RecipesData data = new RecipesData(recipe);

        formatter.Serialize(stream, data);
        stream.Close();
    }
コード例 #4
0
    public static RecipesData LoadCaprices()
    {
        string path = Application.persistentDataPath + "/recipe.caprice";

        if (File.Exists(path))
        {
            BinaryFormatter formatter = new BinaryFormatter();
            FileStream      stream    = new FileStream(path, FileMode.Open);

            RecipesData data = formatter.Deserialize(stream) as RecipesData;
            stream.Close();

            return(data);
        }
        else
        {
            Debug.LogError("Save file not found in " + path);
            return(null);
        }
    }
コード例 #5
0
 public AdminViewModel(AdminView adminView)
 {
     this.adminView = adminView;
     RecipesData    = new RecipesData();
 }