public static UpdateEvent CreateFromXml( System.Xml.XmlElement n) { Events.UpdateEvent e = new Events.UpdateEvent(); e.type = n.GetAttribute("type"); e.ikey = n.GetAttribute("ikey"); e.val = n.GetAttribute("value"); return e; }
public static UpdateEvent CreateFromXml(System.Xml.XmlElement n) { Events.UpdateEvent e = new Events.UpdateEvent(); e.type = n.GetAttribute("type"); e.ikey = n.GetAttribute("ikey"); e.val = n.GetAttribute("value"); return(e); }
protected void OnUpdate(Events.UpdateEvent update) { //Since you can get change events from login calls, when the Properties object is not yet setup we need to be careful here: if (!HasDataFromServer) { return; } //var d = event['data'] as Hashtable; DomainObjects.PlayerAttribute v = GetProperty(update.ikey); if (v != null) { v.value = update.val; dataStore.properties.AddOrUpdate(v.ikey, v); // This is only really needed to generate the change event. } }