Пример #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 static string GetSpellLineName(Spell spell)
        {
            var name = spell.Name;

            if (spell.Talent != null)
            {
                name = spell.Ability.Skill.Name + name;
            }

            var clss = spell.ClassId;

            if (clss == 0)
            {
                var ids = spell.Ability.ClassMask.GetIds();
                if (ids.Length == 1)
                {
                    clss = ids.First();
                }
            }
            if (clss == ClassId.PetTalents && spell.Talent != null)
            {
                name = "HunterPet" + name;
            }
            else
            {
                name = spell.ClassId + name;
            }

            return(WCellEnumWriter.BeautifyName(name));
        }
Пример #3
0
        /// <summary>
        /// WARNING: This re-generates code-files to comply with the current client-version
        /// </summary>
        public static void DoUpdate()
        {
            ExtractUpdateFields();
            ExtractSpellFailures();

            WCellEnumWriter.WriteAllEnums();
            WriteWCellInfo();
        }
Пример #4
0
        public static void WriteSpellLines(string outputFileName)
        {
            WCellEnumWriter.WriteSpellLinesEnum();

            using (writer = new CodeFileWriter(outputFileName, "WCell.RealmServer.Spells", "SpellLines", "static partial class", "",
                                               "WCell.Constants",
                                               "WCell.Constants.Spells"))
            {
                writer.WriteMethod("private", "static void", "SetupSpellLines", "", WriteSpellLinesMethod);
            }
        }
Пример #5
0
        /// <summary>
        /// WARNING: This re-generates code-files to comply with the current client-version
        /// </summary>
        public static void DoUpdate()
        {
            RealmServerConfiguration.DBCFolderName = "dbc" + WoWFile.Version.BasicString;
            WriteWCellInfo();
            ExtractUpdateFields();
            ExtractSpellFailures();

            WCellEnumWriter.WriteAllEnums();
            SpellLineWriter.WriteSpellLines();

            Instances.WriteInstanceStubs();
        }