예제 #1
0
        private void Add(Player player, IEnumerable <string> args)
        {
            if (!CheckPermission(player, "RaidBoss.Modify"))
            {
                return;
            }
            if (!CheckArgs(player, args))
            {
                return;
            }

            var playerName = args.JoinToString(" ");
            var target     = Server.GetPlayerByName(playerName);

            if (target == null)
            {
                player.SendError(GetMessage("No player", player));
                return;
            }
            if (BossList.ContainsKey(target.Id))
            {
                player.SendError(GetMessage("Already a boss", player));
                return;
            }

            MakeBoss(target);
        }
예제 #2
0
 private void RemoveBoss(Player player)
 {
     if (!BossList.ContainsKey(player.Id))
     {
         return;
     }
     BossList.Remove(player.Id);
     PrintToChat(GetMessage("Boss removed"));
     CheckAllBossesAreGone();
 }
예제 #3
0
 private void OnPlayerDisconnected(Player player)
 {
     if (player == null)
     {
         return;
     }
     if (!BossList.ContainsKey(player.Id))
     {
         return;
     }
     BossList.Remove(player.Id);
     PrintToChat(GetMessage("Boss left"));
     CheckAllBossesAreGone();
 }