mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 08:18:49 -07:00
Added GameVersion to MMO Authentication response.
This commit is contained in:
parent
d00d56a095
commit
8310ee8ebb
@ -237,8 +237,13 @@ public class AuthenticationController : Controller {
|
||||
var session = ctx.Sessions.FirstOrDefault(x => x.ApiToken == token);
|
||||
if (session != null) {
|
||||
info.Authenticated = true;
|
||||
info.DisplayName = session.Viking.Name;
|
||||
if (session.Viking.AvatarSerialized != null) {
|
||||
info.DisplayName = XmlUtil.DeserializeXml<AvatarData>(session.Viking.AvatarSerialized).DisplayName;
|
||||
} else {
|
||||
info.DisplayName = session.Viking.Name;
|
||||
}
|
||||
info.Id = session.Viking.Id;
|
||||
info.Version = session.Viking.GameVersion ?? 0;
|
||||
Role? role = session.Viking.MMORoles.FirstOrDefault()?.Role;
|
||||
if (role != null)
|
||||
info.Role = (Role)role;
|
||||
|
@ -14,6 +14,9 @@ public class AuthenticationInfo {
|
||||
|
||||
[XmlElement]
|
||||
public int Id { get; set; }
|
||||
|
||||
[XmlElement]
|
||||
public uint Version { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
Loading…
x
Reference in New Issue
Block a user