initial mmo work

This commit is contained in:
Spirtix 2023-08-03 19:09:30 +02:00
parent e88a5db3bf
commit 95008797b1
5 changed files with 2053 additions and 4 deletions

View File

@ -1,15 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using sodoff.Schema;
using sodoff.Util;
namespace sodoff.Controllers.Common;
public class ConfigurationController : Controller {
[HttpPost]
[Produces("application/xml")]
//[Produces("application/xml")]
[Route("ConfigurationWebService.asmx/GetMMOServerInfoWithZone")]
public IActionResult GetMMOServerInfoWithZone() {
// TODO: this is a placeholder
return Ok(new MMOServerInformation[0]);
return Ok(XmlUtil.ReadResourceXmlString("mmo"));
}
}

View File

@ -105,6 +105,7 @@ public class ProfileController : Controller {
AvatarData avatarData = null;
if (viking.AvatarSerialized is not null) {
avatarData = XmlUtil.DeserializeXml<AvatarData>(viking.AvatarSerialized);
avatarData.Id = viking.Inventory.Id;
}
// Build the AvatarDisplayData

2043
src/Resources/mmo.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ namespace sodoff.Schema;
public class AvatarData
{
[XmlElement(ElementName = "IsSuggestedAvatarName", IsNullable = true)]
public bool? IsSuggestedAvatarName;
public bool? IsSuggestedAvatarName { get; set; }
public int? Id;

View File

@ -16,6 +16,7 @@
<None Remove="Resources\achievementtaskinfo.xml" />
<None Remove="Resources\items.xml" />
<None Remove="Resources\missions.xml" />
<None Remove="Resources\mmo.xml" />
<None Remove="Resources\rankattrib.xml" />
<None Remove="Resources\rewardmultiplier.xml" />
<None Remove="Resources\store.xml" />
@ -48,6 +49,9 @@
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\mmo.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Resources\rewardmultiplier.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>