예제 #1
0
        public FindIngredientObjective(Ingredient[] oldIngredients, bool blackheartMet)
        {
            if (!blackheartMet)
            {
                m_Ingredients = new Ingredient[oldIngredients.Length + 1];

                for (int i = 0; i < oldIngredients.Length; i++)
                {
                    m_Ingredients[i] = oldIngredients[i];
                }

                m_Ingredients[m_Ingredients.Length - 1] = IngredientInfo.RandomIngredient(oldIngredients);
            }
            else
            {
                m_Ingredients = new Ingredient[oldIngredients.Length];

                for (int i = 0; i < oldIngredients.Length; i++)
                {
                    m_Ingredients[i] = oldIngredients[i];
                }
            }

            m_BlackheartMet = blackheartMet;
        }
예제 #2
0
        public override void RenderProgress(BaseQuestGump gump)
        {
            if (!Completed)
            {
                IngredientInfo info = IngredientInfo.Get(this.Ingredient);

                gump.AddHtmlLocalized(70, 260, 270, 100, info.Name, BaseQuestGump.Blue, false, false);
                gump.AddLabel(70, 280, 0x64, CurProgress.ToString());
                gump.AddLabel(100, 280, 0x64, "/");
                gump.AddLabel(130, 280, 0x64, info.Quantity.ToString());
            }
            else
            {
                base.RenderProgress(gump);
            }
        }
예제 #3
0
        public override void OnKill(BaseCreature creature, Container corpse)
        {
            IngredientInfo info = IngredientInfo.Get(this.Ingredient);

            for (int i = 0; i < info.Creatures.Length; i++)
            {
                Type type = info.Creatures[i];

                if (creature.GetType() == type)
                {
                    System.From.SendLocalizedMessage(1055043, "#" + info.Name); // You gather a ~1_INGREDIENT_NAME~ from the corpse.

                    CurProgress++;

                    break;
                }
            }
        }
예제 #4
0
        public override bool IgnoreYoungProtection(Mobile from)
        {
            if (Completed)
            {
                return(false);
            }

            IngredientInfo info     = IngredientInfo.Get(this.Ingredient);
            Type           fromType = from.GetType();

            for (int i = 0; i < info.Creatures.Length; i++)
            {
                if (fromType == info.Creatures[i])
                {
                    return(true);
                }
            }

            return(false);
        }