Exemplo n.º 1
0
 private void VerifyG1OTWithinBounds(LegalityAnalysis data, string str)
 {
     if (StringConverter12.GetIsG1English(str))
     {
         if (str.Length > 7 && !(data.EncounterOriginal is EncounterTrade)) // OT already verified; GER shuckle has 8 chars
         {
             data.AddLine(GetInvalid(LOTLong));
         }
     }
     else if (StringConverter12.GetIsG1Japanese(str))
     {
         if (str.Length > 5)
         {
             data.AddLine(GetInvalid(LOTLong));
         }
     }
     else if (data.pkm.Korean && StringConverter2KOR.GetIsG2Korean(str))
     {
         if (str.Length > 5)
         {
             data.AddLine(GetInvalid(LOTLong));
         }
     }
     else
     {
         data.AddLine(GetInvalid(LG1CharOT));
     }
 }
Exemplo n.º 2
0
        private void VerifyG1NicknameWithinBounds(LegalityAnalysis data, string str)
        {
            var pkm = data.pkm;

            if (StringConverter12.GetIsG1English(str))
            {
                if (str.Length > 10)
                {
                    data.AddLine(GetInvalid(LNickLengthLong));
                }
            }
            else if (StringConverter12.GetIsG1Japanese(str))
            {
                if (str.Length > 5)
                {
                    data.AddLine(GetInvalid(LNickLengthLong));
                }
            }
            else if (pkm.Korean && StringConverter2KOR.GetIsG2Korean(str))
            {
                if (str.Length > 5)
                {
                    data.AddLine(GetInvalid(LNickLengthLong));
                }
            }
            else
            {
                data.AddLine(GetInvalid(LG1CharNick));
            }
        }