Example #1
0
        private static string MainPhpWearKnife(string html)
        {
            var list = new[] { "Малый Разделочный Нож", "Охотничий Нож", "Вороненый Охотничий Нож", "Разделочный Топорик", "Арисайский Охотничий Нож" };

            var ud = new ParsedDressed(html);

            if (!ud.Valid)
            {
                return(null);
            }

            var invList = GetInvList(html);
            var iswear  = ud.IsWearKnife();

            if (!iswear)
            {
                foreach (var thing in invList)
                {
                    for (var j = 0; j < list.Length; j++)
                    {
                        if (thing.Name.IndexOf(list[j], StringComparison.CurrentCultureIgnoreCase) >= 0)
                        {
                            if (!string.IsNullOrEmpty(thing.WearLink))
                            {
                                return(BuildRedirect($"Одеваем {thing.Name}", thing.WearLink));
                            }
                        }
                    }
                }
            }

            AppVars.AutoSkinArmedKnife = false;
            return(null);
        }
Example #2
0
        private static bool MainPhpArmedKinfe(string html)
        {
            var parsedDressed = new ParsedDressed(html);

            if (!parsedDressed.Valid)
            {
                return(false);
            }

            var result = parsedDressed.IsWearKnife();

            return(result);
        }