forked from SoDOff-Project/sodoff
support for Math Blaster
This commit is contained in:
parent
c1e759e766
commit
f695f96517
@ -92,8 +92,8 @@ public class AchievementController : Controller {
|
|||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Produces("application/xml")]
|
[Produces("application/xml")]
|
||||||
[Route("AchievementWebService.asmx/GetUserAchievementInfo")]
|
[Route("AchievementWebService.asmx/GetUserAchievementInfo")] // used by World Of Jumpstart
|
||||||
public IActionResult GetUserAchievementInfo([FromForm] string apiToken) { // used by World Of Jumpstart
|
public IActionResult GetUserAchievementInfo([FromForm] Guid apiToken) {
|
||||||
Viking? viking = ctx.Sessions.FirstOrDefault(x => x.ApiToken == apiToken).Viking;
|
Viking? viking = ctx.Sessions.FirstOrDefault(x => x.ApiToken == apiToken).Viking;
|
||||||
|
|
||||||
if (viking != null) {
|
if (viking != null) {
|
||||||
@ -103,7 +103,7 @@ public class AchievementController : Controller {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Produces("application/xml")]
|
[Produces("application/xml")]
|
||||||
[Route("AchievementWebService.asmx/GetAchievementsByUserID")]
|
[Route("AchievementWebService.asmx/GetAchievementsByUserID")]
|
||||||
|
@ -1284,6 +1284,7 @@ public class ContentController : Controller {
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
//[Produces("application/xml")]
|
//[Produces("application/xml")]
|
||||||
[Route("ContentWebService.asmx/GetDisplayNames")] // used by World Of Jumpstart
|
[Route("ContentWebService.asmx/GetDisplayNames")] // used by World Of Jumpstart
|
||||||
|
[Route("ContentWebService.asmx/GetDisplayNamesByCategoryID")] // used by Math Blaster
|
||||||
public IActionResult GetDisplayNames() {
|
public IActionResult GetDisplayNames() {
|
||||||
// TODO: This is a placeholder
|
// TODO: This is a placeholder
|
||||||
return Ok("<?xml version=\"1.0\" encoding=\"utf-8\"?> <DisplayNames xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <DisplayName> <ID>1</ID> <Name>Aaliyah</Name> <Ordinal>1</Ordinal> </DisplayName> <DisplayName> <ID>2</ID> <Name>Abby</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>3</ID> <Name>Adrian</Name> <Ordinal>3</Ordinal> </DisplayName> <DisplayName> <ID>11</ID> <Name>Karen</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>12</ID> <Name>Luna</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>13</ID> <Name>Tori</Name> <Ordinal>2</Ordinal> </DisplayName></DisplayNames>");
|
return Ok("<?xml version=\"1.0\" encoding=\"utf-8\"?> <DisplayNames xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <DisplayName> <ID>1</ID> <Name>Aaliyah</Name> <Ordinal>1</Ordinal> </DisplayName> <DisplayName> <ID>2</ID> <Name>Abby</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>3</ID> <Name>Adrian</Name> <Ordinal>3</Ordinal> </DisplayName> <DisplayName> <ID>11</ID> <Name>Karen</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>12</ID> <Name>Luna</Name> <Ordinal>2</Ordinal> </DisplayName> <DisplayName> <ID>13</ID> <Name>Tori</Name> <Ordinal>2</Ordinal> </DisplayName></DisplayNames>");
|
||||||
@ -1711,6 +1712,30 @@ public class ContentController : Controller {
|
|||||||
return Ok(gameDataService.GetGameData(viking, gameId, isMultiplayer, difficulty, gameLevel, key, count, AscendingOrder, buddyFilter, DateTime.Parse(startDate, usCulture), DateTime.Parse(endDate, usCulture)));
|
return Ok(gameDataService.GetGameData(viking, gameId, isMultiplayer, difficulty, gameLevel, key, count, AscendingOrder, buddyFilter, DateTime.Parse(startDate, usCulture), DateTime.Parse(endDate, usCulture)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Produces("application/xml")]
|
||||||
|
[Route("ContentWebService.asmx/GetPeriodicGameDataByGame")] // used by Math Blaster
|
||||||
|
public IActionResult GetPeriodicGameDataByGame() {
|
||||||
|
// TODO: This is a placeholder
|
||||||
|
return Ok(new GameDataSummary());
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Produces("application/xml")]
|
||||||
|
[Route("MissionWebService.asmx/GetTreasureChest")] // used by Math Blaster
|
||||||
|
public IActionResult GetTreasureChest() {
|
||||||
|
// TODO: This is a placeholder
|
||||||
|
return Ok(new TreasureChestData());
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[Produces("application/xml")]
|
||||||
|
[Route("MissionWebService.asmx/GetWorldId")] // used by Math Blaster
|
||||||
|
public IActionResult GetWorldId() {
|
||||||
|
// TODO: This is a placeholder
|
||||||
|
return Ok(0);
|
||||||
|
}
|
||||||
|
|
||||||
private static RaisedPetData GetRaisedPetDataFromDragon (Dragon dragon, int? selectedDragonId = null) {
|
private static RaisedPetData GetRaisedPetDataFromDragon (Dragon dragon, int? selectedDragonId = null) {
|
||||||
if (selectedDragonId is null)
|
if (selectedDragonId is null)
|
||||||
selectedDragonId = dragon.Viking.SelectedDragonId;
|
selectedDragonId = dragon.Viking.SelectedDragonId;
|
||||||
|
33
src/Schema/TreasureChestData.cs
Normal file
33
src/Schema/TreasureChestData.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
namespace sodoff.Schema;
|
||||||
|
|
||||||
|
[XmlRoot(ElementName = "TreasureChestData", Namespace = "")]
|
||||||
|
[Serializable]
|
||||||
|
public class TreasureChestData
|
||||||
|
{
|
||||||
|
public int TreasureChestId;
|
||||||
|
|
||||||
|
[XmlElement(ElementName = "StartDate", IsNullable = true)]
|
||||||
|
public string StartDate;
|
||||||
|
|
||||||
|
[XmlElement(ElementName = "EndDate", IsNullable = true)]
|
||||||
|
public string EndDate;
|
||||||
|
|
||||||
|
public string ServerTime;
|
||||||
|
|
||||||
|
public float RespawnTime;
|
||||||
|
|
||||||
|
public int ChestMin;
|
||||||
|
|
||||||
|
public int ChestMax;
|
||||||
|
|
||||||
|
[XmlElement(ElementName = "GameCurrencyMin", IsNullable = true)]
|
||||||
|
public int? GameCurrencyMin;
|
||||||
|
|
||||||
|
[XmlElement(ElementName = "GameCurrencyMax", IsNullable = true)]
|
||||||
|
public int? GameCurrencyMax;
|
||||||
|
|
||||||
|
[XmlElement(ElementName = "ItemId")]
|
||||||
|
public int[] ItemId;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user