Beispiel #1
0
        public void EndSeason()
        {
            foreach (KeyValuePair <HuntType, List <HuntingKillEntry> > kvp in m_Leaders)
            {
                foreach (HuntingKillEntry killEntry in kvp.Value)
                {
                    Mobile owner = killEntry.Owner;

                    if (owner != null)
                    {
                        if (!m_UnclaimedWinners.ContainsKey(owner))
                        {
                            m_UnclaimedWinners[owner] = 1;
                        }
                        else
                        {
                            m_UnclaimedWinners[owner]++;
                        }
                    }
                }
            }

            m_Leaders.Clear();

            DateTime now  = DateTime.Now;
            DateTime ends = DateTime.Now + TimeSpan.FromDays(32);

            m_SeasonEnds   = new DateTime(ends.Year, ends.Month, 1, 0, 0, 0);
            m_SeasonBegins = new DateTime(now.Year, now.Month, 1, 0, 0, 0);

            HuntingDisplayTrophy.InvalidateDisplayTrophies();
        }
Beispiel #2
0
        public void TrySubmitKill(HuntMaster master, Mobile from, HuntingPermit permit)
        {
            if (permit.KillEntry == null || permit.KillEntry.KillIndex < 0 || permit.KillEntry.KillIndex > HuntingTrophyInfo.Infos.Count)
            {
                master.SayTo(from, 1155706); // That is not a valid kill.
            }
            else
            {
                HuntingTrophyInfo info = HuntingTrophyInfo.Infos[permit.KillEntry.KillIndex];

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

                    List <HuntingKillEntry> leaders = m_Leaders[info.HuntType];

                    if (leaders.Count == 0 || permit.KillEntry.Measurement >= leaders[0].Measurement)
                    {
                        if (leaders.Count > 0 && permit.KillEntry.Measurement > leaders[0].Measurement)
                        {
                            leaders.Clear();
                        }

                        leaders.Add(new HuntingKillEntry(permit.Owner, permit.KillEntry.Measurement, permit.KillEntry.DateKilled, permit.KillEntry.KillIndex, permit.KillEntry.Location));

                        from.SendGump(new BasicInfoGump(1155722));

                        HuntingDisplayTrophy.InvalidateDisplayTrophies();
                        master.PlaySound(0x3D);
                    }
                    else
                    {
                        master.SayTo(from, 1155721); // Begging thy pardon, but your permit has not broken the current record for this species!
                    }
                    permit.HasSubmitted = true;

                    CheckKill(info.HuntType, permit.KillEntry);

                    if (from is PlayerMobile)
                    {
                        BaseQuest quest = QuestHelper.GetQuest((PlayerMobile)from, typeof(HuntmastersChallengeQuest));

                        if (quest != null && quest is HuntmastersChallengeQuest)
                        {
                            ((HuntmastersChallengeQuest)quest).CompleteChallenge();
                        }
                    }
                }
            }
        }
Beispiel #3
0
        public void EndSeason()
        {
            foreach (KeyValuePair <HuntType, List <HuntingKillEntry> > kvp in m_Leaders)
            {
                foreach (HuntingKillEntry killEntry in kvp.Value)
                {
                    if (killEntry.Owner != null)
                    {
                        m_UnclaimedWinners[killEntry.Owner] = killEntry;
                    }
                }
            }

            m_Leaders.Clear();

            m_SeasonBegins = DateTime.Now;
            DateTime ends = DateTime.Now + TimeSpan.FromDays(30);

            m_SeasonEnds = new DateTime(ends.Year, ends.Month, ends.Day, 8, 0, 0);

            HuntingDisplayTrophy.InvalidateDisplayTrophies();
        }
Beispiel #4
0
        private void Setup()
        {
            Static s;

            for (int i = 0; i < 9; i++)
            {
                s = new Static(2931);
                s.MoveToWorld(new Point3D(748 + i, 2136, 0), Map.Trammel);

                s = new Static(2928);
                s.MoveToWorld(new Point3D(748 + i, 2137, 0), Map.Trammel);

                s = new Static(2931);
                s.MoveToWorld(new Point3D(748 + i, 2136, 0), Map.Felucca);

                s = new Static(2928);
                s.MoveToWorld(new Point3D(748 + i, 2137, 0), Map.Felucca);
            }

            HuntingDisplayTrophy trophy = new HuntingDisplayTrophy(HuntType.GrizzlyBear);

            trophy.MoveToWorld(new Point3D(748, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.GrizzlyBear);
            trophy.MoveToWorld(new Point3D(748, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.GrayWolf);
            trophy.MoveToWorld(new Point3D(751, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.GrayWolf);
            trophy.MoveToWorld(new Point3D(751, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Cougar);
            trophy.MoveToWorld(new Point3D(753, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Cougar);
            trophy.MoveToWorld(new Point3D(753, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Turkey);
            trophy.MoveToWorld(new Point3D(756, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Turkey);
            trophy.MoveToWorld(new Point3D(756, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Bull);
            trophy.MoveToWorld(new Point3D(748, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Bull);
            trophy.MoveToWorld(new Point3D(748, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Boar);
            trophy.MoveToWorld(new Point3D(750, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Boar);
            trophy.MoveToWorld(new Point3D(750, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Walrus);
            trophy.MoveToWorld(new Point3D(752, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Walrus);
            trophy.MoveToWorld(new Point3D(752, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Alligator);
            trophy.MoveToWorld(new Point3D(754, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Alligator);
            trophy.MoveToWorld(new Point3D(754, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Eagle);
            trophy.MoveToWorld(new Point3D(756, 2136, 3), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Eagle);
            trophy.MoveToWorld(new Point3D(756, 2136, 3), Map.Trammel);

            XmlSpawner spawner = new XmlSpawner("HuntMaster");

            spawner.MoveToWorld(new Point3D(747, 2148, 0), Map.Felucca);
            spawner.DoRespawn = true;

            spawner = new XmlSpawner("HuntMaster");
            spawner.MoveToWorld(new Point3D(747, 2148, 0), Map.Trammel);
            spawner.DoRespawn = true;
        }
Beispiel #5
0
        private void Setup()
        {
            Static s;

            for (int i = 0; i < 9; i++)
            {
                s = new Static(2931);
                s.MoveToWorld(new Point3D(748 + i, 2136, 0), Map.Trammel);

                s = new Static(2928);
                s.MoveToWorld(new Point3D(748 + i, 2137, 0), Map.Trammel);

                s = new Static(2931);
                s.MoveToWorld(new Point3D(748 + i, 2136, 0), Map.Felucca);

                s = new Static(2928);
                s.MoveToWorld(new Point3D(748 + i, 2137, 0), Map.Felucca);
            }

            s = new Static(2923);
            s.MoveToWorld(new Point3D(736, 2150, 0), Map.Trammel);

            s = new Static(2925);
            s.MoveToWorld(new Point3D(736, 2149, 0), Map.Trammel);

            s = new Static(2924);
            s.MoveToWorld(new Point3D(736, 2148, 0), Map.Trammel);

            s = new Static(2923);
            s.MoveToWorld(new Point3D(736, 2146, 0), Map.Trammel);

            s = new Static(2925);
            s.MoveToWorld(new Point3D(736, 2145, 0), Map.Trammel);

            s = new Static(2924);
            s.MoveToWorld(new Point3D(736, 2144, 0), Map.Trammel);

            s = new Static(2923);
            s.MoveToWorld(new Point3D(736, 2150, 0), Map.Felucca);

            s = new Static(2925);
            s.MoveToWorld(new Point3D(736, 2149, 0), Map.Felucca);

            s = new Static(2924);
            s.MoveToWorld(new Point3D(736, 2148, 0), Map.Felucca);

            s = new Static(2923);
            s.MoveToWorld(new Point3D(736, 2146, 0), Map.Felucca);

            s = new Static(2925);
            s.MoveToWorld(new Point3D(736, 2145, 0), Map.Felucca);

            s = new Static(2924);
            s.MoveToWorld(new Point3D(736, 2144, 0), Map.Felucca);

            HuntingDisplayTrophy trophy = new HuntingDisplayTrophy(HuntType.GrizzlyBear);

            trophy.MoveToWorld(new Point3D(748, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.GrizzlyBear);
            trophy.MoveToWorld(new Point3D(748, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.GrayWolf);
            trophy.MoveToWorld(new Point3D(751, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.GrayWolf);
            trophy.MoveToWorld(new Point3D(751, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Cougar);
            trophy.MoveToWorld(new Point3D(753, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Cougar);
            trophy.MoveToWorld(new Point3D(753, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Turkey);
            trophy.MoveToWorld(new Point3D(756, 2137, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Turkey);
            trophy.MoveToWorld(new Point3D(756, 2137, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Bull);
            trophy.MoveToWorld(new Point3D(748, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Bull);
            trophy.MoveToWorld(new Point3D(748, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Boar);
            trophy.MoveToWorld(new Point3D(750, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Boar);
            trophy.MoveToWorld(new Point3D(750, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Walrus);
            trophy.MoveToWorld(new Point3D(752, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Walrus);
            trophy.MoveToWorld(new Point3D(752, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Alligator);
            trophy.MoveToWorld(new Point3D(754, 2136, 2), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Alligator);
            trophy.MoveToWorld(new Point3D(754, 2136, 2), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Eagle);
            trophy.MoveToWorld(new Point3D(756, 2136, 3), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Eagle);
            trophy.MoveToWorld(new Point3D(756, 2136, 3), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Saurosaurus);
            trophy.MoveToWorld(new Point3D(746, 2136, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Saurosaurus);
            trophy.MoveToWorld(new Point3D(746, 2136, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Anchisaur);
            trophy.MoveToWorld(new Point3D(744, 2136, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Anchisaur);
            trophy.MoveToWorld(new Point3D(744, 2136, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.BlackTiger);
            trophy.MoveToWorld(new Point3D(744, 2138, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.BlackTiger);
            trophy.MoveToWorld(new Point3D(744, 2138, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.WhiteTiger);
            trophy.MoveToWorld(new Point3D(744, 2140, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.WhiteTiger);
            trophy.MoveToWorld(new Point3D(744, 2140, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Triceratops);
            trophy.MoveToWorld(new Point3D(744, 2142, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Triceratops);
            trophy.MoveToWorld(new Point3D(744, 2142, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Allosaurus);
            trophy.MoveToWorld(new Point3D(743, 2144, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Allosaurus);
            trophy.MoveToWorld(new Point3D(743, 2144, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.MyrmidexDrone);
            trophy.MoveToWorld(new Point3D(741, 2144, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.MyrmidexDrone);
            trophy.MoveToWorld(new Point3D(741, 2144, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Dimetrosaur);
            trophy.MoveToWorld(new Point3D(758, 2136, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Dimetrosaur);
            trophy.MoveToWorld(new Point3D(758, 2136, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Tiger);
            trophy.MoveToWorld(new Point3D(738, 2144, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Tiger);
            trophy.MoveToWorld(new Point3D(738, 2144, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Najasaurus);
            trophy.MoveToWorld(new Point3D(736, 2145, 6), Map.Trammel);

            s = new Static(0x9C03);
            s.MoveToWorld(new Point3D(736, 2144, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Najasaurus);
            trophy.MoveToWorld(new Point3D(736, 2145, 6), Map.Felucca);

            s = new Static(0x9C03);
            s.MoveToWorld(new Point3D(736, 2144, 6), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.Lion);
            trophy.MoveToWorld(new Point3D(736, 2147, 0), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.Lion);
            trophy.MoveToWorld(new Point3D(736, 2147, 0), Map.Felucca);

            trophy = new HuntingDisplayTrophy(HuntType.MyrmidexLarvae);
            trophy.MoveToWorld(new Point3D(736, 2149, 6), Map.Trammel);

            s = new Static(0x9C01);
            s.MoveToWorld(new Point3D(736, 2149, 6), Map.Trammel);

            trophy = new HuntingDisplayTrophy(HuntType.MyrmidexLarvae);
            trophy.MoveToWorld(new Point3D(736, 2149, 6), Map.Felucca);

            s = new Static(0x9C01);
            s.MoveToWorld(new Point3D(736, 2149, 6), Map.Felucca);

            XmlSpawner spawner = new XmlSpawner("HuntMaster");

            spawner.MoveToWorld(new Point3D(747, 2148, 0), Map.Felucca);
            spawner.DoRespawn = true;

            spawner = new XmlSpawner("HuntMaster");
            spawner.MoveToWorld(new Point3D(747, 2148, 0), Map.Trammel);
            spawner.DoRespawn = true;
        }