HearthSim / python-hsreplay

Python library for creating and parsing HSReplay XML files
https://hearthsim.info/hsreplay/
MIT License
50 stars 14 forks source link

Generated Game entity has attribute "timestamp" instead of "ts" #18

Closed sebastientromp closed 8 years ago

sebastientromp commented 8 years ago

Looking at the c# code, it looks like the Game entity generate an attribute named timestamp in the XML, like

public class Game
{
    [XmlAttribute("timestamp")]
    public string TimeStamp { get; set; }

    [XmlAttribute("type")]
    public int Type { get; set; }

    [XmlElement("Action", typeof(Action))]
    [XmlElement("Choices", typeof(Choices))]
    [XmlElement("FullEntity", typeof(FullEntity))]
    [XmlElement("GameEntity", typeof(GameEntity))]
    [XmlElement("ShowEntity", typeof(ShowEntity))]
    [XmlElement("HideEntity", typeof(HideEntity))]
    [XmlElement("Options", typeof(Options))]
    [XmlElement("Player", typeof(PlayerEntity))]
    [XmlElement("SendChoices", typeof(SendChoices))]
    [XmlElement("SendOption", typeof(SendOption))]
    [XmlElement("TagChange", typeof(TagChange))]
    [XmlElement("MetaData", typeof(MetaData))]
    [XmlElement("ChosenEntities", typeof(ChosenEntities))]
    public List<GameData> Data { get; set; }
}

According to the spec, the attribute should be name ts

Edit: GameData entities are fine, only Game entity is affected