public bool GetSkillFromId(uint id, Class c, CooldownType t, out Skill sk)
        {
            sk = new Skill(0, Class.None, "", "");
            switch (t)
            {
            case CooldownType.Skill:
                if (!Game.DB !.SkillsDatabase.TryGetSkill(id, c, out sk))
                {
                    return(false);
                }
                break;

            case CooldownType.Item:
                if (!Game.DB !.ItemsDatabase.TryGetItemSkill(id, out sk))
                {
                    return(false);
                }
                break;

            case CooldownType.Passive:
                if (!Game.DB !.AbnormalityDatabase.TryGetPassiveSkill(id, out sk))
                {
                    return(false);
                }
                break;
            }

            return(true);
        }
Пример #2
0
 public TccDatabase(string lang)
 {
     MonsterDatabase          = new MonsterDatabase(lang);
     AccountBenefitDatabase   = new AccountBenefitDatabase(lang);
     ItemsDatabase            = new ItemsDatabase(lang);
     ItemExpDatabase          = new ItemExpDatabase(lang);
     SkillsDatabase           = new SkillsDatabase(lang);
     AbnormalityDatabase      = new AbnormalityDatabase(lang);
     DungeonDatabase          = new DungeonDatabase(lang);
     SocialDatabase           = new SocialDatabase(lang);
     SystemMessagesDatabase   = new SystemMessagesDatabase(lang);
     GuildQuestDatabase       = new GuildQuestDatabase(lang);
     AchievementDatabase      = new AchievementDatabase(lang);
     AchievementGradeDatabase = new AchievementGradeDatabase(lang);
     MapDatabase     = new MapDatabase(lang);
     RegionsDatabase = new RegionsDatabase(lang);
     QuestDatabase   = new QuestDatabase(lang);
 }
Пример #3
0
 public TccDatabase(string lang)
 {
     Language       = lang;
     ServerDatabase = new ServerDatabase(App.DataPath, Path.Combine(App.ResourcesPath, "config/server-overrides.txt"))
     {
         Language = (LangEnum)Enum.Parse(typeof(LangEnum), lang.Replace("EU-", ""))
     };
     MonsterDatabase          = new MonsterDatabase(lang);
     AccountBenefitDatabase   = new AccountBenefitDatabase(lang);
     ItemsDatabase            = new ItemsDatabase(lang);
     ItemExpDatabase          = new ItemExpDatabase(lang);
     SkillsDatabase           = new SkillsDatabase(lang);
     AbnormalityDatabase      = new AbnormalityDatabase(lang);
     DungeonDatabase          = new DungeonDatabase(lang);
     SocialDatabase           = new SocialDatabase(lang);
     SystemMessagesDatabase   = new SystemMessagesDatabase(lang);
     GuildQuestDatabase       = new GuildQuestDatabase(lang);
     AchievementDatabase      = new AchievementDatabase(lang);
     AchievementGradeDatabase = new AchievementGradeDatabase(lang);
     MapDatabase     = new MapDatabase(lang);
     RegionsDatabase = new RegionsDatabase(lang);
     QuestDatabase   = new QuestDatabase(lang);
 }