Example #1
0
 public static void ReadDB(ref DBlist DB)
 {
     DB.Mob_db = LoadDataBase <Dictionary <int, MonsterDB> >("Mob_db.roo");
     if (DB.Mob_db == null)
     {
         DB.Mob_db = new Dictionary <int, MonsterDB>();
     }
     DB.Card_db = LoadDataBase <Dictionary <int, ItemDB> >("Card_db.roo");
     if (DB.Card_db == null)
     {
         DB.Card_db = new Dictionary <int, ItemDB>();
     }
     DB.Enchant_db = LoadDataBase <Dictionary <int, ItemDB> >("Enchant_db.roo");
     if (DB.Enchant_db == null)
     {
         DB.Enchant_db = new Dictionary <int, ItemDB>();
     }
     DB.Gear_db = LoadDataBase <Dictionary <int, ItemDB> >("Gear_db.roo");
     if (DB.Gear_db == null)
     {
         DB.Gear_db = new Dictionary <int, ItemDB>();
     }
     DB.Mob_research_db = LoadDataBase <Dictionary <int, ItemDB> >("Mob_research_db.roo");
     if (DB.Mob_research_db == null)
     {
         DB.Mob_research_db = new Dictionary <int, ItemDB>();
     }
     DB.Dress_style_db = LoadDataBase <Dictionary <int, ItemDB> >("Dress_style_db.roo");
     if (DB.Dress_style_db == null)
     {
         DB.Dress_style_db = new Dictionary <int, ItemDB>();
     }
     DB.Sticker_db = LoadDataBase <Dictionary <int, ItemDB> >("Sticker_db.roo");
     if (DB.Sticker_db == null)
     {
         DB.Sticker_db = new Dictionary <int, ItemDB>();
     }
     DB.Set_Equip_db = LoadDataBase <Dictionary <int, ItemDB> >("Set_Item_db.roo");
     if (DB.Set_Equip_db == null)
     {
         DB.Set_Equip_db = new Dictionary <int, ItemDB>();
     }
     foreach (EQUIP_DB_ENUM db_enum in Enum.GetValues(typeof(EQUIP_DB_ENUM)))
     {
         string name = Enum.GetName(typeof(EQUIP_DB_ENUM), db_enum);
         DB.Equip_db[(int)db_enum] = LoadDataBase <Dictionary <int, ItemDB> >("Equip_" + name + "_db.roo");
         if (DB.Equip_db[(int)db_enum] == null)
         {
             DB.Equip_db[(int)db_enum] = new Dictionary <int, ItemDB>();
         }
     }
 }
Example #2
0
 public static void SaveDataBase(ref DBlist DB)
 {
     SaveDataBase <Dictionary <int, MonsterDB> >(DB.Mob_db, "Mob_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Card_db, "Card_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Enchant_db, "Enchant_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Gear_db, "Gear_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Mob_research_db, "Mob_research_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Dress_style_db, "Dress_style_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Sticker_db, "Sticker_db.roo");
     SaveDataBase <Dictionary <int, ItemDB> >(DB.Set_Equip_db, "Set_Item_db.roo");
     foreach (EQUIP_DB_ENUM db_enum in Enum.GetValues(typeof(EQUIP_DB_ENUM)))
     {
         string name = Enum.GetName(typeof(EQUIP_DB_ENUM), db_enum);
         SaveDataBase <Dictionary <int, ItemDB> >(DB.Equip_db[(int)db_enum], "Equip_" + name + "_db.roo");
     }
 }