コード例 #1
0
 public static bool Send(Objects.Client client, ChatChannel channel, string name)
 {
     ChannelOpenPacket p = new ChannelOpenPacket(client);
     p.ChannelId = channel;
     p.ChannelName = name;
     return p.Send();
 }
コード例 #2
0
ファイル: ChannelOpenPacket.cs プロジェクト: Xileck/tibiaapi
        public static bool Send(Objects.Client client, ChatChannel channel, string name, string[] participants, string[] invitees)
        {
            ChannelOpenPacket p = new ChannelOpenPacket(client);
            p.ChannelId = channel;
            p.ChannelName = name;

            if (client.VersionNumber >= 872)
            {
                p.NumberOfParticipants = (ushort)(participants.Length);
                for (ushort n = 0; n < p.NumberOfParticipants; n++)
                {
                    p.Participants[n] = participants[n];
                }
                p.NumberOfInvitees = (ushort)(invitees.Length);
                for (ushort i = 0; i < p.NumberOfInvitees; i++)
                {
                    p.Invitees[i] = invitees[i];
                }
            }

            return p.Send();
        }
コード例 #3
0
        public static bool Send(Objects.Client client, ChatChannel channel, string name, string[] participants, string[] invitees)
        {
            ChannelOpenPacket p = new ChannelOpenPacket(client);

            p.ChannelId   = channel;
            p.ChannelName = name;

            if (client.VersionNumber >= 872)
            {
                p.NumberOfParticipants = (ushort)(participants.Length);
                for (ushort n = 0; n < p.NumberOfParticipants; n++)
                {
                    p.Participants[n] = participants[n];
                }
                p.NumberOfInvitees = (ushort)(invitees.Length);
                for (ushort i = 0; i < p.NumberOfInvitees; i++)
                {
                    p.Invitees[i] = invitees[i];
                }
            }

            return(p.Send());
        }