jingz2k2

Member
Dear ServUO community,

Good morning/afternoon/evening! I would like to seek support on where to look to fix the crash.
I am getting a crash everyday with the exact same log. However, I am not sure what is the issue.
From the server files, I am using SVN. Regarding the bountyquest spawner, I am using also SVN and not modified. My baseCreature is modified though. Please have a look below the crash log for my basecreature's onbeforedeath.

Thank you very much for your time and kind attention.

Code:
Server Crash Report
===================

ServUO Version 0.5, Build 6738.3168
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.42000
Time: 6/20/2018 11:43:32 PM
Mobiles: 2324
Items: 71001
Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Server.Items.TreasureMap.ValidateLocation(Int32 x, Int32 y, Map map)
   at Server.Items.TreasureMap.GetRandomLocation(Map map)
   at Server.Items.TreasureMap..ctor(Int32 level, Map map)
   at Server.Mobiles.BaseCreature.OnBeforeDeath()
   at Server.Mobile.Kill() in c:\ServUO\Server\Mobile.cs:line 4000
   at Server.Mobiles.BaseShipCaptain.OnShipDelete()
   at Server.Multis.BaseBoat.OnAfterDelete()
   at Server.Item.Delete() in c:\ServUO\Server\Item.cs:line 4374
   at Server.Engines.Quests.BountyQuestSpawner.SpawnPirateAndGalleon(SpawnZone zone, Map map)
   at Server.Engines.Quests.BountyQuestSpawner.SpawnRandom()
   at Server.Engines.Quests.BountyQuestSpawner.OnTick()
   at Server.Timer.DelayCallTimer.OnTick() in c:\ServUO\Server\Timer.cs:line 614
   at Server.Timer.Slice() in c:\ServUO\Server\Timer.cs:line 409
   at Server.Core.Main(String[] args) in c:\ServUO\Server\Main.cs:line 663

Clients:
- Count: 1
+ 127.0.0.1: (account = TestPlay) (mobile = 0x16 'Ezcap')

BaseCreature
Code:
        public virtual double TreasureMapChance { get { return TreasureMap.LootChance; } }
        public virtual int TreasureMapLevel { get { return -1; } }

        public virtual bool IgnoreYoungProtection { get { return false; } }

        //daat99 OWLTR start - On Before (Re) Tame methods
        public virtual void OnBeforeTame()
        {
        }

        public virtual void OnBeforeReTame()
        {
        }
        //daat99 OWLTR start - On Before (Re) Tame methods

        public override bool OnBeforeDeath()
        {
            int treasureLevel = TreasureMapLevel;
            GetLootingRights();

            if (treasureLevel == 1 && Map == Map.Trammel && TreasureMap.IsInHavenIsland(this))
            {
                Mobile killer = LastKiller;

                if (killer is BaseCreature)
                {
                    killer = ((BaseCreature)killer).GetMaster();
                }

                if (killer is PlayerMobile && ((PlayerMobile)killer).Young)
                {
                    treasureLevel = 0;
                }
            }

            if (!Summoned && !NoKillAwards && !IsBonded && !NoLootOnDeath)
            {
                if (treasureLevel >= 0)
                {
                    if (m_Paragon && XmlParagon.GetChestChance(this) > Utility.RandomDouble())
                    {
                        XmlParagon.AddChest(this, treasureLevel);
                    }
                    else if (/*(Map == Map.Felucca || Map == Map.Trammel) &&*/TreasureMapChance >= Utility.RandomDouble())
                    {
                        Map map = Map;

                        if (map == Map.Trammel && Siege.SiegeShard)
                            map = Map.Felucca;

                        PackItem(new TreasureMap(treasureLevel, map));
                    }
                }

                if (m_Paragon && Paragon.ChocolateIngredientChance > Utility.RandomDouble())
                {
                    switch (Utility.Random(4))
                    {
                        case 0:
                            PackItem(new CocoaButter());
                            break;
                        case 1:
                            PackItem(new CocoaLiquor());
                            break;
                        case 2:
                            PackItem(new SackOfSugar());
                            break;
                        case 3:
                            PackItem(new Vanilla());
                            break;
                    }
                }
            }

            if (!Summoned && !NoKillAwards && !m_HasGeneratedLoot && !m_NoLootOnDeath)
            {
                m_HasGeneratedLoot = true;
                GenerateLoot(false);
            }

            if (!NoKillAwards && Region.IsPartOf("Doom"))
            {
                int bones = TheSummoningQuest.GetDaemonBonesFor(this);

                if (bones > 0)
                {
                    PackItem(new DaemonBone(bones));
                }
            }

            if (IsAnimatedDead)
            {
                Effects.SendLocationEffect(Location, Map, 0x3728, 13, 1, 0x461, 4);
            }

            InhumanSpeech speechType = SpeechType;

            if (speechType != null)
            {
                speechType.OnDeath(this);
            }

            if (m_ReceivedHonorContext != null)
            {
                m_ReceivedHonorContext.OnTargetKilled();
            }

            return base.OnBeforeDeath();
        }

Best regards
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back