Code:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at Conquer.Server.LoadNewMonsters(UInt32 id) in D:\Conquer\Conquer\System\Server.cs:line 477
Code:
public static void LoadNewMonsters(uint id)
{
try
{
Game.MsgMonster.MobCollection colletion = new Game.MsgMonster.MobCollection(id);
if (colletion.ReadMap())
{
string[] text = System.IO.File.ReadAllLines(Program.ServerConfig.DbLocation + "MonsterSpawns\\NewMonster.txt");
foreach (string line in text)
{
string[] data = line.Split(' ');
ushort MapID = (ushort)long.Parse(data[1]);// Line 477
if (id != MapID) continue;
ushort X = (ushort)long.Parse(data[2]);
ushort Y = (ushort)long.Parse(data[3]);
ushort XPlus = (ushort)long.Parse(data[4]);
ushort YPlus = (ushort)long.Parse(data[5]);
uint respawn = (uint)long.Parse(data[6]);
int Amount = (int)long.Parse(data[7]);
uint monsterID = (uint)long.Parse(data[8]);
Game.MsgMonster.MonsterFamily famil;
if (!Pool.MonsterFamilies.TryGetValue(monsterID, out famil))
{
continue;
}
if (Game.MsgMonster.MonsterRole.SpecialMonsters.Contains(famil.ID))
continue;
Game.MsgMonster.MonsterFamily Monster = famil.Copy();
Monster.SpawnX = X;
Monster.SpawnY = Y;
Monster.MaxSpawnX = (ushort)(X + XPlus);
Monster.MaxSpawnY = (ushort)(Y + YPlus);
Monster.MapID = MapID;
Monster.SpawnCount = (byte)Amount;
Monster.rest_secs = (int)respawn;
colletion.Add(Monster);
}
}
GC.Collect();
}
catch (Exception e) { MyConsole.WriteLine(e.ToString()); }
}
Code:
8000 15757 144 143 50 50 5 15 2437
Code:
public static void LoadMyMonsters(uint id)






