public bool AllowRPCCall(uint serviceID, uint methodID)
        {
            if (this.m_data == null)
            {
                return(true);
            }
            RPCConnectionMetering.RuntimeData runtimedData = this.GetRuntimedData(serviceID, methodID);
            if (runtimedData == null)
            {
                return(true);
            }
            float realTimeSinceStartup = (float)BattleNet.GetRealTimeSinceStartup();

            if ((double)this.m_data.StartupPeriodEnd > 0 && realTimeSinceStartup < this.m_data.StartupPeriodEnd)
            {
                float startupPeriodEnd = this.m_data.StartupPeriodEnd - realTimeSinceStartup;
                this.m_log.LogDebug("Allow (STARTUP PERIOD {0}) {1} ({2}:{3})", new object[] { startupPeriodEnd, runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
                return(true);
            }
            if (runtimedData.AlwaysAllow)
            {
                this.m_log.LogDebug("Allow (ALWAYS ALLOW) {0} ({1}:{2})", new object[] { runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
                return(true);
            }
            if (runtimedData.AlwaysDeny)
            {
                this.m_log.LogDebug("Deny (ALWAYS DENY) {0} ({1}:{2})", new object[] { runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
                return(false);
            }
            if (runtimedData.FiniteCallsLeft == -1)
            {
                bool flag = runtimedData.CanCall(realTimeSinceStartup);
                this.m_log.LogDebug("{0} (TRACKER) {1} ({2}:{3})", new object[] { (!flag ? "Deny" : "Allow"), runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
                return(flag);
            }
            if (runtimedData.FiniteCallsLeft <= 0)
            {
                this.m_log.LogDebug("Deny (FINITE CALLS LEFT 0) {0} ({1}:{2})", new object[] { runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
                return(false);
            }
            this.m_log.LogDebug("Allow (FINITE CALLS LEFT {0}) {1} ({2}:{3})", new object[] { runtimedData.FiniteCallsLeft, runtimedData.GetServiceAndMethodNames(), serviceID, methodID });
            RPCConnectionMetering.RuntimeData finiteCallsLeft = runtimedData;
            finiteCallsLeft.FiniteCallsLeft = finiteCallsLeft.FiniteCallsLeft - 1;
            return(true);
        }
        public bool AllowRPCCall(uint serviceID, uint methodID)
        {
            if (this.m_data == null)
            {
                return(true);
            }
            RPCConnectionMetering.RuntimeData runtimedData = this.GetRuntimedData(serviceID, methodID);
            if (runtimedData == null)
            {
                return(true);
            }
            float num = (float)BattleNet.GetRealTimeSinceStartup();

            if ((double)this.m_data.StartupPeriodEnd > 0.0 && num < this.m_data.StartupPeriodEnd)
            {
                float num2 = this.m_data.StartupPeriodEnd - num;
                this.m_log.LogDebug("Allow (STARTUP PERIOD {0}) {1} ({2}:{3})", new object[]
                {
                    num2,
                    runtimedData.GetServiceAndMethodNames(),
                    serviceID,
                    methodID
                });
                return(true);
            }
            if (runtimedData.AlwaysAllow)
            {
                this.m_log.LogDebug("Allow (ALWAYS ALLOW) {0} ({1}:{2})", new object[]
                {
                    runtimedData.GetServiceAndMethodNames(),
                    serviceID,
                    methodID
                });
                return(true);
            }
            if (runtimedData.AlwaysDeny)
            {
                this.m_log.LogDebug("Deny (ALWAYS DENY) {0} ({1}:{2})", new object[]
                {
                    runtimedData.GetServiceAndMethodNames(),
                    serviceID,
                    methodID
                });
                return(false);
            }
            if (runtimedData.FiniteCallsLeft == 4294967295u)
            {
                bool flag = runtimedData.CanCall(num);
                this.m_log.LogDebug("{0} (TRACKER) {1} ({2}:{3})", new object[]
                {
                    (!flag) ? "Deny" : "Allow",
                    runtimedData.GetServiceAndMethodNames(),
                    serviceID,
                    methodID
                });
                return(flag);
            }
            if (runtimedData.FiniteCallsLeft > 0u)
            {
                this.m_log.LogDebug("Allow (FINITE CALLS LEFT {0}) {1} ({2}:{3})", new object[]
                {
                    runtimedData.FiniteCallsLeft,
                    runtimedData.GetServiceAndMethodNames(),
                    serviceID,
                    methodID
                });
                runtimedData.FiniteCallsLeft -= 1u;
                return(true);
            }
            this.m_log.LogDebug("Deny (FINITE CALLS LEFT 0) {0} ({1}:{2})", new object[]
            {
                runtimedData.GetServiceAndMethodNames(),
                serviceID,
                methodID
            });
            return(false);
        }