示例#1
0
文件: Multis.cs 项目: uotools/PlayUO
 public void Register(Item i, int id)
 {
     if ((i.Multi == null) || (i.Multi.MultiID != id))
     {
         Multi multi = new Multi(id);
         i.Multi = multi;
         Map.Invalidate();
         GRadar.Invalidate();
     }
     if (!this.m_Items.Contains(i))
     {
         this.m_Items.Add(i);
         this.m_Items.Sort(MultiComparer.Instance);
         Map.Invalidate();
         GRadar.Invalidate();
     }
 }
示例#2
0
 public void SetLocation(short x, short y, short z)
 {
     this.m_Z = z;
     if ((this.m_X != x) || (this.m_Y != y))
     {
         this.m_X = x;
         this.m_Y = y;
         if (this.m_InWorld)
         {
             if (this.m_IsMulti)
             {
                 Engine.Multis.Sort();
                 Map.Invalidate();
                 GRadar.Invalidate();
             }
             else if (!World.InUpdateRange(this))
             {
                 World.Remove(this);
             }
         }
     }
 }
示例#3
0
        public static void SetCustomMulti(int serial, int revision, Multi baseMulti, int compressionType, byte[] buffer)
        {
            ArrayList list = (ArrayList)m_Hashtable[serial];

            if (list == null)
            {
                m_Hashtable[serial] = list = new ArrayList();
            }
            CustomMultiEntry entry = new CustomMultiEntry(serial, revision, baseMulti, compressionType, buffer);

            for (int i = 0; i < list.Count; i++)
            {
                CustomMultiEntry entry2 = (CustomMultiEntry)list[i];
                if (entry2.Revision == revision)
                {
                    list[i] = entry;
                    return;
                }
            }
            list.Add(entry);
            Map.Invalidate();
            GRadar.Invalidate();
        }
示例#4
0
文件: Multis.cs 项目: uotools/PlayUO
 public void Unregister(Item i)
 {
     this.m_Items.Remove(i);
     Map.Invalidate();
     GRadar.Invalidate();
 }