Bug Report Items.cs GetMaxUpdateRange

Discussion in 'JustUO Bug Reports' started by HawkEye, Oct 22, 2015.

  1. HawkEye

    HawkEye Super Contributor

    I noticed updating items.cs to use new kr I found this lines..

    Code:
            public virtual int GetMaxUpdateRange()
            {
                return Core.GlobalUpdateRange;
            }
    
            public virtual int GetUpdateRange(Mobile m)
            {
                return Core.GlobalUpdateRange;
            }
    if u notic both lins return same update range now if you go into core or main.cs

    Code:
            private static int m_GlobalUpdateRange = 18;
            private static int m_GlobalMaxUpdateRange = 24;
    
            public static int GlobalUpdateRange { get { return m_GlobalUpdateRange; } set { m_GlobalUpdateRange = value; } }
            public static int GlobalMaxUpdateRange { get { return m_GlobalMaxUpdateRange; } set { m_GlobalMaxUpdateRange = value; } }
    you will see its correct here

    so in items.cs this line needs changed

    public virtual int GetMaxUpdateRange()
    {
    return Core.GlobalUpdateRange;
    }

    To

    public virtual int GetMaxUpdateRange()
    {
    return Core.GlobalMaxUpdateRange;
    }
     
  2. Vorspire

    Vorspire Illustrious Member JustUO Developer

    This isn't an issue, doing that will actually cause problems when it comes to loading items that are at the same range as GlobalMaxUpdateRange; in order to know which items need to be sent while your character is moving, the server uses Core.GlobalMaxUpdateRange minus Item.GetMaxUpdateRange() (24 - 18) to determine if the item is within a certain update range.

    Making the edit you suggested would result in 24 - 24 = 0, therefore causing items to not be sent when they come on screen.
    24 - 18 is the buffer zone, houses for example have 24 - (18 + 4), a buffer zone of 2 tiles.

    Stock RunUO code:
    Code:
    public virtual int GetMaxUpdateRange()
    {
    return 18;
    }
    public virtual int GetUpdateRange( Mobile m )
    {
    return 18;
    }
    
    
     
  3. HawkEye

    HawkEye Super Contributor

    never really looked all the other code just looked like it was misttyped
     

Share This Page