Beispiel #1
0
    void AddDDosEvents(uint[] e, ulong r)
    {
        uint    i = GTW_o / 100;
        Vector2 c = Vector2.zero;
        Vector2 l = Vector2.zero;

        for (int u = 0; u < e.Length;)
        {
            uint s = e[u++];
            uint f = s >> 16 & 255;
            AddDDos_a(ref c, e[u++]);
            AddDDos_a(ref l, e[u++]);
            for (; ;)
            {
                uint v = e[u++];
                uint p = 65535 & v;
                uint g = v >> 16;
                if (g == 0)
                {
                    break;
                }
                ulong h = r + i * p;
                uint  m = 30, d = 500;
                g = (uint)Mathf.Min((int)g * (int)m, (int)d);
                GTWEvent evt = new GTWEvent();
                evt.key             = s;
                evt.remaining       = evt.count = g;
                evt.next_event_time = h;
                evt.end_time        = h + i;
                evt.coords          = new Vector4(c[0], c[1], l[0], l[1]);
                evt.NextEvent();
                kevents.Add(evt);
            }
        }
    }
Beispiel #2
0
 void AddEvents(uint[] e, ulong r)
 {
     for (int i = 0; i < e.Length; i += 2)
     {
         GTWEvent u = new GTWEvent();
         u.key             = e[i];
         u.remaining       = u.count = e[i + 1];
         u.next_event_time = r;
         u.end_time        = r + GTW_o;
         u.NextEvent();
         kevents.Add(u);
     }
 }