示例#1
0
        private void OnThroneCapture(AncientThroneCaptureEvent captureEvent)
        {
            #region Checks
            if (captureEvent == null)
            {
                return;
            }
            if (captureEvent.Cancelled)
            {
                return;
            }
            if (captureEvent.Player == null)
            {
                return;
            }
            #endregion

            try
            {
                var player = captureEvent.Player;
                captureEvent.Cancel();
                sendError(player, "Il n'est pour l'instant pas possible de capturer le trone.");
            }
            catch (Exception e)
            {
                Log($"Broke. \n\r{e}");
            }
        }
示例#2
0
        private void OnThroneCaptured(AncientThroneCaptureEvent captureEvent)
        {
            #region Checks
            if (captureEvent == null)
            {
                return;
            }
            if (captureEvent.Cancelled)
            {
                return;
            }
            if (!KingIsBoss)
            {
                return;
            }
            #endregion

            var player = captureEvent.Player;
            if (player == null)
            {
                return;
            }
            MakeBoss(player);
        }