mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 14:40:28 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
44
server/FSO.Server.Protocol/CitySelector/ShardStatusItem.cs
Executable file
44
server/FSO.Server.Protocol/CitySelector/ShardStatusItem.cs
Executable file
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using FSO.Common.Utils;
|
||||
|
||||
namespace FSO.Server.Protocol.CitySelector
|
||||
{
|
||||
public class ShardStatusItem : IXMLEntity
|
||||
{
|
||||
public string Name;
|
||||
public int Rank;
|
||||
public string Map;
|
||||
public ShardStatus Status;
|
||||
public int Id;
|
||||
public string PublicHost;
|
||||
public string InternalHost;
|
||||
public string VersionName;
|
||||
public string VersionNumber;
|
||||
public int? UpdateID;
|
||||
|
||||
public ShardStatusItem()
|
||||
{
|
||||
}
|
||||
|
||||
public System.Xml.XmlElement Serialize(System.Xml.XmlDocument doc)
|
||||
{
|
||||
var result = doc.CreateElement("Shard-Status");
|
||||
result.AppendTextNode("Location", "public");
|
||||
result.AppendTextNode("Name", Name);
|
||||
result.AppendTextNode("Rank", Rank.ToString());
|
||||
result.AppendTextNode("Map", Map);
|
||||
result.AppendTextNode("Status", Status.ToString());
|
||||
result.AppendTextNode("Id", Id.ToString());
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Parse(System.Xml.XmlElement element)
|
||||
{
|
||||
this.Name = element.ReadTextNode("Name");
|
||||
this.Rank = int.Parse(element.ReadTextNode("Rank"));
|
||||
this.Map = element.ReadTextNode("Map");
|
||||
this.Status = (ShardStatus)Enum.Parse(typeof(ShardStatus), element.ReadTextNode("Status"));
|
||||
this.Id = int.Parse(element.ReadTextNode("Id"));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue