Example #1
0
        public DeliverObjective(Type delivery, int amount, TextDefinition name, Type destination, bool spawnsDelivery = true)
        {
            Delivery       = delivery;
            Amount         = amount;
            Name           = name;
            Destination    = destination;
            SpawnsDelivery = spawnsDelivery;

            if (MLQuestSystem.Debug && name.Number > 0)
            {
                int itemid = CollectObjective.LabelToItemID(name.Number);

                if (itemid <= 0 || itemid > 0x4000)
                {
                    Console.WriteLine("Warning: cliloc {0} is likely giving the wrong item ID", name.Number);
                }
            }
        }
Example #2
0
        public DeliverObjective(Type delivery, int amount, TextDefinition name, Type destination, bool spawnsDelivery = true)
        {
            Delivery       = delivery;
            Amount         = amount;
            Name           = name;
            Destination    = destination;
            SpawnsDelivery = spawnsDelivery;

            if (MLQuestSystem.Debug && name.Number > 0)
            {
                var itemid = CollectObjective.LabelToItemID(name.Number);

                if (itemid is <= 0 or > 0x4000)
                {
                    logger.Warning("Cliloc {0} is likely giving the wrong item ID", name.Number);
                }
            }
        }
Example #3
0
        public override void WriteToGump(Gump g, ref int y)
        {
            string amount = Amount.ToString();

            g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x15F90); // Deliver
            g.AddLabel(143, y, 0x481, amount);

            if (Name.Number > 0)
            {
                g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF);
                g.AddItem(350, y, CollectObjective.LabelToItemID(Name.Number));
            }
            else if (Name.String != null)
            {
                g.AddLabel(143 + amount.Length * 15, y, 0x481, Name.String);
            }

            y += 32;

            g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x15F90); // Deliver to
            g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Destination));

            y += 16;
        }
Example #4
0
 public CollectObjectiveInstance(CollectObjective objective, MLQuestInstance instance)
     : base(instance, objective)
 {
     m_Objective = objective;
 }
		public CollectObjectiveInstance( CollectObjective objective, MLQuestInstance instance )
			: base( instance, objective )
		{
			m_Objective = objective;
		}