Exemplo n.º 1
0
        public static bool Throttle(int packetID, NetState ns, out bool drop)
        {
            if (ns.Mobile is not PlayerMobile player || player.AccessLevel >= AccessLevel.Counselor)
            {
                drop = false;
                return(true);
            }

            if (Core.TickCount < ns.GetPacketDelay(packetID) + Delays[packetID])
            {
                drop = true;
                return(false);
            }

            drop = false;
            return(true);
        }