Argalep
Member
Code:
Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at Server.Map.ClientEnumerator.MoveNext() in ..\Server\Map.cs:line 1399
at Server.Mobile.SetLocation(Point3D newLocation, Boolean isTeleport) in ..\Server\Mobile.cs:line 10054
at Server.Mobiles.BaseCreature.SetLocation(Point3D newLocation, Boolean isTeleport)
at Server.Mobile.Move(Direction d) in ..\Server\Mobile.cs:line 3364
at Server.Mobiles.BaseAI.DoMoveImpl(Direction d)
at Server.Mobiles.BaseAI.DoMove(Direction d, Boolean badStateOk)
at Server.Mobiles.BaseAI.WalkRandom(Int32 iChanceToNotMove, Int32 iChanceToDir, Int32 iSteps)
at Server.Mobiles.BaseAI.WalkRandomInHome(Int32 iChanceToNotMove, Int32 iChanceToDir, Int32 iSteps)
at Server.Mobiles.BaseAI.DoActionWander()
at Server.Mobiles.MeleeAI.DoActionWander()
at Server.Mobiles.BaseAI.AITimer.OnTick()
at Server.Timer.Slice() in ..\Server\Timer.cs:line 387
at Server.Core.Main(String[] args) in ..\Server\Main.cs:line 622[\code]
Map.cs line 1399
Mobile m = m_CurrentList[m_CurrentIndex].Mobile;
Code:
public bool MoveNext()
{
while (true)
{
++m_CurrentIndex;
if (m_CurrentIndex == m_CurrentList.Count)
{
++m_ySector;
if (m_ySector > m_ySectorEnd)
{
m_ySector = m_ySectorStart;
++m_xSector;
if (m_xSector > m_xSectorEnd)
{
m_CurrentIndex = -1;
return false;
}
}
m_CurrentIndex = -1;
m_CurrentList = m_Map.InternalGetSector(m_xSector, m_ySector).Clients;
}
else
{
Mobile m = m_CurrentList[m_CurrentIndex].Mobile; // line 1399
if (m != null && !m.Deleted && m_Bounds.Contains(m.Location))
{
return true;
}
}
}
}
Last edited: