Example #1
0
        public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
        {
            ++this.CallsCount;

            try
            {
                this.CheckIBeforeCloseGameCallInfo(info);
                this.CheckBeforeBeforeCloseGame();
            }
            catch (Exception e)
            {
                info.Fail(e.ToString());
                return;
            }

            try
            {
                base.BeforeCloseGame(info);
                this.CheckAfterBeforeCloseGame();
            }
            catch (Exception e)
            {
                this.PluginHost.BroadcastErrorInfoEvent(e.ToString(), info);
            }
        }
Example #2
0
 public void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     try
     {
         this.Plugin.BeforeCloseGame(info);
         this.StrictModeCheck(info);
     }
     catch (Exception e)
     {
         this.ExceptionHanlder(info, e);
     }
 }
Example #3
0
 /// <summary>
 /// Plugin callback called when a game instance is about to be removed from Photon servers memory.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 void IGamePlugin.BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     try
     {
         this.BeforeCloseGame(info);
         this.StrictModeCheck(info);
     }
     catch (Exception e)
     {
         ((IGamePlugin)this).ReportError(ErrorCodes.UnhandledException, e);
         CallFailSafe(info, e.ToString());
     }
 }
Example #4
0
        public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
        {
            this.onBeforeCloseEvent.Set();
            if (this.PluginHost.GameId.EndsWith("OnBeforeCloseForgotCall"))
            {
                return;
            }

            if (this.PluginHost.GameId.EndsWith("StopCloseGameIfThereIsActive"))
            {
                this.allowContinueEvent.WaitOne();
            }

            var property = (string)this.PluginHost.GameProperties["key"];

            if (property != null &&
                (property == "BeforeCloseGameException" || property == "CloseFatalPlugin"))
            {
                throw new Exception("BeforeCloseGameException for test");
            }

            info.Continue();
        }
Example #5
0
        public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
        {
            this.onBeforeCloseEvent.Set();
            if (this.PluginHost.GameId.EndsWith("OnBeforeCloseForgotCall"))
            {
                return;
            }

            if (this.PluginHost.GameId.EndsWith("StopCloseGameIfThereIsActive"))
            {
                this.allowContinueEvent.WaitOne();
            }

            var property = (string)this.PluginHost.GameProperties["key"];
            if (property != null
                && (property == "BeforeCloseGameException" || property == "CloseFatalPlugin"))
            {
                throw new Exception("BeforeCloseGameException for test");
            }

            info.Continue();
        }
Example #6
0
 /// <summary>
 /// Calls info.Continue(). Override to change.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 public virtual void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     info.Continue();
 }
Example #7
0
 /// <summary>
 /// Calls info.Continue
 /// </summary>
 /// <param name="info"></param>
 public void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     info.Continue();
 }
Example #8
0
 public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     base.BeforeCloseGame(info);
 }
Example #9
0
 /// <summary>
 /// Plugin callback called when a game instance is about to be removed from Photon servers memory.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 void IGamePlugin.BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     this.BeforeCloseGame(info);
 }
Example #10
0
 public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     this.PluginHost.LogInfo("Closing game. Player " + info.UserId);
     base.BeforeCloseGame(info);
 }
Example #11
0
 public override void BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     this.MethodBody(info, MethodBase.GetCurrentMethod().Name);
 }
Example #12
0
 private void CheckIBeforeCloseGameCallInfo(IBeforeCloseGameCallInfo info)
 {
     this.CheckBaseInfo(info);
     Assert.AreEqual(0, info.Request.EmptyRoomTTL);
 }
Example #13
0
 /// <summary>
 /// Plugin callback called when a game instance is about to be removed from Photon servers memory.
 /// </summary>
 /// <param name="info">Data passed in the callback call.</param>
 void IGamePlugin.BeforeCloseGame(IBeforeCloseGameCallInfo info)
 {
     try
     {
         this.BeforeCloseGame(info);
         this.StrictModeCheck(info);
     }
     catch (Exception e)
     {
         ((IGamePlugin)this).ReportError(ErrorCodes.UnhandledException, e);
         CallFailSafe(info, e.ToString());
     }
 }