示例#1
0
            public override void Process(CmdTrigger <ToolCmdArgs> trigger)
            {
                var mod = trigger.Text.NextModifiers();

                if (mod == "e")
                {
                    WCellEnumWriter.WriteAllEnums();
                }
                else if (!mod.Contains("f") && VersionUpdater.WoWFile.Version <= WCellInfo.RequiredVersion)
                {
                    trigger.Reply("WCell does already have the same or higher version as the given client: " +
                                  WCellInfo.RequiredVersion);
                    trigger.Reply("Use the -f switch (force) to update again.");
                }
                else
                {
                    var dumpDBCs = !trigger.Text.HasNext || trigger.Text.NextBool();
                    trigger.Reply("Updating changes for client: {0} ...", VersionUpdater.WoWFile);
                    if (dumpDBCs)
                    {
                        trigger.Reply("Dumping DBC files...");
                        DBCTool.Dump(ToolConfig.WoWDir, true, false);
                    }
                    VersionUpdater.DoUpdate();
                    trigger.Reply("Done.");
                }
            }
示例#2
0
            public override void Process(CmdTrigger <ToolCmdArgs> trigger)
            {
                var    mod = trigger.Text.NextModifiers();
                string dir;

                if (mod == "a")
                {
                    dir = DBCTool.FindWowDir(null);
                }
                else
                {
                    dir = Path.GetFullPath(trigger.Text.Remainder);
                    if (trigger.Text.Remainder.EndsWith(".exe"))
                    {
                        dir = Path.GetDirectoryName(dir);
                    }
                }

                if (!Directory.Exists(dir))
                {
                    trigger.Reply("Directory does not exist: " + dir);
                }
                else
                {
                    ToolConfig.WoWDir = dir;
                    ToolConfig.Instance.Save();
                    VersionUpdater.SetWowDir(ToolConfig.WoWFileLocation);
                    trigger.Reply("Selected client: {0}", VersionUpdater.WoWFile);
                }
            }