コード例 #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 2:
            {
                m_TimerTicksRequired = reader.ReadEncodedInt();
                if (m_TimerTicksRequired == 0)
                {
                    m_TimerTicksRequired = 10;
                }
                goto case 1;
            }

            case 1:
            {
                m_Location   = reader.ReadString();
                m_giveReward = reader.ReadBool();
                goto case 0;
            }

            case 0:
            {
                m_Addon = reader.ReadItem() as PentagramAddon;
                m_Count = reader.ReadInt();
                break;
            }
            }
        }
コード例 #2
0
ファイル: GenGauntlet.cs プロジェクト: 3HMonkey/DefianceUOR
        public static GauntletSpawner CreateSpawner(
            string typeName, int xSpawner, int ySpawner, int xDoor, int yDoor,
            int xPentagram, int yPentagram, bool doorEastToWest, int xStart, int yStart, int xWidth, int yHeight
            )
        {
            var spawner = new GauntletSpawner(typeName);

            spawner.MoveToWorld(new Point3D(xSpawner, ySpawner, -1), Map.Malas);

            if (xDoor > 0 && yDoor > 0)
            {
                spawner.Door = CreateDoorSet(xDoor, yDoor, doorEastToWest, 0);
            }

            spawner.RegionBounds = new Rectangle2D(xStart, yStart, xWidth, yHeight);

            if (xPentagram > 0 && yPentagram > 0)
            {
                var pentagram = new PentagramAddon();

                pentagram.MoveToWorld(new Point3D(xPentagram, yPentagram, -1), Map.Malas);

                spawner.Addon = pentagram;
            }

            return(spawner);
        }
コード例 #3
0
 public LastManPentagram()
     : base(0x1F1C)
 {
     m_Count = 10;
     m_TimerTicksRequired = 10;
     m_Addon = new PentagramAddon();
     Movable = false;
     Visible = false;
 }
コード例 #4
0
        public override void OnRead()
        {
            IdolQuester quester = ((SummonQuest)System).IdolQuester;
            QuestType   type    = quester.Type;

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

                if (altar == null)
                {
                    System.From.SendMessage("Internal error: unable to find summoning altar. Quest unable to continue.");
                    System.Cancel();
                }
                else if ((WrongBoss.Active == false && type == QuestType.Wrong) ||
                         (HythBoss.Active == false && type == QuestType.Hythloth) ||
                         (DecBoss.Active == false && type == QuestType.Deceit) ||
                         (CoveBoss.Active == false && type == QuestType.Covetous) ||
                         (DestBoss.Active == false && type == QuestType.Destard) ||
                         (ShameBoss.Active == false && type == QuestType.Shame) ||
                         (DespBossTwo.Active == false && DespBoss.Active == false && type == QuestType.Despise))
                {
                    switch (type)
                    {
                    case QuestType.Shame: m_MiniBoss = new ShameBoss(); break;

                    case QuestType.Deceit: m_MiniBoss = new DecBoss(); break;

                    case QuestType.Destard: m_MiniBoss = new DestBoss(); break;

                    case QuestType.Hythloth: m_MiniBoss = new HythBoss(); break;

                    case QuestType.Despise: m_MiniBoss = new DespBoss(); break;

                    case QuestType.Covetous: m_MiniBoss = new CoveBoss(); break;

                    case QuestType.Wrong: m_MiniBoss = new WrongBoss(); break;
                    }

                    m_MiniBoss.MoveToWorld(altar.Location, altar.Map);
                    System.AddObjective(new VanquishMinibossObjective());
                }
                else
                {
                    quester.SayTo(System.From, "The Keeper is already here!");

                    System.Cancel();
                }
            }
        }
コード例 #5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
            {
                m_TimerTicksRequired = reader.ReadEncodedInt();
                m_Location           = reader.ReadString();
                m_Addon = reader.ReadItem() as PentagramAddon;
                m_Count = reader.ReadInt();
                break;
            }
            }
        }
コード例 #6
0
ファイル: GuardianRoom.cs プロジェクト: UODOC/MyShard
        private void CheckPentagram()
        {
            IPooledEnumerable eable = Map.Malas.GetItemsInRange(PentagramLoc, 0);

            foreach (Item item in eable)
            {
                if (item is PentagramAddon)
                {
                    eable.Free();
                    return;
                }
            }

            eable.Free();

            var addon = new PentagramAddon();

            addon.MoveToWorld(PentagramLoc, Map.Malas);
        }
コード例 #7
0
ファイル: GauntletSpawner.cs プロジェクト: MythikGN/Mythik
        public static GauntletSpawner CreateSpawner(string typeName, int xSpawner, int ySpawner, int xDoor, int yDoor, int xPentagram, int yPentagram, bool doorEastToWest, int xStart, int yStart, int xWidth, int yHeight)
        {
            var spawnLoc = new Point3D(xSpawner, ySpawner, -1);
            var map      = Map.Malas;

            if (!MythikStaticValues.UpdateLoc(ref spawnLoc, ref map))
            {
                return(null);
            }

            GauntletSpawner spawner = new GauntletSpawner(typeName);

            spawner.MoveToWorld(spawnLoc, map);

            if (xDoor > 0 && yDoor > 0)
            {
                spawner.Door = CreateDoorSet(xDoor, yDoor, doorEastToWest, 0);
            }

            spawner.RegionBounds = MythikStaticValues.UpdateDoomBounds(new Rectangle2D(xStart, yStart, xWidth, yHeight));

            if (xPentagram > 0 && yPentagram > 0)
            {
                var PentagramLoc = new Point3D(xPentagram, yPentagram, -1);
                var mapPenta     = Map.Malas;
                if (!MythikStaticValues.UpdateLoc(ref PentagramLoc, ref mapPenta))
                {
                    return(null);
                }
                PentagramAddon pentagram = new PentagramAddon();

                pentagram.MoveToWorld(PentagramLoc, mapPenta);

                spawner.Addon = pentagram;
            }

            return(spawner);
        }
コード例 #8
0
        public override void OnComplete()
        {
            IdolQuester quester = ((SummonQuest)System).IdolQuester;

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

                if (altar == null)
                {
                    System.From.SendMessage("Internal error: unable to find summoning altar. Quest unable to continue.");
                    System.Cancel();
                }
                else
                {
                    System.AddConversation(new VanquishMinibossConversation());
                }
            }
        }
コード例 #9
0
ファイル: GauntletSpawner.cs プロジェクト: marcusdiaz/ServUO
        public static GauntletSpawner CreateSpawner(
            string typeName,
            int xSpawner,
            int ySpawner,
            int xDoor,
            int yDoor,
            int xPentagram,
            int yPentagram,
            bool doorEastToWest,
            int xStart,
            int yStart,
            int xWidth,
            int yHeight)
        {
            var sp = new Point3D(xSpawner, ySpawner, -1);

            GauntletSpawner spawner;

            if (FindObject(Map.Malas, sp, 0, out spawner))
            {
                spawner.Delete();
            }

            spawner = new GauntletSpawner(typeName);
            spawner.MoveToWorld(sp, Map.Malas);

            if (spawner.Door != null)
            {
                DeleteDoor(spawner.Door);
            }

            if (xDoor > 0 && yDoor > 0)
            {
                spawner.Door = CreateDoorSet(xDoor, yDoor, doorEastToWest, 0);
            }

            spawner.RegionBounds = new Rectangle2D(xStart, yStart, xWidth, yHeight);

            if (spawner.Addon != null)
            {
                spawner.Addon.Delete();
                spawner.Addon = null;
            }

            if (xPentagram > 0 && yPentagram > 0)
            {
                var pp = new Point3D(xPentagram, yPentagram, -1);

                PentagramAddon pentagram;

                if (FindObject(Map.Malas, pp, 0, out pentagram))
                {
                    pentagram.Delete();
                }

                pentagram = new PentagramAddon();
                pentagram.MoveToWorld(pp, Map.Malas);

                WeakEntityCollection.Add("doom", pentagram);

                spawner.Addon = pentagram;
            }

            WeakEntityCollection.Add("doom", spawner);

            return(spawner);
        }