Пример #1
0
        public void AddFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);
            if (this.filter.ContainsKey(fItem.GetHashCode()))
            {
                return;
            }
            this.filter.Add(fItem.GetHashCode(), fItem);

            this.applyFilter();
        }
Пример #2
0
        public void AddFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);

            if (this.filter.ContainsKey(fItem.GetHashCode()))
            {
                return;
            }
            this.filter.Add(fItem.GetHashCode(), fItem);

            this.applyFilter();
        }
Пример #3
0
        public void RemoveFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);

            this.filter.Remove(fItem.GetHashCode());

            this.applyFilter();
        }
Пример #4
0
        public void applyFilter()
        {
            // Clear the old list
            this.diplayedList.Clear();
            // neue Größe schonmal festlegen
            this.diplayedList.Capacity = this.packetList.Count;
            FilterItem f;

            foreach (L2Packet p in this.packetList)
            {
                f = new FilterItem(p.OpCode, (p is GameServerPacket));
                if (this.filter.ContainsKey(f.GetHashCode()))
                {
                    continue;
                }
                this.diplayedList.Add(p);
            }
        }
Пример #5
0
 public void applyFilter()
 {
     // Clear the old list
     this.diplayedList.Clear();
     // neue Größe schonmal festlegen
     this.diplayedList.Capacity = this.packetList.Count;
     FilterItem f;
     foreach (L2Packet p in this.packetList)
     {
         f = new FilterItem(p.OpCode, (p is GameServerPacket));
         if (this.filter.ContainsKey(f.GetHashCode()))
         {
             continue;
         }
         this.diplayedList.Add(p);
     }
 }
Пример #6
0
        public void RemoveFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);
            this.filter.Remove(fItem.GetHashCode());

            this.applyFilter();
        }