From af8451eec60e0f36ab31f98a081190c6a088c47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Sejkora?= Date: Sat, 4 Jun 2022 23:28:04 +0200 Subject: [PATCH] Remove Rotation Comparison This is clearly not happening, not enough time. It lives on in the git history in case there's any attempts at revival in the future. --- README.md | 10 - RotationComparison/GW2Api/ApiApiDataSource.cs | 14 - .../GW2Api/FileApiDataSource.cs | 20 -- RotationComparison/GW2Api/IApiDataSource.cs | 10 - RotationComparison/GW2Api/V2/ApiSkill.cs | 25 -- .../GW2Api/V2/ApiSkillRepository.cs | 46 --- RotationComparison/JsonModel/JsonRotation.cs | 18 - .../Logs/EliteInsightsUrlLogSource.cs | 37 -- RotationComparison/Logs/FileLogSource.cs | 36 -- RotationComparison/Logs/ILogSource.cs | 13 - .../Logs/ScratchParserLogSource.cs | 95 ----- RotationComparison/Logs/StreamLogSource.cs | 51 --- RotationComparison/Program.cs | 170 --------- RotationComparison/RotationComparison.csproj | 17 - .../RotationComparisonGenerator.cs | 297 ---------------- RotationComparison/Rotations/PlayerData.cs | 18 - RotationComparison/Rotations/Rotation.cs | 23 -- RotationComparison/Rotations/RotationItem.cs | 10 - .../Rotations/RotationItemType.cs | 9 - RotationComparison/Rotations/SkillCast.cs | 21 -- RotationComparison/Rotations/SkillCastType.cs | 10 - RotationComparison/Rotations/WeaponSwap.cs | 18 - RotationComparison/Statistics/GW2ApiData.cs | 330 ------------------ .../Statistics/IRotationCalculator.cs | 10 - .../Statistics/RotationCalculator.cs | 142 -------- .../Statistics/RotationItems/RotationItem.cs | 12 - .../Statistics/RotationItems/SkillCastItem.cs | 20 -- .../Statistics/RotationItems/SkillCastType.cs | 9 - .../RotationItems/TemporaryStatus.cs | 8 - .../RotationItems/TemporaryStatusItem.cs | 14 - .../RotationItems/WeaponSwapItem.cs | 14 - .../Statistics/ScratchPlayerRotation.cs | 19 - ScratchEVTCParser.sln | 11 - 33 files changed, 1557 deletions(-) delete mode 100644 RotationComparison/GW2Api/ApiApiDataSource.cs delete mode 100644 RotationComparison/GW2Api/FileApiDataSource.cs delete mode 100644 RotationComparison/GW2Api/IApiDataSource.cs delete mode 100644 RotationComparison/GW2Api/V2/ApiSkill.cs delete mode 100644 RotationComparison/GW2Api/V2/ApiSkillRepository.cs delete mode 100644 RotationComparison/JsonModel/JsonRotation.cs delete mode 100644 RotationComparison/Logs/EliteInsightsUrlLogSource.cs delete mode 100644 RotationComparison/Logs/FileLogSource.cs delete mode 100644 RotationComparison/Logs/ILogSource.cs delete mode 100644 RotationComparison/Logs/ScratchParserLogSource.cs delete mode 100644 RotationComparison/Logs/StreamLogSource.cs delete mode 100644 RotationComparison/Program.cs delete mode 100644 RotationComparison/RotationComparison.csproj delete mode 100644 RotationComparison/RotationComparisonGenerator.cs delete mode 100644 RotationComparison/Rotations/PlayerData.cs delete mode 100644 RotationComparison/Rotations/Rotation.cs delete mode 100644 RotationComparison/Rotations/RotationItem.cs delete mode 100644 RotationComparison/Rotations/RotationItemType.cs delete mode 100644 RotationComparison/Rotations/SkillCast.cs delete mode 100644 RotationComparison/Rotations/SkillCastType.cs delete mode 100644 RotationComparison/Rotations/WeaponSwap.cs delete mode 100644 RotationComparison/Statistics/GW2ApiData.cs delete mode 100644 RotationComparison/Statistics/IRotationCalculator.cs delete mode 100644 RotationComparison/Statistics/RotationCalculator.cs delete mode 100644 RotationComparison/Statistics/RotationItems/RotationItem.cs delete mode 100644 RotationComparison/Statistics/RotationItems/SkillCastItem.cs delete mode 100644 RotationComparison/Statistics/RotationItems/SkillCastType.cs delete mode 100644 RotationComparison/Statistics/RotationItems/TemporaryStatus.cs delete mode 100644 RotationComparison/Statistics/RotationItems/TemporaryStatusItem.cs delete mode 100644 RotationComparison/Statistics/RotationItems/WeaponSwapItem.cs delete mode 100644 RotationComparison/Statistics/ScratchPlayerRotation.cs diff --git a/README.md b/README.md index 5689d5a1..df58b50e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ This repository hosts multiple programs for analysis and management of EVTC logs #### Programs - [arcdps Log Manager](#arcdps-log-manager) - [EVTC Inspector](#evtc-inspector) - - [Rotation Comparison](#rotation-comparison) #### Libraries - [GW2Scratch.EVTCAnalytics](#evtc-analytics) @@ -34,15 +33,6 @@ A program for exploring EVTC logs. Handy when developing anything that analyzes - browse through processed events, with filtering - browse through agents and events they are involved in -## [Rotation Comparison](RotationComparison) -Rotation Comparison is a generator of HTML comparisons of rotations. -Can be used to see where you differ from a benchmark, see the rotation of -a whole squad on a boss at once and similar. - -- compare logs in EVTC files -- compare generated EI reports (such as hosted on dps.report) -- generates a HTML report - ## [EVTC Analytics](EVTCAnalytics) The core library for parsing and analyzing EVTC logs. Built with integration in other projects in mind. Currently has a somewhat API, changes are to be expected. diff --git a/RotationComparison/GW2Api/ApiApiDataSource.cs b/RotationComparison/GW2Api/ApiApiDataSource.cs deleted file mode 100644 index 55cfc08d..00000000 --- a/RotationComparison/GW2Api/ApiApiDataSource.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Threading.Tasks; -using GW2Scratch.RotationComparison.GW2Api.V2; -using GW2Scratch.RotationComparison.Statistics; - -namespace GW2Scratch.RotationComparison.GW2Api -{ - public class ApiApiDataSource : IApiDataSource - { - public Task GetApiDataAsync() - { - return GW2ApiData.LoadFromApiAsync(new ApiSkillRepository()); - } - } -} \ No newline at end of file diff --git a/RotationComparison/GW2Api/FileApiDataSource.cs b/RotationComparison/GW2Api/FileApiDataSource.cs deleted file mode 100644 index 5be43264..00000000 --- a/RotationComparison/GW2Api/FileApiDataSource.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Threading.Tasks; -using GW2Scratch.RotationComparison.Statistics; - -namespace GW2Scratch.RotationComparison.GW2Api -{ - public class FileApiDataSource : IApiDataSource - { - private readonly string filename; - - public FileApiDataSource(string filename) - { - this.filename = filename; - } - - public Task GetApiDataAsync() - { - return GW2ApiData.LoadFromFileAsync(filename); - } - } -} \ No newline at end of file diff --git a/RotationComparison/GW2Api/IApiDataSource.cs b/RotationComparison/GW2Api/IApiDataSource.cs deleted file mode 100644 index a163df76..00000000 --- a/RotationComparison/GW2Api/IApiDataSource.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Threading.Tasks; -using GW2Scratch.RotationComparison.Statistics; - -namespace GW2Scratch.RotationComparison.GW2Api -{ - public interface IApiDataSource - { - Task GetApiDataAsync(); - } -} \ No newline at end of file diff --git a/RotationComparison/GW2Api/V2/ApiSkill.cs b/RotationComparison/GW2Api/V2/ApiSkill.cs deleted file mode 100644 index b543a2dd..00000000 --- a/RotationComparison/GW2Api/V2/ApiSkill.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; - -namespace GW2Scratch.RotationComparison.GW2Api.V2 -{ - public class ApiSkill - { - public int Id { get; set; } - public string Name { get; set; } - public string Description { get; set; } // Optional - public string Icon { get; set; } - public string ChatLink { get; set; } - public string Type { get; set; } // Optional - public string WeaponType { get; set; } // Optional - public List Professions { get; set; } - public string Slot { get; set; } - public List Categories { get; set; } // Optional - public string Attunement { get; set; } // Optional - public string DualWield { get; set; } // Optional - public int PrevChain { get; set; } // Optional - public int NextChain { get; set; } // Optional - - // Ignored fields: facts, traited_facts, cost, flip_skill, initiative, - // transform_skills, bundle_skills, toolbelt_skill - } -} \ No newline at end of file diff --git a/RotationComparison/GW2Api/V2/ApiSkillRepository.cs b/RotationComparison/GW2Api/V2/ApiSkillRepository.cs deleted file mode 100644 index 362f956a..00000000 --- a/RotationComparison/GW2Api/V2/ApiSkillRepository.cs +++ /dev/null @@ -1,46 +0,0 @@ -using RestSharp; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace GW2Scratch.RotationComparison.GW2Api.V2 -{ - public class ApiSkillRepository - { - public async Task> GetAllApiSkills() - { - var client = new RestClient("https://api.guildwars2.com/"); - - var firstRequest = new RestRequest("v2/skills"); - firstRequest.AddQueryParameter("page", "0"); - firstRequest.AddQueryParameter("page_size", "200"); - - //var firstResponse = client.Execute>(firstRequest); - var firstResponse = await client.ExecuteAsync>(firstRequest); - - int pageCount = int.Parse((string) firstResponse.Headers.First(x => x.Name == "X-Page-Total").Value); - - var tasks = new List>>>(); - - for (int i = 1; i < pageCount; i++) - { - var request = new RestRequest("v2/skills", Method.GET); - request.AddQueryParameter("page", $"{i}"); - request.AddQueryParameter("page_size", "200"); - - tasks.Add(client.ExecuteAsync>(request)); - } - - await Task.WhenAll(tasks); - - var skills = new List(); - skills.AddRange(firstResponse.Data); - foreach (var task in tasks) - { - skills.AddRange(task.Result.Data); - } - - return skills; - } - } -} \ No newline at end of file diff --git a/RotationComparison/JsonModel/JsonRotation.cs b/RotationComparison/JsonModel/JsonRotation.cs deleted file mode 100644 index 81d79666..00000000 --- a/RotationComparison/JsonModel/JsonRotation.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using GW2Scratch.RotationComparison.Rotations; - -namespace GW2Scratch.RotationComparison.JsonModel -{ - public class JsonRotation - { - public JsonRotation(PlayerData playerData, IEnumerable items) - { - PlayerData = playerData; - Items = items.ToArray(); - } - - public PlayerData PlayerData { get; } - public IEnumerable Items { get; } - } -} \ No newline at end of file diff --git a/RotationComparison/Logs/EliteInsightsUrlLogSource.cs b/RotationComparison/Logs/EliteInsightsUrlLogSource.cs deleted file mode 100644 index 3889f75f..00000000 --- a/RotationComparison/Logs/EliteInsightsUrlLogSource.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using GW2Scratch.RotationComparison.Rotations; - -namespace GW2Scratch.RotationComparison.Logs -{ - public class EliteInsightsUrlLogSource : ILogSource - { - private string dpsReportUrl; - private string[] characterNames; - - public EliteInsightsUrlLogSource(string dpsReportUrl) - { - this.dpsReportUrl = dpsReportUrl; - } - - public void SetCharacterNameFilter(string[] names) - { - characterNames = names; - } - - public IEnumerable GetRotations() - { - throw new NotImplementedException(); - } - - public string GetEncounterName() - { - throw new NotImplementedException(); - } - - public string GetLogName() - { - return dpsReportUrl; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Logs/FileLogSource.cs b/RotationComparison/Logs/FileLogSource.cs deleted file mode 100644 index 46765c43..00000000 --- a/RotationComparison/Logs/FileLogSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.IO; -using GW2Scratch.EVTCAnalytics; -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Processing; - -namespace GW2Scratch.RotationComparison.Logs -{ - public class FileLogSource : ScratchParserLogSource - { - private readonly string filename; - private Log processedLog; - - public FileLogSource(string filename) - { - this.filename = filename; - } - - protected override Log GetLog() - { - if (processedLog == null) - { - var parser = new EVTCParser(); - var processor = new LogProcessor(); - var parsedLog = parser.ParseLog(filename); - processedLog = processor.ProcessLog(parsedLog); - } - - return processedLog; - } - - public override string GetLogName() - { - return Path.GetFileName(filename); - } - } -} \ No newline at end of file diff --git a/RotationComparison/Logs/ILogSource.cs b/RotationComparison/Logs/ILogSource.cs deleted file mode 100644 index d0526e84..00000000 --- a/RotationComparison/Logs/ILogSource.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; -using GW2Scratch.RotationComparison.Rotations; - -namespace GW2Scratch.RotationComparison.Logs -{ - public interface ILogSource - { - void SetCharacterNameFilter(params string[] names); - IEnumerable GetRotations(); - string GetEncounterName(); - string GetLogName(); - } -} \ No newline at end of file diff --git a/RotationComparison/Logs/ScratchParserLogSource.cs b/RotationComparison/Logs/ScratchParserLogSource.cs deleted file mode 100644 index 1843f4e2..00000000 --- a/RotationComparison/Logs/ScratchParserLogSource.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using GW2Scratch.EVTCAnalytics; -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Model.Agents; -using GW2Scratch.EVTCAnalytics.Processing.Encounters.Names; -using GW2Scratch.RotationComparison.Rotations; -using GW2Scratch.RotationComparison.Statistics; -using GW2Scratch.RotationComparison.Statistics.RotationItems; -using RotationItem = GW2Scratch.RotationComparison.Rotations.RotationItem; -using SkillCastType = GW2Scratch.RotationComparison.Rotations.SkillCastType; - -namespace GW2Scratch.RotationComparison.Logs -{ - public abstract class ScratchParserLogSource : ILogSource - { - private string[] characterNames; - - public void SetCharacterNameFilter(string[] names) - { - characterNames = names; - } - - protected abstract Log GetLog(); - - public IEnumerable GetRotations() - { - var log = GetLog(); - var players = log.Agents.OfType(); - if (characterNames != null) - { - players = players.Where(x => characterNames.Contains(x.Name)); - } - - var rotationCalculator = new RotationCalculator(); - foreach (var player in players) - { - var playerRotation = rotationCalculator.GetRotation(log, player); - var items = new List(); - foreach (var item in playerRotation.Items) - { - if (item is SkillCastItem skillCast) - { - items.Add(GetSkillCast(skillCast)); - } - else if (item is WeaponSwapItem weaponSwap) - { - items.Add(GetWeaponSwap(weaponSwap)); - } - } - yield return new Rotation(player.Name, player.Profession, player.EliteSpecialization, items); - } - } - - private SkillCast GetSkillCast(SkillCastItem skillCastItem) - { - var time = skillCastItem.ItemTime; - var skillId = skillCastItem.Skill.Id; - var skillName = skillCastItem.Skill.Name; - var duration = skillCastItem.Duration; - SkillCastType type; - switch (skillCastItem.Type) - { - case GW2Scratch.RotationComparison.Statistics.RotationItems.SkillCastType.Success: - type = SkillCastType.Success; - break; - case GW2Scratch.RotationComparison.Statistics.RotationItems.SkillCastType.Cancel: - type = SkillCastType.Cancel; - break; - case GW2Scratch.RotationComparison.Statistics.RotationItems.SkillCastType.Reset: - type = SkillCastType.Reset; - break; - default: - type = SkillCastType.Unknown; - break; - } - - return new SkillCast(time, duration, type, skillId, skillName); - } - - private WeaponSwap GetWeaponSwap(WeaponSwapItem weaponSwapItem) - { - return new WeaponSwap(weaponSwapItem.ItemTime, weaponSwapItem.NewWeaponSet); - } - - public string GetEncounterName() - { - var log = GetLog(); - return new LocalizedEncounterNameProvider().GetEncounterName(log.EncounterData, log.GameLanguage); - } - - - public abstract string GetLogName(); - } -} \ No newline at end of file diff --git a/RotationComparison/Logs/StreamLogSource.cs b/RotationComparison/Logs/StreamLogSource.cs deleted file mode 100644 index 75fdbcf1..00000000 --- a/RotationComparison/Logs/StreamLogSource.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.IO; -using GW2Scratch.EVTCAnalytics; -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Processing; - -namespace GW2Scratch.RotationComparison.Logs -{ - public class StreamLogSource : ScratchParserLogSource, IDisposable - { - private readonly Stream stream; - private readonly string logName; - private Log processedLog; - - public StreamLogSource(Stream stream, string logName) - { - this.stream = stream; - this.logName = logName; - } - - protected override Log GetLog() - { - byte[] bytes; - using (var memoryStream = new MemoryStream()) - { - stream.CopyTo(memoryStream); - bytes = memoryStream.ToArray(); - } - - if (processedLog == null) - { - var parser = new EVTCParser(); - var processor = new LogProcessor(); - var parsedLog = parser.ParseLog(bytes); - processedLog = processor.ProcessLog(parsedLog); - } - - return processedLog; - } - - public override string GetLogName() - { - return logName; - } - - public void Dispose() - { - stream?.Dispose(); - } - } -} \ No newline at end of file diff --git a/RotationComparison/Program.cs b/RotationComparison/Program.cs deleted file mode 100644 index c2c64f97..00000000 --- a/RotationComparison/Program.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using GW2Scratch.RotationComparison.GW2Api; -using GW2Scratch.RotationComparison.GW2Api.V2; -using GW2Scratch.RotationComparison.Logs; -using GW2Scratch.RotationComparison.Statistics; - -namespace GW2Scratch.RotationComparison -{ - internal class Program - { - public static async Task Main(string[] args) - { - var logSources = new List(); - - IApiDataSource apiDataSource = new ApiApiDataSource(); - - try - { - if (args.Contains("--help")) - { - // Now this is just a dirty hack - throw new Exception("Help"); - } - - if (args.Contains("--saveapifile")) - { - int index = Array.IndexOf(args, "--saveapifile"); - - if (index + 1 >= args.Length) - { - throw new Exception("--saveapifile was not followed by a filename"); - } - - string filename = args[index + 1]; - - try - { - var data = await GW2ApiData.LoadFromApiAsync(new ApiSkillRepository()); - await data.SaveToFileAsync(filename); - } - catch (Exception e) - { - Console.WriteLine($"An error occured while saving api data: {e.Message}"); - return; - } - - Console.Error.WriteLine($"Saved api data to {filename}"); - - return; - } - - for (var i = 0; i < args.Length; i++) - { - if (args[i] == "--file") - { - i++; - if (i >= args.Length) - { - throw new Exception("--file was not followed by a filename"); - } - - logSources.Add(new FileLogSource(args[i])); - } - else if (args[i] == "--report") - { - i++; - if (i >= args.Length) - { - throw new Exception("--report was not followed by an url"); - } - - logSources.Add(new EliteInsightsUrlLogSource(args[i])); - } - else if (args[i] == "--name") - { - var source = logSources.LastOrDefault() ?? - throw new Exception("--name was specified, but there was no log mentioned before to apply it to"); - - i++; - if (i >= args.Length) - { - throw new Exception("--name was not followed by a character name"); - } - - source.SetCharacterNameFilter(args[i]); - } - else if (args[i] == "--apifile") - { - i++; - if (i >= args.Length) - { - throw new Exception("--apifile was not followed by a filename"); - } - - apiDataSource = new FileApiDataSource(args[i]); - } - else - { - throw new Exception($"Unrecognized argument: \"{args[i]}\""); - } - } - - if (!logSources.Any()) - { - throw new Exception("No log sources provided"); - } - } - catch (Exception e) - { - Console.Error.WriteLine(e.Message); - Console.Error.WriteLine($@"Usage examples: - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --file 20190122-141235.zevtc - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --report https://dps.report/example - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --report dps.report/example - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --name ""Character Name"" --report dps.report/example - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --name ""Character Name"" --report dps.report/example --name ""Character Name"" - {AppDomain.CurrentDomain.FriendlyName} --file 20190121-181420.zevtc --file 20190122-141235.zevtc --report https://dps.report/example - - {AppDomain.CurrentDomain.FriendlyName} --apifile apidata.json --file 20190121-181420.zevtc --file 20190122-141235.zevtc - {AppDomain.CurrentDomain.FriendlyName} --saveapifile apidata.json - - --name is used to specify which character's rotation to use if multiple are present in the log - --file is used to provide a path to an arcdps EVTC log to be used in the comparison - --report is used to provide an url to an Elite Insights report to be used in the comparison - - API Data: - Some data from the official Guild Wars 2 API is used to show icons and similar - If no related option is specified, the data is downloaded from https://api.guildwars2.com/ - To avoid downloading this every time, you can run the program like this: - {AppDomain.CurrentDomain.FriendlyName} --saveapifile - All other options are ignored in this case and a file with the API data is produced. - - --apifile can then be used to use api data from a file with cached data from --saveapifile - - Keep in mind that the file needs to be updated from time to time with new GW2 releases or some data may be missing. - - Other notes: - If no name is specified and multiple characters are present, all of their rotations are shown - There is no limit on the amount of logs to compare - You can use any encounter, although extra data is only available only for training golem logs"); - return; - } - - GW2ApiData apiData; - try - { - apiData = await apiDataSource.GetApiDataAsync(); - } - catch (Exception e) - { - Console.Error.WriteLine($"Failed to get API data: {e.Message}"); - return; - } - - try - { - var generator = new RotationComparisonGenerator(apiData); - generator.WriteHtmlOutput(logSources, Console.Out); - } - catch (Exception e) - { - Console.Error.WriteLine($"Failed to generate rotation: {e.Message}"); - return; - } - } - } -} \ No newline at end of file diff --git a/RotationComparison/RotationComparison.csproj b/RotationComparison/RotationComparison.csproj deleted file mode 100644 index 2a08e3fd..00000000 --- a/RotationComparison/RotationComparison.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - net6.0 - GW2Scratch.RotationComparison - GW2Scratch.RotationComparison - Exe - latest - 0.1 - - - - - - - - - diff --git a/RotationComparison/RotationComparisonGenerator.cs b/RotationComparison/RotationComparisonGenerator.cs deleted file mode 100644 index 27787e32..00000000 --- a/RotationComparison/RotationComparisonGenerator.cs +++ /dev/null @@ -1,297 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using GW2Scratch.EVTCAnalytics.Model.Agents; -using GW2Scratch.RotationComparison.JsonModel; -using GW2Scratch.RotationComparison.Logs; -using GW2Scratch.RotationComparison.Rotations; -using GW2Scratch.RotationComparison.Statistics; -using Newtonsoft.Json; - -namespace GW2Scratch.RotationComparison -{ - public class RotationComparisonGenerator - { - private readonly GW2ApiData apiData; - - public RotationComparisonGenerator(GW2ApiData apiData) - { - this.apiData = apiData; - } - - public void WriteHtmlOutput(IEnumerable logSources, TextWriter writer) - { - writer.Write(@" - - - Rotation Comparison - - - - - - - - -
-
-

Rotation Comparison

-
-
-
- -
-
- - -"); - } - - public void WriteJsonModel(IEnumerable logSources, TextWriter writer) - { - var errors = new List(); - var jsonRotations = new List(); - - var usedSkills = new Dictionary(); - - foreach (var source in logSources) - { - IEnumerable rotations; - try - { - rotations = source.GetRotations(); - } - catch (Exception e) - { - errors.Add($"Failed to process {source.GetLogName()}: " + e.Message); - continue; - } - - foreach (var rotation in rotations) - { - var player = new PlayerData(rotation.PlayerName, - GetTinyProfessionIconUrl(rotation.Profession, rotation.Specialization), - source.GetLogName(), source.GetEncounterName()); - - foreach (var skillCast in rotation.Items.OfType()) - { - usedSkills[skillCast.SkillId] = skillCast.SkillName; - } - - jsonRotations.Add(new JsonRotation(player, rotation.Items)); - } - } - - var skillData = usedSkills - .Select(x => (Skill: (Id: x.Key, Name: x.Value), Data: apiData.GetSkillData((int) x.Key))) - .ToDictionary( - x => x.Skill.Id, - x => x.Data == null - ? new {Name = x.Skill.Name, IconUrl = (string) null} - : new {Name = x.Data.Name, IconUrl = x.Data.IconUrl} - ); - - writer.Write(JsonConvert.SerializeObject(new {Rotations = jsonRotations, SkillData = skillData, Errors = errors})); - } - - public string GetTinyProfessionIconUrl(Profession profession, EliteSpecialization specialization) - { - if (specialization == EliteSpecialization.None) - { - switch (profession) - { - case Profession.Warrior: - return "https://wiki.guildwars2.com/images/4/43/Warrior_tango_icon_20px.png"; - case Profession.Guardian: - return "https://wiki.guildwars2.com/images/8/8c/Guardian_tango_icon_20px.png"; - case Profession.Revenant: - return "https://wiki.guildwars2.com/images/b/b5/Revenant_tango_icon_20px.png"; - case Profession.Ranger: - return "https://wiki.guildwars2.com/images/4/43/Ranger_tango_icon_20px.png"; - case Profession.Thief: - return "https://wiki.guildwars2.com/images/7/7a/Thief_tango_icon_20px.png"; - case Profession.Engineer: - return "https://wiki.guildwars2.com/images/2/27/Engineer_tango_icon_20px.png"; - case Profession.Necromancer: - return "https://wiki.guildwars2.com/images/4/43/Necromancer_tango_icon_20px.png"; - case Profession.Elementalist: - return "https://wiki.guildwars2.com/images/a/aa/Elementalist_tango_icon_20px.png"; - case Profession.Mesmer: - return "https://wiki.guildwars2.com/images/6/60/Mesmer_tango_icon_20px.png"; - default: - throw new ArgumentOutOfRangeException(nameof(profession)); - } - } - - switch (specialization) - { - case EliteSpecialization.Berserker: - return "https://wiki.guildwars2.com/images/d/da/Berserker_tango_icon_20px.png"; - case EliteSpecialization.Spellbreaker: - return "https://wiki.guildwars2.com/images/e/ed/Spellbreaker_tango_icon_20px.png"; - case EliteSpecialization.Dragonhunter: - return "https://wiki.guildwars2.com/images/c/c9/Dragonhunter_tango_icon_20px.png"; - case EliteSpecialization.Firebrand: - return "https://wiki.guildwars2.com/images/0/02/Firebrand_tango_icon_20px.png"; - case EliteSpecialization.Herald: - return "https://wiki.guildwars2.com/images/6/67/Herald_tango_icon_20px.png"; - case EliteSpecialization.Renegade: - return "https://wiki.guildwars2.com/images/7/7c/Renegade_tango_icon_20px.png"; - case EliteSpecialization.Druid: - return "https://wiki.guildwars2.com/images/d/d2/Druid_tango_icon_20px.png"; - case EliteSpecialization.Soulbeast: - return "https://wiki.guildwars2.com/images/7/7c/Soulbeast_tango_icon_20px.png"; - case EliteSpecialization.Daredevil: - return "https://wiki.guildwars2.com/images/e/e1/Daredevil_tango_icon_20px.png"; - case EliteSpecialization.Deadeye: - return "https://wiki.guildwars2.com/images/c/c9/Deadeye_tango_icon_20px.png"; - case EliteSpecialization.Scrapper: - return "https://wiki.guildwars2.com/images/b/be/Scrapper_tango_icon_20px.png"; - case EliteSpecialization.Holosmith: - return "https://wiki.guildwars2.com/images/2/28/Holosmith_tango_icon_20px.png"; - case EliteSpecialization.Reaper: - return "https://wiki.guildwars2.com/images/1/11/Reaper_tango_icon_20px.png"; - case EliteSpecialization.Scourge: - return "https://wiki.guildwars2.com/images/0/06/Scourge_tango_icon_20px.png"; - case EliteSpecialization.Tempest: - return "https://wiki.guildwars2.com/images/4/4a/Tempest_tango_icon_20px.png"; - case EliteSpecialization.Weaver: - return "https://wiki.guildwars2.com/images/f/fc/Weaver_tango_icon_20px.png"; - case EliteSpecialization.Chronomancer: - return "https://wiki.guildwars2.com/images/f/f4/Chronomancer_tango_icon_20px.png"; - case EliteSpecialization.Mirage: - return "https://wiki.guildwars2.com/images/d/df/Mirage_tango_icon_20px.png"; - default: - throw new ArgumentOutOfRangeException(nameof(specialization)); - } - } - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/PlayerData.cs b/RotationComparison/Rotations/PlayerData.cs deleted file mode 100644 index 29025b36..00000000 --- a/RotationComparison/Rotations/PlayerData.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace GW2Scratch.RotationComparison.Rotations -{ - public class PlayerData - { - public string Name { get; } - public string IconUrl { get; } - public string LogName { get; } - public string EncounterName { get; } - - public PlayerData(string name, string iconUrl, string logName, string encounterName) - { - Name = name; - IconUrl = iconUrl; - LogName = logName; - EncounterName = encounterName; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/Rotation.cs b/RotationComparison/Rotations/Rotation.cs deleted file mode 100644 index a3b43dd6..00000000 --- a/RotationComparison/Rotations/Rotation.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using GW2Scratch.EVTCAnalytics.Model.Agents; - -namespace GW2Scratch.RotationComparison.Rotations -{ - public class Rotation - { - public string PlayerName { get; } - public Profession Profession { get; } - public EliteSpecialization Specialization { get; } - public IEnumerable Items { get; } - - public Rotation(string playerName, Profession profession, EliteSpecialization specialization, - IEnumerable items) - { - PlayerName = playerName; - Profession = profession; - Specialization = specialization; - Items = items.ToArray(); - } - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/RotationItem.cs b/RotationComparison/Rotations/RotationItem.cs deleted file mode 100644 index d4f9408a..00000000 --- a/RotationComparison/Rotations/RotationItem.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace GW2Scratch.RotationComparison.Rotations -{ - public abstract class RotationItem - { - public abstract RotationItemType Type { get; } - public abstract long Time { get; } - public abstract long Duration { get; } - public long TimeEnd => Time + Duration; - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/RotationItemType.cs b/RotationComparison/Rotations/RotationItemType.cs deleted file mode 100644 index 398cab1c..00000000 --- a/RotationComparison/Rotations/RotationItemType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace GW2Scratch.RotationComparison.Rotations -{ - public enum RotationItemType - { - Unknown = 0, - SkillCast = 1, - WeaponSwap = 2, - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/SkillCast.cs b/RotationComparison/Rotations/SkillCast.cs deleted file mode 100644 index b7eef139..00000000 --- a/RotationComparison/Rotations/SkillCast.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace GW2Scratch.RotationComparison.Rotations -{ - public class SkillCast : RotationItem - { - public override RotationItemType Type { get; } = RotationItemType.SkillCast; - public override long Time { get; } - public override long Duration { get; } - public SkillCastType CastType { get; } - public uint SkillId { get; } - public string SkillName { get; } - - public SkillCast(long time, long duration, SkillCastType castTypeType, uint skillId, string skillName) - { - Time = time; - Duration = duration; - CastType = castTypeType; - SkillId = skillId; - SkillName = skillName; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/SkillCastType.cs b/RotationComparison/Rotations/SkillCastType.cs deleted file mode 100644 index e4acf61c..00000000 --- a/RotationComparison/Rotations/SkillCastType.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace GW2Scratch.RotationComparison.Rotations -{ - public enum SkillCastType - { - Unknown = 0, - Success = 1, - Cancel = 2, - Reset = 3, - } -} \ No newline at end of file diff --git a/RotationComparison/Rotations/WeaponSwap.cs b/RotationComparison/Rotations/WeaponSwap.cs deleted file mode 100644 index 85672432..00000000 --- a/RotationComparison/Rotations/WeaponSwap.cs +++ /dev/null @@ -1,18 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model; - -namespace GW2Scratch.RotationComparison.Rotations -{ - public class WeaponSwap : RotationItem - { - public override RotationItemType Type { get; } = RotationItemType.WeaponSwap; - public override long Time { get; } - public override long Duration { get; } = 0; - public WeaponSet NewWeaponSet { get; } - - public WeaponSwap(long time, WeaponSet newWeaponSet) - { - Time = time; - NewWeaponSet = newWeaponSet; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/GW2ApiData.cs b/RotationComparison/Statistics/GW2ApiData.cs deleted file mode 100644 index fc69566e..00000000 --- a/RotationComparison/Statistics/GW2ApiData.cs +++ /dev/null @@ -1,330 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Model.Agents; -using GW2Scratch.EVTCAnalytics.Model.Skills; -using GW2Scratch.RotationComparison.GW2Api.V2; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; - -namespace GW2Scratch.RotationComparison.Statistics -{ - public class GW2ApiData - { - private readonly Dictionary skillDataBySkillId; - - public IEnumerable SkillData => skillDataBySkillId.Values; - - private GW2ApiData(IEnumerable skills) - { - skillDataBySkillId = skills.ToDictionary(x => x.Id); - } - - private GW2ApiData(Dictionary skillDataBySkillId) - { - this.skillDataBySkillId = skillDataBySkillId; - } - - public SkillData GetSkillData(int skillId) - { - if (!skillDataBySkillId.TryGetValue(skillId, out var data)) - { - data = null; - } - - return data; - } - - public SkillData GetSkillData(Skill skill) - { - return GetSkillData((int)skill.Id); - } - - public async Task SaveToFileAsync(string filepath) - { - using (var writer = new JsonTextWriter(new StreamWriter(new FileStream(filepath, FileMode.OpenOrCreate, - FileAccess.Write, FileShare.None, 4096, true)))) - { - await JObject.FromObject(skillDataBySkillId).WriteToAsync(writer); - } - } - - public static async Task LoadFromFileAsync(string filepath) - { - Dictionary dataDictionary; - using (var reader = new JsonTextReader(new StreamReader(new FileStream(filepath, FileMode.Open, - FileAccess.Read, FileShare.Read, 4096, true)))) - { - var obj = await JObject.LoadAsync(reader); - dataDictionary = obj.ToObject>(); - } - - return new GW2ApiData(dataDictionary); - } - - public static async Task LoadFromApiAsync(ApiSkillRepository skillRepository) - { - var apiSkills = (await skillRepository.GetAllApiSkills()).ToArray(); - var skillData = new List(); - foreach (var apiSkill in apiSkills) - { - SkillType type; - switch (apiSkill.Type) - { - case null: - case "None": - type = SkillType.None; - break; - case "Heal": - type = SkillType.Heal; - break; - case "Elite": - type = SkillType.Elite; - break; - case "Bundle": - type = SkillType.Bundle; - break; - case "Profession": - type = SkillType.Profession; - break; - case "Utility": - type = SkillType.Utility; - break; - case "Weapon": - type = SkillType.Weapon; - break; - default: - type = SkillType.Other; - break; - } - - SkillSlot slot; - switch (apiSkill.Slot) - { - case null: - slot = SkillSlot.None; - break; - case "Weapon_1": - slot = SkillSlot.Weapon1; - break; - case "Weapon_2": - slot = SkillSlot.Weapon2; - break; - case "Weapon_3": - slot = SkillSlot.Weapon3; - break; - case "Weapon_4": - slot = SkillSlot.Weapon4; - break; - case "Weapon_5": - slot = SkillSlot.Weapon5; - break; - case "Profession_1": - slot = SkillSlot.Profession1; - break; - case "Profession_2": - slot = SkillSlot.Profession2; - break; - case "Profession_3": - slot = SkillSlot.Profession3; - break; - case "Profession_4": - slot = SkillSlot.Profession4; - break; - case "Profession_5": - slot = SkillSlot.Profession5; - break; - case "Downed_1": - slot = SkillSlot.Downed1; - break; - case "Downed_2": - slot = SkillSlot.Downed2; - break; - case "Downed_3": - slot = SkillSlot.Downed3; - break; - case "Downed_4": - slot = SkillSlot.Downed4; - break; - case "Utility": - slot = SkillSlot.Utility; - break; - case "Heal": - slot = SkillSlot.Heal; - break; - case "Elite": - slot = SkillSlot.Elite; - break; - case "Toolbelt": - slot = SkillSlot.Toolbelt; - break; - case "Pet": - slot = SkillSlot.Pet; - break; - default: - slot = SkillSlot.Other; - break; - } - - WeaponType weaponType; - switch (apiSkill.WeaponType) - { - case null: - case "None": - weaponType = WeaponType.None; - break; - case "Dagger": - weaponType = WeaponType.Dagger; - break; - case "Focus": - weaponType = WeaponType.Focus; - break; - case "Staff": - weaponType = WeaponType.Staff; - break; - case "Scepter": - weaponType = WeaponType.Scepter; - break; - case "Sword": - weaponType = WeaponType.Sword; - break; - case "Trident": - weaponType = WeaponType.Trident; - break; - case "Pistol": - weaponType = WeaponType.Pistol; - break; - case "Rifle": - weaponType = WeaponType.Rifle; - break; - case "Shield": - weaponType = WeaponType.Shield; - break; - case "Speargun": - weaponType = WeaponType.Speargun; - break; - case "Greatsword": - weaponType = WeaponType.Greatsword; - break; - case "Mace": - weaponType = WeaponType.Mace; - break; - case "Torch": - weaponType = WeaponType.Torch; - break; - case "Hammer": - weaponType = WeaponType.Hammer; - break; - case "Spear": - weaponType = WeaponType.Spear; - break; - case "Axe": - weaponType = WeaponType.Axe; - break; - case "Warhorn": - weaponType = WeaponType.Warhorn; - break; - case "Shortbow": - weaponType = WeaponType.Shortbow; - break; - case "Longbow": - weaponType = WeaponType.Longbow; - break; - default: - weaponType = WeaponType.Other; - break; - } - - var professions = new List(); - if (apiSkill.Professions != null) - { - foreach (var apiProfession in apiSkill.Professions) - { - Profession profession; - switch (apiProfession) - { - case "Guardian": - profession = Profession.Guardian; - break; - case "Warrior": - profession = Profession.Warrior; - break; - case "Engineer": - profession = Profession.Engineer; - break; - case "Ranger": - profession = Profession.Ranger; - break; - case "Thief": - profession = Profession.Thief; - break; - case "Elementalist": - profession = Profession.Elementalist; - break; - case "Mesmer": - profession = Profession.Mesmer; - break; - case "Necromancer": - profession = Profession.Necromancer; - break; - case "Revenant": - profession = Profession.Revenant; - break; - default: - profession = Profession.None; - break; - } - - professions.Add(profession); - } - } - - SkillAttunement attunement; - switch (apiSkill.Attunement) - { - case null: - attunement = SkillAttunement.None; - break; - case "Air": - attunement = SkillAttunement.Air; - break; - case "Fire": - attunement = SkillAttunement.Fire; - break; - case "Water": - attunement = SkillAttunement.Water; - break; - case "Earth": - attunement = SkillAttunement.Earth; - break; - default: - attunement = SkillAttunement.Other; - break; - } - - skillData.Add(new SkillData(apiSkill.Id, apiSkill.Name, apiSkill.Icon, type, weaponType, professions, - slot, attunement)); - } - - /* TODO: This makes serialization significantly more difficult (although still doable) - var skillDataById = skillData.ToDictionary(x => x.Id); - foreach (var skill in apiSkills) - { - if (skill.PrevChain > 0 && skillDataById.TryGetValue(skill.PrevChain, out var prevSkill)) - { - skillDataById[skill.Id].PrevChain = prevSkill; - } - if (skill.NextChain > 0 && skillDataById.TryGetValue(skill.NextChain, out var nextSkill)) - { - skillDataById[skill.Id].NextChain = nextSkill; - } - } - */ - - return new GW2ApiData(skillData); - } - - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/IRotationCalculator.cs b/RotationComparison/Statistics/IRotationCalculator.cs deleted file mode 100644 index 3d13e715..00000000 --- a/RotationComparison/Statistics/IRotationCalculator.cs +++ /dev/null @@ -1,10 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Model.Agents; - -namespace GW2Scratch.RotationComparison.Statistics -{ - public interface IRotationCalculator - { - ScratchPlayerRotation GetRotation(Log log, Player player); - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationCalculator.cs b/RotationComparison/Statistics/RotationCalculator.cs deleted file mode 100644 index 42683597..00000000 --- a/RotationComparison/Statistics/RotationCalculator.cs +++ /dev/null @@ -1,142 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Events; -using GW2Scratch.EVTCAnalytics.GameData; -using GW2Scratch.EVTCAnalytics.Model; -using GW2Scratch.EVTCAnalytics.Model.Agents; -using GW2Scratch.RotationComparison.Statistics.RotationItems; -using System.Collections.Generic; -using System.Linq; - -namespace GW2Scratch.RotationComparison.Statistics -{ - public class RotationCalculator : IRotationCalculator - { - private interface ITemporaryEffect - { - TemporaryStatus TemporaryStatus { get; } - bool StartTriggered(AgentEvent agentEvent); - bool EndTriggered(AgentEvent agentEvent); - } - - private class BuffTemporaryEffect : ITemporaryEffect - { - private readonly int buffId; - public TemporaryStatus TemporaryStatus { get; } - - public BuffTemporaryEffect(int buffId, TemporaryStatus temporaryStatus) - { - this.buffId = buffId; - TemporaryStatus = temporaryStatus; - } - - public bool StartTriggered(AgentEvent agentEvent) - { - switch (agentEvent) - { - case BuffApplyEvent buffApplyEvent when buffApplyEvent.Buff.Id == buffId: - case InitialBuffEvent initialBuffEvent when initialBuffEvent.Skill.Id == buffId: - return true; - default: - return false; - } - } - - public bool EndTriggered(AgentEvent agentEvent) - { - return agentEvent is BuffRemoveEvent buffRemoveEvent && buffRemoveEvent.Buff.Id == buffId; - } - } - - private class EventTemporaryEffect : ITemporaryEffect - where TStarting : AgentEvent - where TEnding : AgentEvent - { - public TemporaryStatus TemporaryStatus { get; } - - public EventTemporaryEffect(TemporaryStatus temporaryStatus) - { - TemporaryStatus = temporaryStatus; - } - - public bool StartTriggered(AgentEvent agentEvent) - { - return agentEvent is TStarting; - } - - public bool EndTriggered(AgentEvent agentEvent) - { - return agentEvent is TEnding; - } - } - - private static readonly ITemporaryEffect[] TemporaryEffects = - { - new BuffTemporaryEffect(SkillIds.TimeAnchored, TemporaryStatus.ContinuumSplit), - new EventTemporaryEffect(TemporaryStatus.Downed), - }; - - public ScratchPlayerRotation GetRotation(Log log, Player player) - { - var rotation = new List(); - - long startTime = log.StartTime.TimeMilliseconds; - - var effectStarts = new long[TemporaryEffects.Length]; - for (int i = 0; i < effectStarts.Length; i++) - { - effectStarts[i] = -1; - } - - long castStart = 0; - foreach (var logEvent in log.Events.OfType().Where(x => x.Agent == player)) - { - long time = logEvent.Time - startTime; - if (logEvent is StartSkillCastEvent startSkillCastEvent) - { - castStart = logEvent.Time - startTime; - } - else if (logEvent is ResetSkillCastEvent resetSkillCastEvent) - { - var skill = resetSkillCastEvent.Skill; - rotation.Add(new SkillCastItem(castStart, time, SkillCastType.Reset, skill)); - castStart = logEvent.Time - startTime; - } - else if (logEvent is EndSkillCastEvent cancelledSkillCastEvent) - { - var skill = cancelledSkillCastEvent.Skill; - var type = cancelledSkillCastEvent.EndType == EndSkillCastEvent.SkillEndType.Cancel - ? SkillCastType.Cancel - : SkillCastType.Success; - rotation.Add(new SkillCastItem(castStart, time, type, skill)); - } - else if (logEvent is AgentWeaponSwapEvent weaponSwapEvent) - { - rotation.Add(new WeaponSwapItem(time, weaponSwapEvent.NewWeaponSet)); - } - - for (int i = 0; i < TemporaryEffects.Length; i++) - { - var effect = TemporaryEffects[i]; - if (effectStarts[i] != -1) - { - if (effect.EndTriggered(logEvent)) - { - rotation.Add(new TemporaryStatusItem(effectStarts[i], time, effect.TemporaryStatus)); - effectStarts[i] = -1; - } - } - else - { - if (effect.StartTriggered(logEvent)) - { - effectStarts[i] = time; - } - } - } - - // TODO: Add death - } - - return new ScratchPlayerRotation(player, rotation); - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/RotationItem.cs b/RotationComparison/Statistics/RotationItems/RotationItem.cs deleted file mode 100644 index 8d066c86..00000000 --- a/RotationComparison/Statistics/RotationItems/RotationItem.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public class RotationItem - { - public long ItemTime { get; } - - public RotationItem(long itemTime) - { - ItemTime = itemTime; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/SkillCastItem.cs b/RotationComparison/Statistics/RotationItems/SkillCastItem.cs deleted file mode 100644 index abab56d1..00000000 --- a/RotationComparison/Statistics/RotationItems/SkillCastItem.cs +++ /dev/null @@ -1,20 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model.Skills; - -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public class SkillCastItem : RotationItem - { - public Skill Skill { get; } - public SkillCastType Type { get; } - - public long CastEndTime { get; } - public long Duration => CastEndTime - ItemTime; - - public SkillCastItem(long castStartTime, long castEndTime, SkillCastType type, Skill skill) : base(castStartTime) - { - CastEndTime = castEndTime; - Type = type; - Skill = skill; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/SkillCastType.cs b/RotationComparison/Statistics/RotationItems/SkillCastType.cs deleted file mode 100644 index 6c0452b7..00000000 --- a/RotationComparison/Statistics/RotationItems/SkillCastType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public enum SkillCastType - { - Success, - Cancel, - Reset - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/TemporaryStatus.cs b/RotationComparison/Statistics/RotationItems/TemporaryStatus.cs deleted file mode 100644 index 7dffdff8..00000000 --- a/RotationComparison/Statistics/RotationItems/TemporaryStatus.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public enum TemporaryStatus - { - Downed, - ContinuumSplit, - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/TemporaryStatusItem.cs b/RotationComparison/Statistics/RotationItems/TemporaryStatusItem.cs deleted file mode 100644 index dcc11208..00000000 --- a/RotationComparison/Statistics/RotationItems/TemporaryStatusItem.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public class TemporaryStatusItem : RotationItem - { - public long StatusEndTime { get; } - public TemporaryStatus TemporaryStatus { get; } - - public TemporaryStatusItem(long statusStartTime, long statusEndTime, TemporaryStatus temporaryStatus) : base(statusStartTime) - { - StatusEndTime = statusEndTime; - TemporaryStatus = temporaryStatus; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/RotationItems/WeaponSwapItem.cs b/RotationComparison/Statistics/RotationItems/WeaponSwapItem.cs deleted file mode 100644 index 915fb0b0..00000000 --- a/RotationComparison/Statistics/RotationItems/WeaponSwapItem.cs +++ /dev/null @@ -1,14 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model; - -namespace GW2Scratch.RotationComparison.Statistics.RotationItems -{ - public class WeaponSwapItem : RotationItem - { - public WeaponSet NewWeaponSet { get; } - - public WeaponSwapItem(long time, WeaponSet newWeaponSet) : base(time) - { - NewWeaponSet = newWeaponSet; - } - } -} \ No newline at end of file diff --git a/RotationComparison/Statistics/ScratchPlayerRotation.cs b/RotationComparison/Statistics/ScratchPlayerRotation.cs deleted file mode 100644 index 0e1780a3..00000000 --- a/RotationComparison/Statistics/ScratchPlayerRotation.cs +++ /dev/null @@ -1,19 +0,0 @@ -using GW2Scratch.EVTCAnalytics.Model.Agents; -using GW2Scratch.RotationComparison.Statistics.RotationItems; -using System.Collections.Generic; -using System.Linq; - -namespace GW2Scratch.RotationComparison.Statistics -{ - public class ScratchPlayerRotation - { - public Player Player { get; } - public IEnumerable Items { get; } - - public ScratchPlayerRotation(Player player, IEnumerable rotationItems) - { - Player = player; - Items = rotationItems as RotationItem[] ?? rotationItems.ToArray(); - } - } -} \ No newline at end of file diff --git a/ScratchEVTCParser.sln b/ScratchEVTCParser.sln index 2374d5c7..e26a7c8f 100644 --- a/ScratchEVTCParser.sln +++ b/ScratchEVTCParser.sln @@ -10,8 +10,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArcdpsLogManager", "ArcdpsL EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GW2Scratch.EVTCAnalytics.Benchmark", "EVTCAnalytics.Benchmark\GW2Scratch.EVTCAnalytics.Benchmark.csproj", "{13CFD4FA-3CF3-4169-A692-9874AC2DEE08}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RotationComparison", "RotationComparison\RotationComparison.csproj", "{E20EFF93-9A56-4B0C-9272-E7B0B2331372}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVTCAnalytics.LogTests.LocalSets", "Tests\EVTCAnalytics.LogTests.LocalSets\EVTCAnalytics.LogTests.LocalSets.csproj", "{327293C9-155C-4415-812E-F81E3420D243}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogEditor", "LogEditor\LogEditor.csproj", "{1487967D-C775-4EFA-91CA-E7CB719A591E}" @@ -180,14 +178,6 @@ Global {1487967D-C775-4EFA-91CA-E7CB719A591E}.Release|Linux.Build.0 = Release|Any CPU {1487967D-C775-4EFA-91CA-E7CB719A591E}.Debug|Windows.ActiveCfg = Debug|Any CPU {1487967D-C775-4EFA-91CA-E7CB719A591E}.Debug|Windows.Build.0 = Debug|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Release|Windows.ActiveCfg = Release|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Release|Windows.Build.0 = Release|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Debug|Linux.ActiveCfg = Debug|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Debug|Linux.Build.0 = Debug|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Release|Linux.ActiveCfg = Release|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Release|Linux.Build.0 = Release|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Debug|Windows.ActiveCfg = Debug|Any CPU - {E20EFF93-9A56-4B0C-9272-E7B0B2331372}.Debug|Windows.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {909DE828-0610-473B-BE74-CE683C621CDC} = {033EF1E9-2B3B-4EC9-87BA-040F181BB73B} @@ -199,7 +189,6 @@ Global {FC491939-7A96-4ED7-B57D-0DE5DFED51A8} = {B2DEB5B6-56A1-4186-9A71-A47B64137B86} {B25C11F1-863A-49EA-95BF-76EA3F3F6CBD} = {B2DEB5B6-56A1-4186-9A71-A47B64137B86} {1487967D-C775-4EFA-91CA-E7CB719A591E} = {E0A60DBE-3885-49E8-8B25-57A2F12C1465} - {E20EFF93-9A56-4B0C-9272-E7B0B2331372} = {E0A60DBE-3885-49E8-8B25-57A2F12C1465} {13CFD4FA-3CF3-4169-A692-9874AC2DEE08} = {EA4A1EE8-2110-4AFA-8CA6-36589EA924D3} {B8A9DA56-3B2D-4A2D-B8F9-DB9B5DBA2C09} = {06941249-FB6C-4E81-A14B-F54E2A9700FA} {0C48D9E0-5365-4926-963A-4DC9F3ADC500} = {B8A9DA56-3B2D-4A2D-B8F9-DB9B5DBA2C09}