RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Server 605 Termur XLMSpawner crash

haazen

Sorceror
I have svn 605 client 7.0.11.2 XMLSpawner 3.24

When ever I [set map termur or open props on me and set the map to termur I get the following crash.

RunUO Version 2.1, Build 4003.2669
Operating System: Microsoft Windows NT 5.1.2600 Service Pack 3
.NET Framework: 2.0.50727.3615
Time: 1/9/2011 12:36:35 AM
Mobiles: 54330
Items: 1173506
Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Server.Mobiles.XmlSpawner.GlobalSectorTimer.OnTick() in c:\UO2\Server605\Scripts\Custom\XMLSpawner\XmlSpawner2.cs:line 11179
at Server.Timer.Slice()
at Server.Core.Main(String[] args)

Here is the code section.
Code:
        private class GlobalSectorTimer : Timer
        {

            public GlobalSectorTimer(TimeSpan delay)
                : base(delay, delay)
            {
                Priority = TimerPriority.OneSecond;
            }

            protected override void OnTick()
            {
                // check the sectors

                // check all active players
                if (NetState.Instances != null)
                {
                    foreach (NetState state in NetState.Instances)
                    {
                        Mobile m = state.Mobile;

                        if (m != null && (m.AccessLevel <= SmartSpawnAccessLevel || !m.Hidden))
                        {
                            // activate any spawner in the sector they are in
                            if (m.Map != null && m.Map != Map.Internal)
                            {
                                Sector s = m.Map.GetSector(m.Location);

line 11179 >>            if (s != null && GlobalSectorTable[m.Map.MapID] != null)
                                {

                                    ArrayList spawnerlist = (ArrayList)GlobalSectorTable[m.Map.MapID][s];
                                    if (spawnerlist != null)
                                    {
                                        foreach (XmlSpawner spawner in spawnerlist)
                                        {

                                            if (spawner != null && !spawner.Deleted && spawner.Running && spawner.SmartSpawning && spawner.IsInactivated)
                                            {
                                                spawner.SmartRespawn();
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

I have searched with no luck. I have compared XMLSpawner of different recient versions and all are the same in this section. I made sure I had no spawners in my backpack nor bank.

As for Termur, I have been there on the freash 605 load before XMLSpawner was installed.

Thank you for any help you can give.
 

koluch

Sorceror
Same issues.
There is not map definition for TerMur in XML Spawner.
I thought there was a way to add "Custom" maps to XML but I can find a post on that here or on the XML site.
Stay in touch if you find a post that discusses the solution to this,

Thanks!

Koluch
 

koluch

Sorceror
koluch said:
Accessing the SA map crashed the server because there is no definition for the new map in XML. This I am sure is no easy task, prehaps someone has a thought on this, will keep checking it out, I know you can add custom maps to XML, will keep looking into this but hopefully someone can point to a post that tells you how to do this, thanks.​
Koluch​
LordHogFred Replied: This is actually a very easy fix :).

In XmlSpawner2.cs find:


Code:
// sector hashtable for each map
private static Hashtable[] GlobalSectorTable = new Hashtable[5];
and replace it with:


Code:
// sector hashtable for each map
private static Hashtable[] GlobalSectorTable = new Hashtable[Map.Maps.Length];
The spawner crashes the server because a map is being accessed that exceeds the number of maps it knows exists.
Replacing the Hashtable with the Maps.Maps.Length variables means that if more maps are ever added then this problem won't happen again as it will automatically increase the size of the Hashtable :).
 
Top