public override void Open(Mobile from, bool checkSelfLoot)
        {
            if (!from.InRange(GetWorldLocation(), 2))
            {
                return;
            }

            if (from is PlayerMobile player)
            {
                QuestSystem qs = player.Quest;

                if (qs is WitchApprenticeQuest)
                {
                    FindApprenticeObjective obj = qs.FindObjective <FindApprenticeObjective>();
                    if (obj?.Completed == false)
                    {
                        if (obj.Corpse == this)
                        {
                            obj.Complete();
                            Delete();
                        }
                        else
                        {
                            SendLocalizedMessageTo(from,
                                                   1055047); // You examine the corpse, but it doesn't fit the description of the particular apprentice the Hag tasked you with finding.
                        }

                        return;
                    }
                }
            }

            SendLocalizedMessageTo(from, 1055048); // You examine the corpse, but find nothing of interest.
        }
Esempio n. 2
0
        public override void Open(Mobile from, bool checkSelfLoot)
        {
            if (!from.InRange(this.GetWorldLocation(), 2))
            {
                return;
            }

            PlayerMobile player = from as PlayerMobile;

            if (player != null)
            {
                QuestSystem qs = player.Quest;

                if (qs is WitchApprenticeQuest)
                {
                    FindApprenticeObjective obj = qs.FindObjective(typeof(FindApprenticeObjective)) as FindApprenticeObjective;

                    if (obj != null && !obj.Completed)
                    {
                        if (obj.Corpse == this)
                        {
                            obj.Complete();
                            this.Delete();
                        }
                        else
                        {
                            this.SendLocalizedMessageTo(from, 1055047); // You examine the corpse, but it doesn't fit the description of the particular apprentice the Hag tasked you with finding.
                        }

                        return;
                    }
                }
            }

            this.SendLocalizedMessageTo(from, 1055048); // You examine the corpse, but find nothing of interest.
        }