public ItemTypesGump(PlayerMobile user, Level l, Gump parent = null)
			: base(user, parent, list: l.RewardItems, title: "Regular Mob Drops List", emptyText: "No Items to display.")
		{
            Level = l;
		}
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            Invaders = new List<Mobile>();
            Levels = new List<Level>();
            ParticipantsScores = new Dictionary<PlayerMobile, int>();
            TownGates = new List<Moongate>();

            base.Deserialize(reader);

            int version = reader.ReadInt();

            UID = new InvasionSerial(reader);

            switch (version)
            {
                case 1:
                {
                    SpawnTownGates = reader.ReadBool();
                    int countgates = reader.ReadInt();

                    if (countgates > 0)
                    {
                        for (int i = 0; i < countgates; i++)
                        {
                            var gate = reader.ReadItem<Moongate>();
                            if (gate != null)
                            {
                                TownGates.Add(gate);
                            }
                        }
                    }


                    goto case 0;
                }
                case 0:
                {
                    InvasionName = reader.ReadString();
                    RegionName = reader.ReadString();
                    DateStarted = reader.ReadDateTime();
                    Status = (InvasionStatus) reader.ReadInt();
                    _CoreTicks = reader.ReadInt();
                    CurrentLevelKills = reader.ReadInt();

                    int count = reader.ReadInt();

                    if (count > 0)
                    {
                        for (int i = 0; i < count; i++)
                        {
                            Mobile invader = reader.ReadMobile();
                            if (invader != null)
                            {
                                ((BaseCreature) invader).Invasion = this;
                                Invaders.Add(invader);
                            }
                        }
                    }

                    count = reader.ReadInt();

                    if (count > 0)
                    {
                        for (int i = 0; i < count; i++)
                        {
                            var level = new Level(reader);
                            Levels.Add(level);
                        }
                    }

                    count = reader.ReadInt();

                    if (count > 0)
                    {
                        for (int i = 0; i < count; i++)
                        {
                            var player = reader.ReadMobile<PlayerMobile>();
                            int score = reader.ReadInt();
                            if (player != null)
                            {
                                ParticipantsScores.Add(player, score);
                            }
                        }
                    }

                    CurrentLevel = new Level(reader);
                }
                    break;
            }
        }
        public CreatureTypesGump(PlayerMobile user, Level l, Gump parent = null)
			: base(user, parent, list: l.Creatures, title: "Creatures List", emptyText: "No Creatures to display.")
		{
            Level = l;
		}