Ejemplo n.º 1
0
        public TimeBoostToken(ITimeBoost boost, int amount)
            : base(Utility.RandomList(4173, 4174))
        {
            Boost = boost;

            Stackable = true;
            Amount    = Math.Max(1, Math.Min(60000, amount));

            LootType = LootType.Blessed;
        }
Ejemplo n.º 2
0
        public static void Write(this GenericWriter writer, ITimeBoost boost)
        {
            writer.SetVersion(0);

            if (boost != null)
            {
                writer.Write(true);
                writer.Write(boost.Value);
            }
            else
            {
                writer.Write(false);
            }
        }
Ejemplo n.º 3
0
 public TimeBoostToken(ITimeBoost boost)
     : this(boost, 1)
 {
 }
Ejemplo n.º 4
0
 public static bool Consume(PlayerMobile m, ITimeBoost b, int amount)
 {
     return(m != null && Consume(m.Account, b, amount));
 }
Ejemplo n.º 5
0
        public static bool Consume(IAccount a, ITimeBoost b, int amount)
        {
            var p = EnsureProfile(a);

            return(p != null && p.Consume(b, amount));
        }
Ejemplo n.º 6
0
		public TimeBoostToken(ITimeBoost boost, int amount)
			: base(Utility.RandomList(4173, 4174))
		{
			Boost = boost;

			Stackable = true;
			Amount = Math.Max(1, Math.Min(60000, amount));

			LootType = LootType.Blessed;
		}
Ejemplo n.º 7
0
 public static bool CanCredit(PlayerMobile m, ITimeBoost b, int amount)
 {
     return(m != null && CanCredit(m.Account, b, amount));
 }
Ejemplo n.º 8
0
		public TimeBoostToken(ITimeBoost boost)
			: this(boost, 1)
		{ }
Ejemplo n.º 9
0
		public static bool Credit(PlayerMobile m, ITimeBoost b, int amount)
		{
			return m != null && Credit(m.Account, b, amount);
		}
Ejemplo n.º 10
0
		public static void Write(this GenericWriter writer, ITimeBoost boost)
		{
			writer.SetVersion(0);

			if (boost != null)
			{
				writer.Write(true);
				writer.Write(boost.Value);
			}
			else
			{
				writer.Write(false);
			}
		}
Ejemplo n.º 11
0
		public static bool Consume(IAccount a, ITimeBoost b, int amount)
		{
			var p = EnsureProfile(a);

			return p != null && p.Consume(b, amount);
		}
Ejemplo n.º 12
0
		public static bool CanConsume(PlayerMobile m, ITimeBoost b, int amount)
		{
			return m != null && CanConsume(m.Account, b, amount);
		}