From 5af76c64b40a32f31807dccbdefdae24326855b4 Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Fri, 15 May 2020 16:15:28 +0100 Subject: [PATCH 1/6] added dragon type and remaining events --- .../Profiles/LeagueOfLegends/GSI/GameData.cs | 62 ++++++++++++++++++- .../LeagueOfLegends/GSI/Nodes/MatchNode.cs | 11 ++++ .../Profiles/LeagueOfLegends/GameEvent_LoL.cs | 1 + .../Project-Aurora/Project-Aurora.csproj | 5 +- 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs index 1d17a7c21..af48be0a7 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs @@ -1,6 +1,9 @@ -using System; +using JsonSubTypes; +using Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -165,6 +168,15 @@ public class _AllPlayer public string team { get; set; } } + [JsonConverter(typeof(JsonSubtypes), "EventName")] + [JsonSubtypes.KnownSubType(typeof(_BaronKillEvent), "BaronKill")] + [JsonSubtypes.KnownSubType(typeof(_BaronKillEvent), "HeraldKill")] + [JsonSubtypes.KnownSubType(typeof(_DragonKillEvent), "DragonKill")] + [JsonSubtypes.KnownSubType(typeof(_ChampionKillEvent), "ChampionKill")] + [JsonSubtypes.KnownSubType(typeof(_MultikillEvent), "Multikill")] + [JsonSubtypes.KnownSubType(typeof(_AceEvent), "Ace")] + [JsonSubtypes.KnownSubType(typeof(_InhibKillEvent), "InhibKilled")] + [JsonSubtypes.KnownSubType(typeof(_TurretKillEvent), "TurretKilled")] public class _Event { public int EventID { get; set; } @@ -172,6 +184,54 @@ public class _Event public float EventTime { get; set; } } + public class _BaronKillEvent : _Event + { + public bool Stolen { get; set; } + public string KillerName { get; set; } + public string[] Assisters { get; set; } + } + + public class _DragonKillEvent : _Event + { + public string DragonType { get; set; } + public bool Stolen { get; set; } + public string KillerName { get; set; } + public string[] Assisters { get; set; } + } + + public class _ChampionKillEvent : _Event + { + public string KillerName { get; set; } + public string VictimName { get; set; } + public string[] Assisters { get; set; } + } + + public class _MultikillEvent : _Event + { + public string KillerName { get; set; } + public int KillStreak { get; set; } + } + + public class _AceEvent : _Event + { + public string Acer { get; set; } + public string AcingTeam { get; set; } + } + + public class _InhibKillEvent : _Event + { + public string KillerName { get; set; } + public string InhibKilled { get; set; } + public string[] Assisters { get; set; } + } + + public class _TurretKillEvent : _Event + { + public string KillerName { get; set; } + public string TurretKilled { get; set; } + public string[] Assisters { get; set; } + } + public class _EventList { public IList<_Event> Events { get; set; } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index 79d854dea..ef551ecf5 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -21,5 +21,16 @@ public class MatchNode : Node public int BaronsKilled; public int HeraldsKilled; + + public MapTerrain MapTerrain; + } + + public enum MapTerrain + { + Unknown, + Default, + Infernal, + Cloud, + Mountain } } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs index 68f008bbf..24b4f1796 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs @@ -148,6 +148,7 @@ public override void UpdateTick() s.Match.HeraldsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("HeraldKill")); s.Match.DragonsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("DragonKill")); s.Match.TurretsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("TurretKilled")); + s.Match.MapTerrain = EnumUtils.TryParseOr(allGameData.gameData.mapTerrain, true, MapTerrain.Unknown); #endregion #region Items diff --git a/Project-Aurora/Project-Aurora/Project-Aurora.csproj b/Project-Aurora/Project-Aurora/Project-Aurora.csproj index 155b685c3..eebfc9e1e 100644 --- a/Project-Aurora/Project-Aurora/Project-Aurora.csproj +++ b/Project-Aurora/Project-Aurora/Project-Aurora.csproj @@ -1,4 +1,4 @@ - + @@ -2608,6 +2608,9 @@ 2.7.8.1 + + 1.7.0 + 5.6.0 From 85f30dc127efffbc7593931bba5f17c4b3cd004c Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Fri, 15 May 2020 16:17:02 +0100 Subject: [PATCH 2/6] added missing ocean terrain type --- .../Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index ef551ecf5..3fa792dc3 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -31,6 +31,7 @@ public enum MapTerrain Default, Infernal, Cloud, - Mountain + Mountain, + Ocean } } From ee6f5e473bc75235505c9e3a584989dd747843d5 Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Sat, 16 May 2020 22:42:10 +0100 Subject: [PATCH 3/6] updated a few loose ends --- .../LeagueOfLegends/GSI/Nodes/AbilityNode.cs | 2 +- .../LeagueOfLegends/GSI/Nodes/ItemNode.cs | 1 + .../LeagueOfLegends/GSI/Nodes/MatchNode.cs | 10 +++++++- .../LeagueOfLegends/GSI/Nodes/PlayerNode.cs | 24 +++++++++++-------- .../LeagueOfLegends/GSI/Nodes/StatsNode.cs | 4 ++-- .../Profiles/LeagueOfLegends/GameEvent_LoL.cs | 16 ++++++------- .../Layers/Control_LoLBackgroundLayer.xaml.cs | 2 +- .../Layers/DefaultChampionColors.cs | 2 +- .../Layers/LoLBackgroundLayerHandler.cs | 4 ++-- 9 files changed, 39 insertions(+), 26 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/AbilityNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/AbilityNode.cs index c01f434f4..ab8742005 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/AbilityNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/AbilityNode.cs @@ -10,7 +10,7 @@ public class AbilityNode : Node { public bool Learned => Level != 0; public int Level; - public string Name; + public string Name = ""; //TODO: there might be additional useful info to add here such as cooldown } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/ItemNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/ItemNode.cs index b5417dbb6..f00572f5e 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/ItemNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/ItemNode.cs @@ -36,6 +36,7 @@ public SlotNode(_Item item) public enum ItemID { + Unknown = -1, None = 0, BootsofSpeed = 1001, FaerieCharm = 1004, diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index 3fa792dc3..033bfd4cb 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -8,7 +8,7 @@ namespace Aurora.Profiles.LeagueOfLegends.GSI.Nodes { public class MatchNode : Node { - public string GameMode; + public GameMode GameMode; public float GameTime; @@ -34,4 +34,12 @@ public enum MapTerrain Mountain, Ocean } + + public enum GameMode + { + Unknown = -1, + None = 0, + PracticeTool + } + } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/PlayerNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/PlayerNode.cs index 5c058d291..914655487 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/PlayerNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/PlayerNode.cs @@ -10,7 +10,8 @@ namespace Aurora.Profiles.LeagueOfLegends.GSI.Nodes { public enum Champion { - Undefined = -1, + Unknown = -1, + None = 0, Aatrox, Ahri, Akali, @@ -163,14 +164,16 @@ public enum Champion public enum Team { - Undefined = -1, + Unknown = -1, + None = 0, Order, Chaos } public enum SummonerSpell { - Undefined = -1, + Unknown = -1, + None = 0, Cleanse,//210 Exhaust,//210 Flash,//300 @@ -187,7 +190,8 @@ public enum SummonerSpell public enum Position { - Undefined, + Unknown = -1, + None = 0, Top, Jungle, Middle, @@ -201,12 +205,12 @@ public class PlayerNode : Node public StatsNode ChampionStats = new StatsNode(); public AbilitiesNode Abilities = new AbilitiesNode(); public InventoryNode Items = new InventoryNode(); - public SummonerSpell SpellD = SummonerSpell.Undefined; - public SummonerSpell SpellF = SummonerSpell.Undefined; - public Champion Champion = Champion.Undefined; - public Team Team = Team.Undefined; - public Position Position = Position.Undefined; - public string SummonerName; + public SummonerSpell SpellD = SummonerSpell.None; + public SummonerSpell SpellF = SummonerSpell.None; + public Champion Champion = Champion.None; + public Team Team = Team.None; + public Position Position = Position.None; + public string SummonerName = ""; public int Level; public float Gold; public bool IsDead; diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/StatsNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/StatsNode.cs index de9a6ba90..ff3ae5212 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/StatsNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/StatsNode.cs @@ -8,10 +8,10 @@ namespace Aurora.Profiles.LeagueOfLegends.GSI.Nodes { public enum ResourceType { - Undefined = -1, + Unknown = -1, + None = 0, Mana, Energy, - None, Shield, Battlefury, Dragonfury, diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs index 24b4f1796..b26246cd3 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs @@ -56,7 +56,7 @@ public override void UpdateTick() if (allGameData == null) { - s.Match.InGame = false; + _game_state = new GameState_LoL(); return; } @@ -64,7 +64,7 @@ public override void UpdateTick() { #region Match s.Match.InGame = true; - s.Match.GameMode = allGameData.gameData.gameMode; + s.Match.GameMode = EnumUtils.TryParseOr(allGameData.gameData.gameMode, true, GameMode.Unknown); s.Match.GameTime = allGameData.gameData.gameTime; #endregion @@ -111,7 +111,7 @@ public override void UpdateTick() s.Player.ChampionStats.PhysicalLethality = ap.championStats.physicalLethality; s.Player.ChampionStats.ResourceMax = ap.championStats.resourceMax; s.Player.ChampionStats.ResourceRegenRate = ap.championStats.resourceRegenRate; - s.Player.ChampionStats.ResourceType = EnumUtils.TryParseOr(ap.championStats.resourceType, true, ResourceType.Undefined); + s.Player.ChampionStats.ResourceType = EnumUtils.TryParseOr(ap.championStats.resourceType, true, ResourceType.Unknown); s.Player.ChampionStats.ResourceCurrent = ap.championStats.resourceValue; s.Player.ChampionStats.SpellVamp = ap.championStats.spellVamp; s.Player.ChampionStats.Tenacity = ap.championStats.tenacity; @@ -128,11 +128,11 @@ public override void UpdateTick() return; //if we can't find it, skip - s.Player.Champion = EnumUtils.TryParseOr(p.championName.Replace(" ", "").Replace("'", "").Replace(".", ""), true, Champion.Undefined); - s.Player.SpellD = EnumUtils.TryParseOr(p.summonerSpells.summonerSpellOne.displayName, true, SummonerSpell.Undefined); - s.Player.SpellF = EnumUtils.TryParseOr(p.summonerSpells.summonerSpellTwo.displayName, true, SummonerSpell.Undefined); - s.Player.Team = EnumUtils.TryParseOr(p.team, true, Team.Undefined); - s.Player.Position = EnumUtils.TryParseOr(p.position, true, Position.Undefined); + s.Player.Champion = EnumUtils.TryParseOr(p.championName.Replace(" ", "").Replace("'", "").Replace(".", ""), true, Champion.None); + s.Player.SpellD = EnumUtils.TryParseOr(p.summonerSpells.summonerSpellOne.displayName, true, SummonerSpell.Unknown); + s.Player.SpellF = EnumUtils.TryParseOr(p.summonerSpells.summonerSpellTwo.displayName, true, SummonerSpell.Unknown); + s.Player.Team = EnumUtils.TryParseOr(p.team, true, Team.Unknown); + s.Player.Position = EnumUtils.TryParseOr(p.position, true, Position.Unknown); s.Player.IsDead = p.isDead; s.Player.RespawnTimer = p.respawnTimer; diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/Control_LoLBackgroundLayer.xaml.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/Control_LoLBackgroundLayer.xaml.cs index 05850cdb0..50224c4ad 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/Control_LoLBackgroundLayer.xaml.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/Control_LoLBackgroundLayer.xaml.cs @@ -48,7 +48,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e) private void SetSettings() { - this.championPicker.SelectedItem = Champion.Undefined; + this.championPicker.SelectedItem = Champion.None; } private void championPicker_SelectionChanged(object sender, SelectionChangedEventArgs e) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/DefaultChampionColors.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/DefaultChampionColors.cs index ce879a139..af30c9f8d 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/DefaultChampionColors.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/DefaultChampionColors.cs @@ -16,7 +16,7 @@ public static class DefaultChampionColors /// public static Dictionary GetDictionary() => new Dictionary() { - [Champion.Undefined] = Color.FromArgb(120, 120, 120), + [Champion.None] = Color.FromArgb(120, 120, 120), [Champion.Aatrox] = Color.FromArgb(237, 83, 79), [Champion.Ahri] = Color.FromArgb(61, 76, 178), [Champion.Akali] = Color.FromArgb(10, 115, 38), diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/LoLBackgroundLayerHandler.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/LoLBackgroundLayerHandler.cs index 7a63e8bba..d2e55ae76 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/LoLBackgroundLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/Layers/LoLBackgroundLayerHandler.cs @@ -35,14 +35,14 @@ public class LoLBackgroundLayerHandler : LayerHandler Date: Sat, 16 May 2020 22:49:29 +0100 Subject: [PATCH 4/6] simplified monster kill count --- .../Profiles/LeagueOfLegends/GSI/GameData.cs | 9 ++++++++- .../Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs | 7 ++++--- .../Profiles/LeagueOfLegends/GameEvent_LoL.cs | 9 +++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs index af48be0a7..210995a9b 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/GameData.cs @@ -170,7 +170,7 @@ public class _AllPlayer [JsonConverter(typeof(JsonSubtypes), "EventName")] [JsonSubtypes.KnownSubType(typeof(_BaronKillEvent), "BaronKill")] - [JsonSubtypes.KnownSubType(typeof(_BaronKillEvent), "HeraldKill")] + [JsonSubtypes.KnownSubType(typeof(_HeraldKillEvent), "HeraldKill")] [JsonSubtypes.KnownSubType(typeof(_DragonKillEvent), "DragonKill")] [JsonSubtypes.KnownSubType(typeof(_ChampionKillEvent), "ChampionKill")] [JsonSubtypes.KnownSubType(typeof(_MultikillEvent), "Multikill")] @@ -191,6 +191,13 @@ public class _BaronKillEvent : _Event public string[] Assisters { get; set; } } + public class _HeraldKillEvent : _Event + { + public bool Stolen { get; set; } + public string KillerName { get; set; } + public string[] Assisters { get; set; } + } + public class _DragonKillEvent : _Event { public string DragonType { get; set; } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index 033bfd4cb..e67295bcb 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -8,6 +8,8 @@ namespace Aurora.Profiles.LeagueOfLegends.GSI.Nodes { public class MatchNode : Node { + public MapTerrain MapTerrain; + public GameMode GameMode; public float GameTime; @@ -18,11 +20,11 @@ public class MatchNode : Node public int TurretsKilled; + public int InhibsKilled; + public int BaronsKilled; public int HeraldsKilled; - - public MapTerrain MapTerrain; } public enum MapTerrain @@ -41,5 +43,4 @@ public enum GameMode None = 0, PracticeTool } - } diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs index b26246cd3..f5ac9f6f2 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs @@ -144,10 +144,11 @@ public override void UpdateTick() #endregion #region Events - s.Match.BaronsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("BaronKill")); - s.Match.HeraldsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("HeraldKill")); - s.Match.DragonsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("DragonKill")); - s.Match.TurretsKilled = allGameData.events.Events.Count(ev => ev.EventName.Contains("TurretKilled")); + s.Match.BaronsKilled = allGameData.events.Events.Count(ev => ev is _BaronKillEvent); + s.Match.HeraldsKilled = allGameData.events.Events.Count(ev => ev is _HeraldKillEvent); + s.Match.DragonsKilled = allGameData.events.Events.Count(ev => ev is _DragonKillEvent); + s.Match.TurretsKilled = allGameData.events.Events.Count(ev => ev is _TurretKillEvent); + s.Match.InhibsKilled = allGameData.events.Events.Count(ev => ev is _InhibKillEvent); s.Match.MapTerrain = EnumUtils.TryParseOr(allGameData.gameData.mapTerrain, true, MapTerrain.Unknown); #endregion From ef90f827200a723bac9a7a76fff0166319b46bbc Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Sun, 17 May 2020 04:01:32 +0100 Subject: [PATCH 5/6] added dragon type counters --- .../Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs | 12 ++++++++++++ .../Profiles/LeagueOfLegends/GameEvent_LoL.cs | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index e67295bcb..85a7227ad 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -16,6 +16,18 @@ public class MatchNode : Node public bool InGame; + public int InfernalDragonsKilled; + + public int OceanDragonsKilled; + + public int MountainDragonsKilled; + + public int CloudDragonsKilled; + + public int EarthDragonsKilled; + + public int ElderDragonsKilled; + public int DragonsKilled; public int TurretsKilled; diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs index f5ac9f6f2..d9d5efb00 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs @@ -144,7 +144,15 @@ public override void UpdateTick() #endregion #region Events - s.Match.BaronsKilled = allGameData.events.Events.Count(ev => ev is _BaronKillEvent); + var drags = allGameData.events.Events.OfType<_DragonKillEvent>(); + + s.Match.InfernalDragonsKilled = drags.Count(d => d.DragonType.ToLower() == "fire"); + s.Match.EarthDragonsKilled = drags.Count(d => d.DragonType.ToLower() == "earth"); + s.Match.OceanDragonsKilled = drags.Count(d => d.DragonType.ToLower() == "water"); + s.Match.CloudDragonsKilled = drags.Count(d => d.DragonType.ToLower() == "air"); + s.Match.ElderDragonsKilled = drags.Count(d => d.DragonType.ToLower() == "elder"); + + s.Match.BaronsKilled = allGameData.events.Events.Count(ev => ev is _BaronKillEvent); s.Match.HeraldsKilled = allGameData.events.Events.Count(ev => ev is _HeraldKillEvent); s.Match.DragonsKilled = allGameData.events.Events.Count(ev => ev is _DragonKillEvent); s.Match.TurretsKilled = allGameData.events.Events.Count(ev => ev is _TurretKillEvent); From 1cf2a962051a16f088d3c7cf16a846f54a01da93 Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Sun, 17 May 2020 15:09:31 +0100 Subject: [PATCH 6/6] removed half finished feature --- .../Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs | 5 ++++- .../Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs index 85a7227ad..b6252420f 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GSI/Nodes/MatchNode.cs @@ -10,7 +10,9 @@ public class MatchNode : Node { public MapTerrain MapTerrain; - public GameMode GameMode; + //public GameMode GameMode; + //TODO: Find the rest of the enum values. meanwhile i'll leave this as a string + public string GameMode = ""; public float GameTime; @@ -49,6 +51,7 @@ public enum MapTerrain Ocean } + //TODO: Find the rest of these public enum GameMode { Unknown = -1, diff --git a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs index d9d5efb00..0d351d76b 100644 --- a/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs +++ b/Project-Aurora/Project-Aurora/Profiles/LeagueOfLegends/GameEvent_LoL.cs @@ -64,7 +64,8 @@ public override void UpdateTick() { #region Match s.Match.InGame = true; - s.Match.GameMode = EnumUtils.TryParseOr(allGameData.gameData.gameMode, true, GameMode.Unknown); + //s.Match.GameMode = EnumUtils.TryParseOr(allGameData.gameData.gameMode, true, GameMode.Unknown); + s.Match.GameMode = allGameData.gameData.gameMode; s.Match.GameTime = allGameData.gameData.gameTime; #endregion