Пример #1
0
 public static void DoPositions(UOAMPacketReader reader)
 {
     try
     {
         int num = reader.ReadInt32();
         if (num != 0)
         {
             if (reader.ReadInt32() != 1)
             {
                 m_Log = true;
             }
             if (reader.ReadInt32() != num)
             {
                 m_Log = true;
             }
             for (int i = 0; i < num; i++)
             {
                 string name = reader.ReadString(0x4f);
                 int    num3 = reader.ReadByte();
                 int    x    = reader.ReadInt32();
                 int    y    = reader.ReadInt32();
                 int    num6 = reader.ReadInt32();
                 if (name != m_Username)
                 {
                     GRadar.AddTag(x, y, name);
                 }
             }
         }
     }
     catch
     {
         Disconnect();
     }
 }
Пример #2
0
 public void SetLocation(short x, short y, short z)
 {
     this.m_Z = z;
     if ((this.m_X != x) || (this.m_Y != y))
     {
         if (this.m_Player && (Engine.Multis.IsInMulti(this.m_X, this.m_Y, this.m_Z) != Engine.Multis.IsInMulti(x, y, z)))
         {
             Map.Invalidate();
         }
         this.m_X      = x;
         this.m_Y      = y;
         this.m_KUOC_X = x;
         this.m_KUOC_Y = y;
         this.m_KUOC_Z = z;
         if (!this.m_Player)
         {
             if (this.m_Visible && !World.InUpdateRange(this))
             {
                 World.Remove(this);
             }
             else if (((this.m_Name != null) && (this.m_Name.Length > 0)) && (Array.IndexOf(Party.Members, this) >= 0))
             {
                 GRadar.AddTag(this.m_X, this.m_Y, this.m_Name, this.m_Serial);
             }
         }
     }
 }
Пример #3
0
 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();
     }
 }
Пример #4
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);
             }
         }
     }
 }
Пример #5
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();
        }
Пример #6
0
        public void Open(string What)
        {
            switch (What)
            {
            case "Help":
                Engine.OpenHelp();
                break;

            case "Options":
                Engine.OpenOptions();
                break;

            case "Journal":
                Engine.OpenJournal();
                break;

            case "Skills":
                Engine.OpenSkills();
                break;

            case "Status":
                Engine.OpenStatus();
                break;

            case "Spellbook":
                Engine.OpenSpellbook(1);
                break;

            case "NecroSpellbook":
                Engine.OpenSpellbook(2);
                break;

            case "PaladinSpellbook":
                Engine.OpenSpellbook(3);
                break;

            case "Paperdoll":
                Engine.OpenPaperdoll();
                break;

            case "Backpack":
                Engine.OpenBackpack();
                break;

            case "Radar":
                GRadar.Open();
                break;

            case "NetStats":
                GNetwork.Open();
                break;

            case "Abilities":
                GCombatGump.Open();
                break;

            case "Macros":
                GMacroEditorForm.Open();
                break;

            case "InfoBrowser":
                GInfoForm.Open();
                break;
            }
        }
Пример #7
0
 public void Unregister(Item i)
 {
     this.m_Items.Remove(i);
     Map.Invalidate();
     GRadar.Invalidate();
 }