Exemplo n.º 1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            //Version 0
            if (version >= 0)
            {
                m_ContestedPointsPerMinute  = reader.ReadDouble();
                m_ControlledPointsPerMinute = reader.ReadDouble();
                m_HotspotType = (HotspotEventType)reader.ReadInt();

                int participantsCount = reader.ReadInt();
                for (int a = 0; a < participantsCount; a++)
                {
                    BaseShip ship   = (BaseShip)reader.ReadItem();
                    int      points = reader.ReadInt();

                    OceanHotspotParticipantEntry entry = new OceanHotspotParticipantEntry(ship);
                    entry.m_Points = points;

                    m_Participants.Add(entry);
                }
            }

            //-----

            if (!m_Instances.Contains(this))
            {
                m_Instances.Add(this);
            }
        }
Exemplo n.º 2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            //Version 0
            if (version >= 0)
            {
                m_DifficultyValueToPointsRatio = reader.ReadDouble();
                m_HotspotType = (HotspotEventType)reader.ReadInt();

                int participantsCount = reader.ReadInt();
                for (int a = 0; a < participantsCount; a++)
                {
                    PlayerMobile player = (PlayerMobile)reader.ReadMobile();
                    int          points = reader.ReadInt();

                    InvasionHotspotParticipantEntry entry = new InvasionHotspotParticipantEntry(player);
                    entry.m_Points = points;

                    m_Participants.Add(entry);
                }
            }

            //-----

            if (!m_Instances.Contains(this))
            {
                m_Instances.Add(this);
            }
        }
Exemplo n.º 3
0
        private string Image(HotspotEventType hsType)
        {
            switch (hsType)
            {
            case (HotspotEventType.Enter): return("Enter");

            case (HotspotEventType.Exit): return("Exit");

            default:
                return("Unknown");
            }
        }
Exemplo n.º 4
0
        public static OceanHotspotEventTypeDetail GetHotspotEventTypeDetail(HotspotEventType eventType)
        {
            OceanHotspotEventTypeDetail eventTypeDetail = new OceanHotspotEventTypeDetail();

            switch (eventType)
            {
            case HotspotEventType.KingOfTheHill:
                eventTypeDetail.m_Name        = "King of the Hill";
                eventTypeDetail.m_Description = new string[] { "" };
                break;
            }

            return(eventTypeDetail);
        }
Exemplo n.º 5
0
        public static InvasionHotspotEventTypeDetail GetHotspotEventTypeDetail(HotspotEventType eventType)
        {
            InvasionHotspotEventTypeDetail eventTypeDetail = new InvasionHotspotEventTypeDetail();

            switch (eventType)
            {
            case HotspotEventType.Invasion:
                eventTypeDetail.m_Name        = "Invasion";
                eventTypeDetail.m_Description = new string[] { "" };
                break;
            }

            return(eventTypeDetail);
        }
Exemplo n.º 6
0
        public static HotspotEventType GetRandomEventType()
        {
            HotspotEventType eventType = (HotspotEventType)Utility.RandomMinMax(0, Enum.GetNames(typeof(HotspotEventType)).Length - 1);

            return(eventType);
        }