Beispiel #1
0
        public void AddOrUpdateDigimonType(DigimonType type, bool isKorean)
        {
            DigimonType ordinal = DigimonTypes.FirstOrDefault(e => e.Code == type.Code);

            if (ordinal == null)
            {
                if (isKorean)
                {
                    type.NameKorean = type.Name;
                    type.SearchKDMO = PrepareDigimonSearch(type.Name);
                }
                else
                {
                    type.SearchGDMO = PrepareDigimonSearch(type.Name);
                }
                DigimonTypes.Add(type);
                return;
            }

            if (isKorean)
            {
                ordinal.NameKorean = type.Name;
                ordinal.SearchKDMO = PrepareDigimonSearch(type.Name);
            }
            else
            {
                ordinal.SearchGDMO = PrepareDigimonSearch(type.Name);
            }
        }
Beispiel #2
0
 public DigimonType FindDigimonTypeBySearchKDMO(string search)
 {
     return(DigimonTypes.FirstOrDefault(e => e.SearchKDMO == search));
 }
Beispiel #3
0
 public DigimonType FindDigimonTypeByCode(int code)
 {
     return(DigimonTypes.FirstOrDefault(e => e.Code == code));
 }