Inheritance: GatheringRotation, IGetOverridePriority
示例#1
0
		private bool ResolveGatherRotation()
		{
			if (gatherRotation != null)
			{
				return false;
			}

			if (GatheringSkillOrder != null && GatheringSkillOrder.GatheringSkills.Count > 0)
			{
				initialGatherRotation = gatherRotation = new GatheringSkillOrderGatheringRotation();

				Logger.Info("Using rotation -> " + gatherRotation.Attributes.Name);
				return true;
			}

			IGatheringRotation rotation;
			if (!Rotations.TryGetValue(GatherRotation, out rotation))
			{
				// ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
				if (!Rotations.TryGetValue("RegularNode", out rotation))
				{
					rotation = new RegularNodeGatheringRotation();
				}
				else
				{
					rotation = Rotations["RegularNode"];
				}

				Logger.Warn("Could not find rotation, using RegularNode instead.");
			}

			initialGatherRotation = gatherRotation = rotation;

			Logger.Info("Using rotation -> " + rotation.Attributes.Name);

			return true;
		}
示例#2
0
		private void ResolveGatherRotation()
		{
			if (gatherRotation != null)
			{
				return;
			}

			if (GatheringSkillOrder != null && GatheringSkillOrder.GatheringSkills.Count > 0)
			{
				initialGatherRotation = gatherRotation = new GatheringSkillOrderGatheringRotation();

				Logger.Info(Localization.Localization.ExGather_RotationUse + gatherRotation.Attributes.Name);
				return;
			}

			IGatheringRotation rotation;
			if (!Rotations.TryGetValue(GatherRotation, out rotation))
			{
				// ReSharper disable once ConvertIfStatementToConditionalTernaryExpression
				if (!Rotations.TryGetValue("RegularNode", out rotation))
				{
					rotation = new RegularNodeGatheringRotation();
				}
				else
				{
					rotation = Rotations["RegularNode"];
				}

				Logger.Warn(Localization.Localization.ExGather_RotationNotFound);
			}

			initialGatherRotation = gatherRotation = rotation;

			Logger.Info("Using rotation -> " + rotation.Attributes.Name);
		}