Esempio n. 1
0
 public virtual void HandleUpdateApplicationStats(IEventData eventData)
 {
     if (MasterApplication.AppStats != null)
     {
         var updateAppStatsEvent = new UpdateAppStatsEvent(this.Peer.Protocol, eventData);
         MasterApplication.AppStats.UpdateGameServerStats(this, updateAppStatsEvent.PlayerCount, updateAppStatsEvent.GameCount);
     }
 }
        private void PublishStats()
        {
            this.publishStatsSchedule = null;
            var e = new UpdateAppStatsEvent {
                PlayerCount = this.PeerCount, GameCount = this.GameCount
            };

            GameApplication.Instance.MasterPeer.SendEvent(new EventData((byte)ServerEventCode.UpdateAppStats, e), new SendParameters());
        }
Esempio n. 3
0
        private void PublishStats()
        {
            this.publishStatsSchedule = null;
            var e = new UpdateAppStatsEvent {
                PlayerCount = this.PeerCount, GameCount = this.GameCount
            };

            if (this.application.MasterServerConnection != null)
            {
                this.application.MasterServerConnection.SendEventIfRegistered(
                    new EventData((byte)ServerEventCode.UpdateAppStats, e), new SendParameters());
            }
        }