Пример #1
0
 public void GroupVisAdd(Player player, Group group, Player whom)
 {
     // Ignore messages sent by myself
     if (player != Player.LocalPlayer)
     {
         group.AddViewer(whom, false);
     }
     Program.GameMess.PlayerEvent(player, "shows {0} to {1}.", group, whom);
 }
Пример #2
0
 public void GroupVisAdd(Player player, Group group, Player whom)
 {
     WriteReplayAction(player.Id);
     // Ignore messages sent by myself
     if (!IsLocalPlayer(player))
     {
         group.AddViewer(whom, false);
     }
     Program.GameMess.PlayerEvent(player, "shows {0} to {1}.", group, whom);
 }
Пример #3
0
        public void GroupAddViewer(int id, int pid)
        {
            Group  group  = Group.Find(id);
            Player player = Player.Find((byte)pid);

            if (group.Controller != Player.LocalPlayer)
            {
                Program.GameMess.Warning("{0} can't set visibility on {0} because they don't control it.", Player.LocalPlayer.Name, group.Name);
                return;
            }
            if (group.Viewers.Contains(player))
            {
                return;
            }
            else
            {
                QueueAction(() => group.AddViewer(player, true));
            }
        }
Пример #4
0
        public void GroupSetVisibility(int id, string v)
        {
            Group group = Group.Find(id);

            if (group.Controller != Player.LocalPlayer)
            {
                Program.GameMess.Warning("{0} can't set visibility on {0} because they don't control it.", Player.LocalPlayer.Name, group.Name);
                return;
            }
            QueueAction(
                () =>
            {
                switch (v.ToLower())
                {
                case "none":
                    group.SetVisibility(false, true);
                    return;

                case "all":
                    group.SetVisibility(true, true);
                    return;

                case "undefined":
                    group.SetVisibility(null, true);
                    return;

                case "me":
                    group.SetVisibility(false, true);
                    group.AddViewer(Player.LocalPlayer, true);
                    return;

                default:
                    Program.GameMess.Warning("Invalid visibility type '{0}'", v);
                    return;
                }
            });
        }
Пример #5
0
 public void GroupVisAdd(Player player, Group group, Player whom)
 {
     // Ignore messages sent by myself
     if (player != Player.LocalPlayer)
         group.AddViewer(whom, false);
     Program.GameMess.PlayerEvent(player, "shows {0} to {1}.", group, whom);
 }