Пример #1
0
        public CrossGate(Memo memo) : base(memo)
        {
            Actions = new Actions(memo);
            Cheater = new Cheater(memo);
            Player  = new Player(memo);
            Stuffs  = new StuffList(memo);


            Combat     = new Combat(this);
            AutoCure   = new AutoCure(this);
            Contacts   = new ContactList(memo);
            Pets       = new PetList(memo);
            Items      = new ItemList(this);
            AutoFood   = new AutoFood(this);
            AutoNurse  = new AutoNurse(this);
            PetCatch   = new PetCatch(this);
            Producer   = new Producer(this);
            AutoCombat = new AutoCombat(this);
            AutoWalk   = new AutoWalk(this);
            Script     = Script.GetNewTownInstance(this);
            Poster     = new Poster(this);
            AutoChange = new AutoChange(this);

            MoveScript          = new MoveScript(this);
            Cheater.YiDongJiaSu = true;
        }
Пример #2
0
        private IEnumerable <string> GetUpgradeScriptsOnAutoChangeEntities(AutoChange autoChange, DirectoryInfo di)
        {
            var sqlFiles = di.GetFiles("*.sql", SearchOption.AllDirectories).Select(x => x.FullName);

            foreach (var sqlFile in sqlFiles)
            {
                var fileContent = File.ReadAllText(sqlFile);
                fileContent = Regex.Replace(
                    fileContent,
                    string.Format(@"CREATE\s+{0}", autoChange.SqlEntitySyntax),
                    string.Format("GO{0}CREATE OR ALTER {1}", Environment.NewLine, autoChange.SqlEntitySyntax),
                    RegexOptions.IgnoreCase);

                yield return(fileContent);
            }
        }