From 5b04b17b25c4fe478a41f4faabfbc01d569d7954 Mon Sep 17 00:00:00 2001 From: Spiria Date: Sun, 31 Mar 2019 13:16:46 +0900 Subject: [PATCH] Add new meta events --- .gitignore | 3 + GW2PAO.API/Constants/MetaEventID.cs | 32 +++++ GW2PAO.API/Data/MetaEventsTable.cs | 123 ++++++++++++++++++ .../Providers/MetaEventStageNamesProvider.cs | 63 ++++++++- .../EventNotificationWindow.xaml | 2 +- .../MetaEventNotificationView.xaml | 4 +- .../WorldBossEventNotificationView.xaml | 4 +- 7 files changed, 222 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 22899ee..ca3abf0 100644 --- a/.gitignore +++ b/.gitignore @@ -156,3 +156,6 @@ $RECYCLE.BIN/ # Mac desktop service store files .DS_Store + +# Another Visual studio files +/.vs diff --git a/GW2PAO.API/Constants/MetaEventID.cs b/GW2PAO.API/Constants/MetaEventID.cs index a6f124f..2f98d80 100644 --- a/GW2PAO.API/Constants/MetaEventID.cs +++ b/GW2PAO.API/Constants/MetaEventID.cs @@ -8,17 +8,33 @@ namespace GW2PAO.API.Constants { public class MetaEventID { + public static readonly Guid TimberlineFalls = new Guid("32B1CE39-D2E0-4FCE-BDF3-6E00635FA398"); + public static readonly Guid IronMarches = new Guid("BAE5AD78-9540-4CEC-B1E5-AD57FB08A894"); + public static readonly Guid GendarranFields = new Guid("2A926CF0-AEF9-4BD2-BD01-7F03C7931D5B"); public static readonly Guid DryTop = new Guid("F19EA7AF-7FFD-42A0-B20A-530C8F55DB32"); public static readonly Guid VerdantBrink = new Guid("F65F53A9-9665-4049-8518-C04F4FAADA44"); public static readonly Guid AuricBasin = new Guid("5544E617-3930-42C0-93D5-9FA0F938E5AD"); public static readonly Guid TangledDepths = new Guid("7A2F2E16-CDE1-4C02-82BC-F37199301515"); public static readonly Guid DragonsStand = new Guid("B03463F6-5CA6-4F0D-B614-B2DC1DFBDF2A"); + public static readonly Guid LakeDoric = new Guid("3B6E6919-934E-422F-8953-ECA63D66EA62"); + public static readonly Guid CrystalOasis = new Guid("E64A769A-A5AD-4F5D-93AF-CF2022BA88B3"); + public static readonly Guid DesertHighlands = new Guid("38A1C2C4-0BDC-4138-BA9E-CDBA7A088421"); + public static readonly Guid DomainOfVabbi = new Guid("FB30F672-8737-48B9-9FEE-A6A2A72EC9FF"); + public static readonly Guid DomainOfIstan = new Guid("6E705FEC-1C60-477B-B3DC-C4FBE35C3B97"); + public static readonly Guid JahaiBluffs = new Guid("99138F68-8016-45FF-B321-902DDCEAD962"); + public static readonly Guid ThunderheadPeaks = new Guid("6C33E8C9-959C-412F-93D8-CDF3EF19B6F2"); } public class MetaEventStageID { + // Core & LW2 Zones + public static readonly Guid TimberlineFalls_LeyLine = new Guid("92B86E45-85CD-4AFA-8527-F9B300F3B79C"); + public static readonly Guid IronMarches_LeyLine = new Guid("D7C293F4-1B69-435F-A975-AEEE6167D542"); + public static readonly Guid GendarranFields_LeyLine = new Guid("4DA7CD29-BCCD-49F1-AD40-99807876070F"); public static readonly Guid DryTop_CrashSite = new Guid("03E26C95-D7B6-4333-993C-1B2C1BB1CE10"); public static readonly Guid DryTop_Sandstorm = new Guid("1C351A1B-3752-4758-B0C9-CAD397DAC3F8"); + + // Heart of Thorns Zones public static readonly Guid VerdantBrink_NightBosses = new Guid("0C198B36-80D4-415D-836C-BFE02E6A1087"); public static readonly Guid VerdantBrink_Daytime = new Guid("D766B894-11E2-4042-97F3-347DC14332E2"); public static readonly Guid VerdantBrink_Night = new Guid("0E1D38EA-37BE-4C1B-8B28-B91727488B1B"); @@ -30,5 +46,21 @@ public class MetaEventStageID public static readonly Guid TangledDepths_ChakGerent = new Guid("4D58ABE3-3506-4854-B28A-4860EBBA9615"); public static readonly Guid TangledDepths_HelpOutposts = new Guid("8B298EE8-2C3C-491F-AA93-8F1A73D4D8CC"); public static readonly Guid DragonsStand_MapActive = new Guid("79C4A416-50F1-4E0C-B7E7-DD096FFD6633"); + + // LW3 Zones + public static readonly Guid LakeDoric_Noran = new Guid("B4D908D8-BB02-466A-B3F5-B2D0B970FC79"); + public static readonly Guid LakeDoric_Saidra = new Guid("0097E544-FF42-4097-A0E7-D34D261B8B47"); + public static readonly Guid LakeDoric_Loamhurst = new Guid("59E20379-DDEF-4609-BB19-BDC06AAB472A"); + + // Path of Fire Zone + public static readonly Guid CrystalOasis_CasinoBlitz = new Guid("308966B1-F0ED-42CA-B4D4-17CE6DC53981"); + public static readonly Guid DesertHighlands_Treasure = new Guid("C46AE04F-DAD1-4919-8F07-11C20D9C621A"); + public static readonly Guid DomainOfVabbi_Serpent = new Guid("BC211348-29D1-48BE-83AE-739A5F0E4274"); + + // LW4 Zones + public static readonly Guid DomainOfIstan_Palawadan = new Guid("1BB7E949-3FC9-455F-873C-9FD1178CD3B5"); + public static readonly Guid JahaiBluffs_DangerousPrey = new Guid("35D30F9D-C9AB-4A2E-A193-22CC76AFE387"); + public static readonly Guid ThunderheadPeaks_Keep = new Guid("9CD21738-2108-4E15-9102-F1F4B10001F5"); + public static readonly Guid ThunderheadPeaks_Oil = new Guid("CBA88373-C024-44A1-9202-6A4387BE949E"); } } diff --git a/GW2PAO.API/Data/MetaEventsTable.cs b/GW2PAO.API/Data/MetaEventsTable.cs index 5708c1f..552efba 100644 --- a/GW2PAO.API/Data/MetaEventsTable.cs +++ b/GW2PAO.API/Data/MetaEventsTable.cs @@ -66,6 +66,42 @@ public static void CreateTable() // Note: Names actually come from a localized names provider, but are left here for reference // in the xml file + met.MetaEvents.Add(new MetaEvent() + { + Name = "Timberline Falls", + ID = MetaEventID.TimberlineFalls, + MapID = 29, + StartOffset = new SerializableTimespan(0, 20, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.TimberlineFalls_LeyLine, Name = "Ley-Line Anomaly", Duration = new SerializableTimespan(6, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Iron Marches", + ID = MetaEventID.IronMarches, + MapID = 25, + StartOffset = new SerializableTimespan(2, 20, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.IronMarches_LeyLine, Name = "Ley-Line Anomaly", Duration = new SerializableTimespan(6, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Gendarran Fields", + ID = MetaEventID.GendarranFields, + MapID = 24, + StartOffset = new SerializableTimespan(4, 20, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.GendarranFields_LeyLine, Name = "Ley-Line Anomaly", Duration = new SerializableTimespan(6, 0, 0) } + } + }); + met.MetaEvents.Add(new MetaEvent() { Name = "Dry Top", @@ -134,6 +170,93 @@ public static void CreateTable() } }); + met.MetaEvents.Add(new MetaEvent() + { + Name = "Lake Doric", + ID = MetaEventID.LakeDoric, + MapID = 1185, + StartOffset = new SerializableTimespan(0, 30, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.LakeDoric_Noran, Name = "Noran's Homestead", Duration = new SerializableTimespan(0, 30, 0) }, + new MetaEventStage() { ID = MetaEventStageID.LakeDoric_Saidra, Name = "Saidra's Haven", Duration = new SerializableTimespan(0, 45, 0) }, + new MetaEventStage() { ID = MetaEventStageID.LakeDoric_Loamhurst, Name = "New Loamhurst", Duration = new SerializableTimespan(0, 45, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Crystal Oasis", + ID = MetaEventID.CrystalOasis, + MapID = 1210, + StartOffset = new SerializableTimespan(0, 5, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.CrystalOasis_CasinoBlitz, Name = "Casino Blitz", Duration = new SerializableTimespan(2, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Desert Highlands", + ID = MetaEventID.DesertHighlands, + MapID = 1211, + StartOffset = new SerializableTimespan(1, 0, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.DesertHighlands_Treasure, Name = "Buried Treasure", Duration = new SerializableTimespan(2, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Domain of Vabbi", + ID = MetaEventID.DomainOfVabbi, + MapID = 1248, + StartOffset = new SerializableTimespan(1, 0, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.DomainOfVabbi_Serpent, Name = "Serpent's Ire", Duration = new SerializableTimespan(1, 30, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Domain of Istan", + ID = MetaEventID.DomainOfIstan, + MapID = 1263, + StartOffset = new SerializableTimespan(1, 45, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.DomainOfIstan_Palawadan, Name = "Palawadan", Duration = new SerializableTimespan(2, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Jahai Bluffs", + ID = MetaEventID.JahaiBluffs, + MapID = 1301, + StartOffset = new SerializableTimespan(1, 0, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.JahaiBluffs_DangerousPrey, Name = "Dangerous Prey", Duration = new SerializableTimespan(2, 0, 0) } + } + }); + + met.MetaEvents.Add(new MetaEvent() + { + Name = "Thunderhead Peaks", + ID = MetaEventID.ThunderheadPeaks, + MapID = 1310, + StartOffset = new SerializableTimespan(0, 45, 0), + Stages = new List() + { + new MetaEventStage() { ID = MetaEventStageID.ThunderheadPeaks_Oil, Name = "The Oil Floes", Duration = new SerializableTimespan(1, 0, 0) }, + new MetaEventStage() { ID = MetaEventStageID.ThunderheadPeaks_Keep, Name = "Thunderhead Keep", Duration = new SerializableTimespan(1, 0, 0) } + } + }); + XmlSerializer serializer = new XmlSerializer(typeof(MetaEventsTable)); TextWriter textWriter = new StreamWriter(MetaEventsTable.Filename); serializer.Serialize(textWriter, met); diff --git a/GW2PAO.API/Providers/MetaEventStageNamesProvider.cs b/GW2PAO.API/Providers/MetaEventStageNamesProvider.cs index 2c2c2b6..6555acc 100644 --- a/GW2PAO.API/Providers/MetaEventStageNamesProvider.cs +++ b/GW2PAO.API/Providers/MetaEventStageNamesProvider.cs @@ -111,6 +111,9 @@ private void GenerateFiles() // English List english = new List() { + new MetaEventStageName() { ID = MetaEventStageID.TimberlineFalls_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.IronMarches_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.GendarranFields_LeyLine, Name = "Ley-Line Anomaly" }, new MetaEventStageName() { ID = MetaEventStageID.DryTop_CrashSite, Name = "Crash Site" }, new MetaEventStageName() { ID = MetaEventStageID.DryTop_Sandstorm, Name = "Sandstorm" }, new MetaEventStageName() { ID = MetaEventStageID.VerdantBrink_NightBosses, Name = "Night Bosses" }, @@ -123,7 +126,17 @@ private void GenerateFiles() new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_Preparation, Name = "Preparation" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_ChakGerent, Name = "Chak Gerent" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_HelpOutposts, Name = "Help Outposts" }, - new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Map Active" } + new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Map Active" }, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Noran, Name = "Noran's Homestead"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Saidra, Name = "Saidra's Haven"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Loamhurst, Name = "New Loamhurst"}, + new MetaEventStageName() { ID = MetaEventStageID.CrystalOasis_CasinoBlitz, Name = "Casino Blitz" }, + new MetaEventStageName() { ID = MetaEventStageID.DesertHighlands_Treasure, Name = "Buried Treasure" }, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfVabbi_Serpent, Name = "Serpent's Ire" }, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfIstan_Palawadan, Name = "Palawadan"}, + new MetaEventStageName() { ID = MetaEventStageID.JahaiBluffs_DangerousPrey, Name = "Dangerous Prey"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Keep, Name = "Thunderhead Keep"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Oil, Name = "The Oil Floes"} }; // Spanish @@ -141,7 +154,21 @@ private void GenerateFiles() new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_Preparation, Name = "Preparación" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_ChakGerent, Name = "Chak Gerent" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_HelpOutposts, Name = "Ayuda Outposts" }, - new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "mapa activo" } + new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "mapa activo" }, + // TODO: Translate event name (It's dummy data now) + new MetaEventStageName() { ID = MetaEventStageID.CrystalOasis_CasinoBlitz, Name = "Casino Blitz" }, + new MetaEventStageName() { ID = MetaEventStageID.DesertHighlands_Treasure, Name = "Buried Treasure" }, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfVabbi_Serpent, Name = "Serpent's Ire" }, + new MetaEventStageName() { ID = MetaEventStageID.TimberlineFalls_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.IronMarches_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.GendarranFields_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Noran, Name = "Noran's Homestead"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Saidra, Name = "Saidra's Haven"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Loamhurst, Name = "New Loamhurst"}, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfIstan_Palawadan, Name = "Palawadan"}, + new MetaEventStageName() { ID = MetaEventStageID.JahaiBluffs_DangerousPrey, Name = "Dangerous Prey"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Keep, Name = "Thunderhead Keep"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Oil, Name = "The Oil Floes"} }; // French @@ -159,7 +186,21 @@ private void GenerateFiles() new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_Preparation, Name = "Préparation" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_ChakGerent, Name = "Régent Chak" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_HelpOutposts, Name = "Aider les campements" }, - new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Carte active" } + new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Carte active" }, + // TODO: Translate event name (It's dummy data now) + new MetaEventStageName() { ID = MetaEventStageID.CrystalOasis_CasinoBlitz, Name = "Casino Blitz" }, + new MetaEventStageName() { ID = MetaEventStageID.DesertHighlands_Treasure, Name = "Buried Treasure" }, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfVabbi_Serpent, Name = "Serpent's Ire" }, + new MetaEventStageName() { ID = MetaEventStageID.TimberlineFalls_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.IronMarches_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.GendarranFields_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Noran, Name = "Noran's Homestead"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Saidra, Name = "Saidra's Haven"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Loamhurst, Name = "New Loamhurst"}, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfIstan_Palawadan, Name = "Palawadan"}, + new MetaEventStageName() { ID = MetaEventStageID.JahaiBluffs_DangerousPrey, Name = "Dangerous Prey"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Keep, Name = "Thunderhead Keep"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Oil, Name = "The Oil Floes"} }; // German @@ -177,7 +218,21 @@ private void GenerateFiles() new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_Preparation, Name = "Vorbereitung" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_ChakGerent, Name = "Chak Gerent" }, new MetaEventStageName() { ID = MetaEventStageID.TangledDepths_HelpOutposts, Name = "Hilfe Outposts" }, - new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Karte Aktiv" } + new MetaEventStageName() { ID = MetaEventStageID.DragonsStand_MapActive, Name = "Karte Aktiv" }, + // TODO: Translate event name (It's dummy data now) + new MetaEventStageName() { ID = MetaEventStageID.CrystalOasis_CasinoBlitz, Name = "Casino Blitz" }, + new MetaEventStageName() { ID = MetaEventStageID.DesertHighlands_Treasure, Name = "Buried Treasure" }, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfVabbi_Serpent, Name = "Serpent's Ire" }, + new MetaEventStageName() { ID = MetaEventStageID.TimberlineFalls_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.IronMarches_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.GendarranFields_LeyLine, Name = "Ley-Line Anomaly" }, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Noran, Name = "Noran's Homestead"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Saidra, Name = "Saidra's Haven"}, + new MetaEventStageName() { ID = MetaEventStageID.LakeDoric_Loamhurst, Name = "New Loamhurst"}, + new MetaEventStageName() { ID = MetaEventStageID.DomainOfIstan_Palawadan, Name = "Palawadan"}, + new MetaEventStageName() { ID = MetaEventStageID.JahaiBluffs_DangerousPrey, Name = "Dangerous Prey"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Keep, Name = "Thunderhead Keep"}, + new MetaEventStageName() { ID = MetaEventStageID.ThunderheadPeaks_Oil, Name = "The Oil Floes"} }; Serialization.SerializeToXml(english, this.GetFilePath("en")); diff --git a/GW2PAO/Modules/Events/Views/EventNotification/EventNotificationWindow.xaml b/GW2PAO/Modules/Events/Views/EventNotification/EventNotificationWindow.xaml index e7744c5..4112571 100644 --- a/GW2PAO/Modules/Events/Views/EventNotification/EventNotificationWindow.xaml +++ b/GW2PAO/Modules/Events/Views/EventNotification/EventNotificationWindow.xaml @@ -13,7 +13,7 @@ Topmost="True" ShowInTaskbar="False" ResizeMode="NoResize" TextOptions.TextFormattingMode="Display" - MinHeight="200" Height="Auto" SizeToContent="Height" Width="230" + MinHeight="200" Height="Auto" SizeToContent="Height" Width="300" MouseLeftButtonDown="Window_MouseLeftButtonDown"> diff --git a/GW2PAO/Modules/Events/Views/EventNotification/MetaEventNotificationView.xaml b/GW2PAO/Modules/Events/Views/EventNotification/MetaEventNotificationView.xaml index 2b2af00..d183d17 100644 --- a/GW2PAO/Modules/Events/Views/EventNotification/MetaEventNotificationView.xaml +++ b/GW2PAO/Modules/Events/Views/EventNotification/MetaEventNotificationView.xaml @@ -9,7 +9,7 @@ mc:Ignorable="d" TextOptions.TextFormattingMode="Display" UseLayoutRounding="True" - Height="60" Width="230"> + Height="60" Width="300"> @@ -61,7 +61,7 @@ Padding="5,5,5,2"> - + + Height="60" Width="300"> @@ -50,7 +50,7 @@ Padding="5,5,5,2"> - +