Exemple #1
0
        // -------------------------------------------------------------------
        // Public
        // -------------------------------------------------------------------
        public GameDataId Get(CharacterRaceType type)
        {
            GameDataId result;

            if (this.typeLookup.TryGetValue(type, out result))
            {
                return(result);
            }

            return(GameDataId.Invalid);
        }
Exemple #2
0
        public ResourceKey GetIcon(CharacterRaceType type, bool getLargeIcon = false)
        {
            ResourceKey result;

            if (getLargeIcon && this.iconLargeLookup.TryGetValue(type, out result))
            {
                return(result);
            }

            if (this.iconSmallLookup.TryGetValue(type, out result))
            {
                return(result);
            }

            return(ResourceKey.Invalid);
        }
Exemple #3
0
        public ClassProvider ByRace(CharacterRaceType race)
        {
            var dataId = GameModules.Instance.LogicCore.RaceProvider.Get(race);

            if (dataId == GameDataId.Invalid)
            {
                this.FilteredList.Clear();
                return(this);
            }

            IList <RuntimeClassData> cache = this.FilteredList.Where(x => x.Races.Contains(dataId)).ToList();

            this.FilteredList.Clear();
            this.FilteredList.AddRange(cache);
            return(this);
        }