Пример #1
0
        public override void OnRead()
        {
            Victoria victoria = ((TheSummoningQuest)System).Victoria;

            if (victoria == null)
            {
                System.From.SendMessage("Internal error: unable to find Victoria. Quest unable to continue.");
                System.Cancel();
            }
            else
            {
                SummoningAltar altar = victoria.Altar;

                if (altar == null)
                {
                    System.From.SendMessage("Internal error: unable to find summoning altar. Quest unable to continue.");
                    System.Cancel();
                }
                else if (altar.Daemon == null || !altar.Daemon.Alive)
                {
                    BoneDemon daemon = new BoneDemon();

                    daemon.MoveToWorld(altar.Location, altar.Map);
                    altar.Daemon = daemon;

                    System.AddObjective(new VanquishDaemonObjective(daemon));
                }
                else
                {
                    victoria.SayTo(System.From, "The devourer has already been summoned.");

                    ((TheSummoningQuest)System).WaitForSummon = true;
                }
            }
        }
Пример #2
0
        public override void ChildDeserialize(GenericReader reader)
        {
            int version = reader.ReadEncodedInt();

            m_Victoria      = reader.ReadMobile() as Victoria;
            m_WaitForSummon = reader.ReadBool();
        }
Пример #3
0
        public override void OnComplete()
        {
            Victoria victoria = ((TheSummoningQuest)System).Victoria;

            if (victoria == null)
            {
                System.From.SendMessage("Internal error: unable to find Victoria. Quest unable to continue.");
                System.Cancel();
            }
            else
            {
                SummoningAltar altar = victoria.Altar;

                if (altar == null)
                {
                    System.From.SendMessage("Internal error: unable to find summoning altar. Quest unable to continue.");
                    System.Cancel();
                }
                else if (altar.Daemon == null || !altar.Daemon.Alive)
                {
                    System.AddConversation(new VanquishDaemonConversation());
                }
                else
                {
                    victoria.SayTo(System.From, "The devourer has already been summoned. Return when the devourer has been slain and I will summon it for you.");
                    ((TheSummoningQuest)System).WaitForSummon = true;
                }
            }
        }
Пример #4
0
        public override void OnComplete()
        {
            Victoria victoria = ((TheSummoningQuest)System).Victoria;

            if (victoria != null)
            {
                SummoningAltar altar = victoria.Altar;

                if (altar != null)
                {
                    altar.CheckDaemon();
                }
            }

            PlayerMobile from = System.From;

            if (!from.Alive)
            {
                from.SendLocalizedMessage(1050033); // The devourer lies dead, unfortunately so do you.  You cannot claim your reward while dead.  You will need to face him again.
                ((TheSummoningQuest)System).WaitForSummon = true;
            }
            else
            {
                bool hasRights = true;

                if (m_Daemon != null)
                {
                    List <DamageStore> lootingRights = BaseCreature.GetLootingRights(m_Daemon.DamageEntries, m_Daemon.HitsMax);

                    for (int i = 0; i < lootingRights.Count; ++i)
                    {
                        DamageStore ds = lootingRights[i];

                        if (ds.m_HasRight && ds.m_Mobile == from)
                        {
                            hasRights = true;
                            break;
                        }
                    }
                }

                if (!hasRights)
                {
                    from.SendLocalizedMessage(1050034); // The devourer lies dead.  Unfortunately you did not sufficiently prove your worth in combating the devourer.  Victoria shall summon another incarnation of the devourer to the circle of stones.  Try again noble adventurer.
                    ((TheSummoningQuest)System).WaitForSummon = true;
                }
                else
                {
                    from.SendLocalizedMessage(1050035); // The devourer lies dead.  Search his corpse to claim your prize!

                    if (m_Daemon != null)
                    {
                        m_CorpseWithSkull = m_Daemon.Corpse as Corpse;
                    }
                }
            }
        }
Пример #5
0
 public TheSummoningQuest(Victoria victoria, PlayerMobile from) : base(from)
 {
     m_Victoria = victoria;
 }