Exemple #1
0
 private void ClaimWin(Mobile from, HuntingKillEntry entry)
 {
     TryDropItemTo(from, new HarvestersBlade());
     TryDropItemTo(from, new HuntmastersRewardTitleDeed());
     TryDropItemTo(from, new RangersGuildSash());
     TryDropItemTo(from, new HornOfPlenty());
 }
Exemple #2
0
        private void CheckKill(HuntType type, HuntingKillEntry entry)
        {
            if (!m_Top10.ContainsKey(type))
            {
                m_Top10[type] = new List <HuntingKillEntry>();
            }

            if (m_Top10[type].Count < 10)
            {
                m_Top10[type].Add(entry);
            }
            else
            {
                List <HuntingKillEntry> copy = new List <HuntingKillEntry>(m_Top10[type]);
                copy.Sort();

                for (int i = 0; i < copy.Count; i++)
                {
                    if (entry.Measurement > copy[i].Measurement)
                    {
                        m_Top10[type].Remove(copy[i]);
                        m_Top10[type].Add(entry);
                        break;
                    }
                }
            }
        }
Exemple #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int v = reader.ReadInt();

            m_Active       = reader.ReadBool();
            m_SeasonBegins = reader.ReadDateTime();
            m_SeasonEnds   = reader.ReadDateTime();

            m_Top10   = new Dictionary <HuntType, List <HuntingKillEntry> >();
            m_Leaders = new Dictionary <HuntType, List <HuntingKillEntry> >();

            int count = reader.ReadInt();

            for (int i = 0; i < count; i++)
            {
                Mobile           m     = reader.ReadMobile();
                HuntingKillEntry entry = new HuntingKillEntry(reader);

                if (m != null)
                {
                    m_UnclaimedWinners[m] = entry;
                }
            }

            count = reader.ReadInt();
            for (int i = 0; i < count; i++)
            {
                HuntType type = (HuntType)reader.ReadInt();
                int      c    = reader.ReadInt();

                if (!m_Top10.ContainsKey(type))
                {
                    m_Top10[type] = new List <HuntingKillEntry>();
                }

                for (int j = 0; j < c; j++)
                {
                    m_Top10[type].Add(new HuntingKillEntry(reader));
                }
            }

            count = reader.ReadInt();
            for (int i = 0; i < count; i++)
            {
                HuntType type = (HuntType)reader.ReadInt();
                int      c    = reader.ReadInt();

                if (!m_Leaders.ContainsKey(type))
                {
                    m_Leaders[type] = new List <HuntingKillEntry>();
                }

                for (int j = 0; j < c; j++)
                {
                    m_Leaders[type].Add(new HuntingKillEntry(reader));
                }
            }

            m_Instance       = this;
            m_NextHint       = DateTime.UtcNow;
            m_NextBonusIndex = DateTime.UtcNow;

            CheckTimer();
        }
Exemple #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int v = reader.ReadInt();

            m_Owner = reader.ReadMobile();
            m_ProducedTrophy = reader.ReadBool();
            m_HasSubmitted = reader.ReadBool();

            if (reader.ReadInt() == 1)
                m_KillEntry = new HuntingKillEntry(reader);

            if (m_Owner != null && !m_HasSubmitted)
                m_Permits.Add(this);
        }
Exemple #5
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
			int v = reader.ReadInt();

            m_Active = reader.ReadBool();
            m_SeasonBegins = reader.ReadDateTime();
            m_SeasonEnds = reader.ReadDateTime();

			m_Top10 = new Dictionary<HuntType, List<HuntingKillEntry>>();
			m_Leaders = new Dictionary<HuntType, List<HuntingKillEntry>>();
			
			int count = reader.ReadInt();
			for(int i = 0; i < count; i++)
			{
                Mobile m = reader.ReadMobile();
				HuntingKillEntry entry = new HuntingKillEntry(reader);

				if(m != null)
					m_UnclaimedWinners[m] = entry;
			}
			
			count = reader.ReadInt();
			for(int i = 0; i < count; i++)
			{
                HuntType type = (HuntType)reader.ReadInt();
                int c = reader.ReadInt();

                if (!m_Top10.ContainsKey(type))
                    m_Top10[type] = new List<HuntingKillEntry>();

                for (int j = 0; j < c; j++)
                {
                    m_Top10[type].Add(new HuntingKillEntry(reader));
                }
			}
			
			count = reader.ReadInt();
			for(int i = 0; i < count; i++)
			{
				HuntType type = (HuntType)reader.ReadInt();
				int c = reader.ReadInt();

                if (!m_Leaders.ContainsKey(type))
                    m_Leaders[type] = new List<HuntingKillEntry>();
				
				for(int j = 0; j < c; j++)
				{
					m_Leaders[type].Add(new HuntingKillEntry(reader));
				}
			}
			
			m_Instance = this;
            m_NextHint = DateTime.UtcNow;
            m_NextBonusIndex = DateTime.UtcNow;

            CheckTimer();
		}
Exemple #6
0
		private void ClaimWin(Mobile from, HuntingKillEntry entry)
		{
			TryDropItemTo(from, new HarvestersBlade());
            TryDropItemTo(from, new HuntmastersRewardTitleDeed());
			TryDropItemTo(from, new RangersGuildSash());
            TryDropItemTo(from, new HornOfPlenty());
		}
Exemple #7
0
        private void CheckKill(HuntType type, HuntingKillEntry entry)
        {
            if (!m_Top10.ContainsKey(type))
                m_Top10[type] = new List<HuntingKillEntry>();

            if (m_Top10[type].Count < 10)
                m_Top10[type].Add(entry);
            else
            {
                List<HuntingKillEntry> copy = new List<HuntingKillEntry>(m_Top10[type]);
                copy.Sort();

                for(int i = 0; i < copy.Count; i++)
                {
                    if (entry.Measurement > copy[i].Measurement)
                    {
                        m_Top10[type].Remove(copy[i]);
                        m_Top10[type].Add(entry);
                        break;
                    }
                }
            }
        }