static void PopulateEntry(ActionEntry entry, List <SaintCoinach.Text.INode> actionElements) { var dataString = new SaintCoinach.Text.XivString(actionElements.ToArray()).ToString(); PopulateElement(dataString, potencyRegex, out entry.Potency); PopulateElement(dataString, rearPotencyRegex, out entry.RearPotency); PopulateElement(dataString, flankPotencyRegex, out entry.FlankPotency); PopulateElement(dataString, frontPotencyRegex, out entry.FrontPotency); PopulateElement(dataString, comboPotencyRegex, out entry.ComboPotency); PopulateElement(dataString, curePotencyRegex, out entry.CurePotency); PopulateElement(dataString, restoresRegex, out entry.RestorePercentage); }
static void Main(string[] args) { var realm = new SaintCoinach.ARealmReversed(GameDirectory, SaintCoinach.Ex.Language.English); //if (!realm.IsCurrentVersion) //{ // const bool IncludeDataChanges = true; // var updateReport = realm.Update(IncludeDataChanges); //} var entries = new List <ActionEntry>(); var actionElements = new List <SaintCoinach.Text.INode>(); var actSheet = realm.GameData.GetSheet <SaintCoinach.Xiv.Action>(); foreach (var act in actSheet) { if (act.Name == null || act.Name.IsEmpty) { continue; } if (act.ClassJob == null || act.ClassJob.Name == null || act.ClassJob.Name.IsEmpty) { continue; } if (act.AsBoolean("IsPvP")) { continue; } // could do Key == 32 or 33 but this is clearer if (act.ClassJob.ClassJobCategory.Name == "Disciple of the Land" || act.ClassJob.ClassJobCategory.Name == "Disciple of the Hand") { continue; } if (act.ActionCategory.Name != "Ability" && act.ActionCategory.Name != "Auto-attack" && act.ActionCategory.Name != "Spell" && act.ActionCategory.Name != "Weaponskill" && act.ActionCategory.Name != "Limit Break") { continue; } Console.WriteLine($"{act.Key} - {act.Name}"); var entry = new ActionEntry { Id = act.Key, Name = act.Name }; actionElements.Clear(); foreach (var node in act.ActionTransient.Description.Children) { FilterNode(node, actionElements); } PopulateEntry(entry, actionElements); // Console.WriteLine(entry); // this doesn't match the c++ behavior, but it was mentioned that empty skills are pointless... if (!entry.IsEmpty) { entries.Add(entry); } } Console.WriteLine($"Found {entries.Count()} player actions"); OutputCpp(entries, OutputFileName); Console.ReadLine(); }