Aura.Channel.Scripting.Scripts.NpcScript.CanDoPtj C# (CSharp) Метод

CanDoPtj() публичный Метод

Returns true if the player can do a PTJ of type, because he hasn't done one of the same type today.
public CanDoPtj ( PtjType type, int remaining = 99 ) : bool
type PtjType
remaining int
Результат bool
		public bool CanDoPtj(PtjType type, int remaining = 99)
		{
			// Always allow devCATs
			//if (this.Title == TitleId.devCAT)
			//	return true;

			// Check remaining
			if (remaining <= 0)
				return false;

			// Check if PTJ has already been done this Erinn day
			var ptj = this.Player.Quests.GetPtjTrackRecord(type);
			var change = new ErinnTime(ptj.LastChange);
			var now = ErinnTime.Now;

			return (now.Day != change.Day || now.Month != change.Month || now.Year != change.Year);
		}