public void Zone() { var parser = new LogParser(PLAYER); ZoneEvent zone = null; parser.OnZone += (args) => zone = args; parser.ParseLine("[Tue Nov 03 21:41:54 2015] You have entered Plane of Knowledge."); Assert.NotNull(zone); Assert.Equal("Plane of Knowledge", zone.Name); // ignore special messages that look like zoning zone = null; parser.ParseLine("[Wed Nov 04 22:04:45 2015] You have entered an area where levitation effects do not function."); Assert.Null(zone); zone = null; parser.ParseLine("[Wed Jun 01 19:53:34 2016] You have entered an Arena (PvP) area."); Assert.Null(zone); }
public virtual void TrackZoneChanged(ZoneEvent zone) { Zone = zone.Name; }
private void TrackZone(ZoneEvent zone) { Zone = zone.Name; }