diff --git a/src/Controllers/Common/ItemStoreController.cs b/src/Controllers/Common/ItemStoreController.cs index cbba5dd..ae751c3 100644 --- a/src/Controllers/Common/ItemStoreController.cs +++ b/src/Controllers/Common/ItemStoreController.cs @@ -74,8 +74,16 @@ public class ItemStoreController : Controller { [Produces("application/xml")] [Route("ItemStoreWebService.asmx/GetAnnouncementsByUser")] //[VikingSession(UseLock=false)] - public IActionResult GetAnnouncements([FromForm] int worldObjectID) { + public IActionResult GetAnnouncements([FromForm] string apiKey, [FromForm] int worldObjectID) { // TODO: This is a placeholder, although this endpoint seems to be only used to send announcements to the user (such as the server shutdown), so this might be sufficient. + + uint gameVersion = ClientVersion.GetVersion(apiKey); + if (gameVersion <= ClientVersion.Max_OldJS && (gameVersion & ClientVersion.WoJS) != 0) { + return Ok(XmlUtil.DeserializeXml(XmlUtil.ReadResourceXmlString("announcements_wojs"))); + } else if (gameVersion == ClientVersion.SS && worldObjectID == 6) { + return Ok(XmlUtil.DeserializeXml(XmlUtil.ReadResourceXmlString("announcements_ss"))); + } + return Ok(new AnnouncementList()); } } diff --git a/src/Resources/announcements_ss.xml b/src/Resources/announcements_ss.xml new file mode 100644 index 0000000..1323e16 --- /dev/null +++ b/src/Resources/announcements_ss.xml @@ -0,0 +1,12 @@ + + + 1 + SanctuaryBabySS + [[Message]]=[[Wanna raise and train a Dragon? Go to the Enchanted Sanctuary today!]] + [[SceneName]]=[[SanctuaryBabySS]] + + 3 + 2024-02-03 + 2034-02-04 + + diff --git a/src/Resources/announcements_wojs.xml b/src/Resources/announcements_wojs.xml new file mode 100644 index 0000000..af71fbc --- /dev/null +++ b/src/Resources/announcements_wojs.xml @@ -0,0 +1,17 @@ + + + 10 + Concert Song + [[Song1]]=[[RS_DATA/PfConcertSong02.unity3d/PfConcertSong02;181;0]] + [[Song2]]=[[RS_DATA/PfConcertSong01.unity3d/PfConcertSong01;189;0]] + [[Song3]]=[[RS_DATA/PfConcertSong03.unity3d/PfConcertSong03;268;0]] + [[Song4]]=[[RS_DATA/PfConcertSong04.unity3d/PfConcertSong04;209;0]] + [[Song5]]=[[RS_DATA/PfConcertSong05.unity3d/PfConcertSong05;61;0]] + [[Song6]]=[[RS_DATA/PfConcertSong06.unity3d/PfConcertSong06;90;0]] + [[Interval]]=[[30]] + + 3 + 2024-02-03 + 2034-02-04 + + diff --git a/src/sodoff.csproj b/src/sodoff.csproj index bb8f15c..59287d6 100644 --- a/src/sodoff.csproj +++ b/src/sodoff.csproj @@ -61,6 +61,8 @@ + + @@ -166,6 +168,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest