Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current node not updated when processing HideEntity regex (c#)? #15

Closed
sebastientromp opened this issue Dec 4, 2015 · 2 comments
Closed
Assignees
Labels

Comments

@sebastientromp
Copy link

Hey,

In DataHandler.cs, there is:

match = Regexes.ActionHideEntityRegex.Match(data);
if(match.Success)
{
    var rawEntity = match.Groups[1].Value;
    var tagName = match.Groups[2].Value;
    var value = match.Groups[3].Value;
    var entity = Helper.ParseEntity(rawEntity, state);
    var zone = Helper.ParseTag(tagName, value);
    var hideEntity = new HideEntity {Entity = entity, Zone = zone.Value, TimeStamp = timestamp};
    if(state.Node.Type == typeof(Game))
        ((Game)state.Node.Object).Data.Add(hideEntity);
    else if(state.Node.Type == typeof(Action))
        ((Action)state.Node.Object).Data.Add(hideEntity);
    else
        throw new Exception("Invalid node: " + state.Node.Type);
    return;
}

Contrary to all the other processes, there is no call to state.UpdateCurrentNode(typeof(Game), typeof(Action)); before checking the type of the current node. Is this intentional?

@azeier
Copy link
Member

azeier commented Dec 4, 2015

HideEntity can not have child elements, so I think that was intentional, yes. Does that behaviour result in any problems? Actually.. let me think about this.

@jleclanche
Copy link
Member

Closing bugs from deprecated c# interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants