Example #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();
        }
Example #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();
        }
Example #3
0
        public void RemoveFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);

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

            this.applyFilter();
        }
Example #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);
            }
        }
Example #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);
     }
 }
Example #6
0
        public void RemoveFilter(int opcode, bool fromServer)
        {
            FilterItem fItem = new FilterItem(opcode, fromServer);
            this.filter.Remove(fItem.GetHashCode());

            this.applyFilter();
        }