Ejemplo n.º 1
0
        private static void InitDb(uint serverId)
        {
            var server = BasicTeraData.Instance.Servers.GetServer(serverId);

            Region = server.Region;
            var td   = new TeraData(Region);
            var lang = td.GetLanguage(Region);

            //if (TimeManager.Instance.CurrentRegion != Region)
            //{
            TimeManager.Instance.SetServerTimeZone(lang);
            SettingsManager.LastRegion = lang;
            //}
            TimeManager.Instance.SetGuildBamTime(false);

            EntitiesManager.CurrentDatabase = new MonsterDatabase(lang);
            ItemsDatabase.Reload(lang);
            AbnormalityManager.CurrentDb = new AbnormalityDatabase(lang);
            SocialDatabase.Load();
            SystemMessages.Load();
            GuildQuestDatabase.Load();
            AccountBenefitDatabase.Load();
            AchievementDatabase.Load();
            AchievementGradeDatabase.Load();
            MapDatabase.Load();
            QuestDatabase.Load();
        }
Ejemplo n.º 2
0
    public static void LoadMap()
    {
        maps.Clear();
        userMaps.Clear();
        string      path   = Application.persistentDataPath + "/Xml/Map.Xml";
        MapDatabase md     = null;
        MapDatabase userMd = null;

        if (System.IO.File.Exists(path))
        {
            md     = MapDatabase.Load();
            userMd = MapDatabase.LoadUser();
        }
        else
        {
            md     = MapDatabase.InitSetting();
            userMd = MapDatabase.LoadUser();
        }
        if (md != null)
        {
            foreach (Map map in md.maps)
            {
                maps.Add(map);
            }
        }
        if (userMd != null)
        {
            foreach (Map map in userMd.maps)
            {
                userMaps.Add(map);
            }
        }
        if (maps != null && userMaps != null)
        {
            Debugging.LogSystem("MapDatabase is loaded Succesfully.");
        }
    }