private RouteStart(int id, string name, RouteStartType type, int icon, double runDistance, Coordinates coords, SavesPer savesPer, bool enabled) { mId = id; mEnabled = enabled; mName = name; mType = type; mIcon = icon; mRunDistance = runDistance; mCoords = coords; mSavesPer = savesPer; //MonarchChanged += new EventHandler(RouteStart_MonarchChanged); }
private void UpdateStartLocation(Coordinates coords, RouteStartType type, bool quiet) { if (!chkAutoUpdateRecalls.Checked) return; RouteStart startLoc = GetStartLocationByType(type); if (startLoc != null && startLoc.Coords != coords) { startLoc.Coords = coords; RefreshStartLocationListCoords(); if (startLoc.Enabled && !quiet) Util.Message(startLoc.Name + " start location set to " + startLoc.Coords); } }
private void UpdateStartLocation(Coordinates coords, RouteStartType type) { UpdateStartLocation(coords, type, false); }
private void UpdateStartLocation(WorldObject obj, RouteStartType type) { RecallTimeout_Tick(null, null); UpdateStartLocation(new Coordinates(obj.Coordinates(), 1), type); }
private void ProcessPortalTie(WorldObject spellTarget, RouteStartType type) { RouteStart startLoc = GetStartLocationByType(type); Coordinates coords; string dest = spellTarget.Values(StringValueKey.PortalDestination, "<None>"); if (Coordinates.TryParse(dest, out coords)) { if (startLoc.Coords != coords) { startLoc.Coords = coords; RefreshStartLocationListCoords(); if (startLoc.Enabled) Util.Message(startLoc.Name + " start location set to " + startLoc.Coords); } } else { startLoc.Coords = Coordinates.NO_COORDINATES; RefreshStartLocationListCoords(); if (startLoc.Enabled) { Util.Message("Could not determine destination of primary portal tie. " + startLoc.Name + " start location set to " + startLoc.Coords); } } }
private RouteStart GetStartLocationByType(RouteStartType type) { foreach (RouteStart loc in mStartLocations.Values) { if (loc.Type == type) return loc; } return null; }
private void CheckStartLocation(string name, RouteStartType type, double runDist, int icon, SavesPer savesPer) { RouteStart rs; if ((rs = GetStartLocationByType(type)) != null) { rs.SavesPer = savesPer; } else { mStartLocations[name] = new RouteStart(name, type, icon, runDist, Coordinates.NO_COORDINATES, savesPer, true); } }
public RouteStart(string name, RouteStartType type, int icon, double runDistance, Coordinates coords, SavesPer savesPer, bool enabled) : this(Location.GetNextInternalId(), name, type, icon, runDistance, coords, savesPer, enabled) { }