コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: PluginCore.cs プロジェクト: joshlatte/goarrow
		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);
			}
		}
コード例 #3
0
ファイル: PluginCore.cs プロジェクト: joshlatte/goarrow
		private void UpdateStartLocation(Coordinates coords, RouteStartType type)
		{
			UpdateStartLocation(coords, type, false);
		}
コード例 #4
0
ファイル: PluginCore.cs プロジェクト: joshlatte/goarrow
		private void UpdateStartLocation(WorldObject obj, RouteStartType type)
		{
			RecallTimeout_Tick(null, null);
			UpdateStartLocation(new Coordinates(obj.Coordinates(), 1), type);
		}
コード例 #5
0
ファイル: PluginCore.cs プロジェクト: joshlatte/goarrow
		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);
				}
			}
		}
コード例 #6
0
		private RouteStart GetStartLocationByType(RouteStartType type)
		{
			foreach (RouteStart loc in mStartLocations.Values)
			{
				if (loc.Type == type)
					return loc;
			}
			return null;
		}
コード例 #7
0
		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);
			}
		}
コード例 #8
0
 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)
 {
 }
コード例 #9
0
ファイル: RouteStart.cs プロジェクト: joshlatte/goarrow
		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);
		}
コード例 #10
0
ファイル: RouteStart.cs プロジェクト: joshlatte/goarrow
		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) { }