Ejemplo n.º 1
0
 internal TeraData(BasicTeraData basicData, string region)
 {
     Region = basicData.Regions.Single(x => x.Key == region);
     SkillDatabase = new SkillDatabase(Path.Combine(basicData.ResourceDirectory, "user_skills.txt"));
     NpcDatabase = new NpcDatabase(Path.Combine(basicData.ResourceDirectory, "npc.txt"));
     OpCodeNamer = new OpCodeNamer(Path.Combine(basicData.ResourceDirectory, string.Format("opcodes-{0}.txt", Region.Version)));
 }
Ejemplo n.º 2
0
 internal TeraData(BasicTeraData basicData, string region, bool detectBosses)
 {
     string suffix = (basicData.Language=="Auto")?(region != "EU") ? region : "EU-EN": basicData.Language;
     SkillDatabase = new SkillDatabase(basicData.ResourceDirectory,suffix);
     HotDotDatabase = new HotDotDatabase(basicData.ResourceDirectory, suffix);
     NpcDatabase = new NpcDatabase(basicData.ResourceDirectory, suffix, detectBosses);
     //OpCodeNamer = new OpCodeNamer(Path.Combine(basicData.ResourceDirectory, $"opcodes\\opcodes-{region}.txt"));
 }
Ejemplo n.º 3
0
        public PetSkillDatabase(string folder, string language, NpcDatabase npcDatabase)
        {
            StreamReader reader;

            try
            {
                reader = new StreamReader(File.OpenRead(Path.Combine(folder, $"skills\\pets-skills-{language}.tsv")));
            }
            catch
            {
                return;
            }
            while (!reader.EndOfStream)
            {
                var line = reader.ReadLine();
                if (line == null)
                {
                    continue;
                }
                var values = line.Split('\t');

                ushort huntingZoneId = ushort.Parse(values[0]);
                uint   templateId    = uint.Parse(values[1]);
                var    petName       = values[2];
                var    skillId       = (huntingZoneId << 16) + ushort.Parse(values[3]);
                var    skillName     = values[4];
                var    icon          = values[5];
                var    npcinfo       = npcDatabase.GetOrPlaceholder(huntingZoneId, templateId);
                var    skill         = new UserSkill(skillId, new RaceGenderClass(Race.Common, Gender.Common, PlayerClass.Common), skillName, null, string.IsNullOrWhiteSpace(petName) ? npcinfo.Name : petName, icon, npcinfo);
                var    lookup        = Tuple.Create(huntingZoneId, templateId);
                if (!_petSkilldata.ContainsKey(lookup))
                {
                    _petSkilldata[lookup] = new List <UserSkill>();
                }
                _petSkilldata[lookup].Add(skill);
            }
        }
Ejemplo n.º 4
0
 public EntityTracker(NpcDatabase npcDatabase)
 {
     _npcDatabase = npcDatabase;
 }
Ejemplo n.º 5
0
 public EntityTracker(NpcDatabase npcDatabase, UserLogoTracker userLogoTracker = null)
 {
     _npcDatabase     = npcDatabase;
     _userLogoTracker = userLogoTracker;
 }